#ident @(#)cc-bemwcc.rul	1.9 07/05/08 
###########################################################################
# Written 1996-2006 by J. Schilling
###########################################################################
#
# Platform dependent MACROS for BeOS mwcc
#
###########################################################################
# Copyright (c) J. Schilling
###########################################################################
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# See the file CDDL.Schily.txt in this distribution for details.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file CDDL.Schily.txt from this distribution.
###########################################################################

CPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
CFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(BEMWCOPTOPT) $(COPTX)
C++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(BEMWC++OPTOPT) $(C++OPTX)


#
# XXX Old BeOS needs libroot.so to get [efg]cvt()
# XXX New BeOS seems to have this in libc and in addition we include
# XXX strtod.c for floating point conversion on OS without such code.
# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
# XXX removed and printing floating numbers will work with old/new BeOS
#
#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS

#
# XXX This is used by bemac-beos-cc.rul
#
CPPOPTS=	-O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
#
# XXX This is used by bemac-beos-mwcc.rul
#
CPPOPTS=	-relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
#
# XXX This is used by powerpc-beos-mwcc.rul
#
CPPOPTS=	-relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)

CPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
COPTS=
CWOPTS=	        -w8
COPTOPT=	-opt off
COPTDYN=	#-fpic
COPTGPROF=	#-pg
C++OPTS=
C++WOPTS=	
#C++OPTOPT=	-O
#C++OPTDYN=	-Kpic
#C++OPTGPROF=	-xpg

LIB_PREFIX=	lib
LIB_SUFFIX=	.a
SHL_SUFFIX=	.so

LIBS_PATH=	-L$(OLIBSDIR)
LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 

LDFLAGS=	$(LDOPTS) $(LDOPTX)
LDLIBS=		$(LIBS) $(LIBX)

#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
#
# XXX This is used by powerpc-beos-mwcc.rul
#
LDOPTS=		-multidefs -sym on -g $(LIBS_PATH) $(LDPATH)

LDOPTS=		-multidefs -msg nodup -sym on -g $(LIBS_PATH) $(LDPATH)
LDOPTDYN=#	-shared -Wl,-soname,$(TARGET)
LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so

FLOAT_OPTIONS=	

CC_COM=		mwccppc
CC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
LDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
DYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)

RMDEP=		:
MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -make
MKDEP_OUT=

#CC++ =		@echo "	==> COMPILING \"$@\""; CC
#LDCC++ =	@echo "	==> LINKING \"$@\""; CC
#DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; CC
#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM
#MKC++DEP_OUT=
CC++ =		@echo "	==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1
LDCC++ =	@echo "	==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1
DYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1
MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1
MKC++DEP_OUT=
