compiler dependent options as DEPFLAGS

This commit is contained in:
dwarning 2008-12-14 18:00:55 +00:00
parent e8cd4eb0ac
commit 8395692a59
2 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# The master makefile to make spiceopuse (TM) like codemodels
# The master makefile to make spiceopus (TM) like codemodels
# Under the GPLV2 or later license
# 2003 - Stefan Jones <stefan.jones@multigig.com>
@ -106,8 +106,8 @@ uobjs-clean:
-rm -rf .deps
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@echo '$(COMPILE) $(DEPFLAGS) .deps/$(*F).pp -c $<'; \
$(COMPILE) $(DEPFLAGS) .deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \

View File

@ -18,6 +18,7 @@ INCLUDES = -I$(TOPDIR)$(top_srcdir)/src/include -I$(TOPDIR)$(top_builddir)
# CFLAGS to use here
CFLAGS = @CFLAGS@ -fPIC -DCM_LINUX
DEPFLAGS = -MD -MF
ISMINGW = $(shell uname | grep -c "MINGW32")
ifeq ($(ISMINGW), 1)
CFLAGS = @CFLAGS@ -DCM_WINDOWS
@ -26,10 +27,11 @@ ISCYGWIN = $(shell uname | grep -c "CYGWIN")
ifeq ($(ISCYGWIN), 1)
CFLAGS = @CFLAGS@ -DCM_WINDOWS
endif
ISSUNCC = $(shell uname | grep -c "SunOS")
ifeq ($(ISSUNCC), 1)
ISSUNOS = $(shell uname | grep -c "SunOS")
ifeq ($(ISSUNOS), 1)
ifneq "$(CC)" "gcc"
CFLAGS = @CFLAGS@ -KPIC -DCM_LINUX
DEPFLAGS = -xMD -xMF
endif
endif