some Makefile dependency fixes
authorTim Shimmin <tes@sgi.com>
Tue, 4 Jul 2006 03:51:26 +0000 (03:51 +0000)
committerTim Shimmin <tes@sgi.com>
Tue, 4 Jul 2006 03:51:26 +0000 (03:51 +0000)
Merge of master-melb:xfs-cmds:26405a by kenmcd.

  specify platform for depend flags

include/builddefs.in
include/buildrules

index d3459a35cec80d2cb389cd4308fdee6ddbcfed66..1449aac69e2dfa41284f4c739cb628a3af4a7ea7 100644 (file)
@@ -56,12 +56,18 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
 
 ifeq ($(PKG_PLATFORM),linux)
 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
+DEPENDFLAGS = -D__linux__
 endif
 ifeq ($(PKG_PLATFORM),darwin)
 PCFLAGS = -traditional-cpp $(GCCFLAGS)
+DEPENDFLAGS = -D__APPLE__
 endif
 ifeq ($(PKG_PLATFORM),irix)
 PCFLAGS = -nostdinc -I$(ROOT)/usr/include -I$(TOPDIR)/../irix/include
+DEPENDFLAGS = -D__sgi__
+endif
+ifeq ($(PKG_PLATFORM),freebsd)
+DEPENDFLAGS = -D__FreeBSD__
 endif
 
 GCFLAGS = $(OPTIMIZER) $(DEBUG) \
index c530bcc0605790f0fddaa04a4442b56a8f2c4886..f7212831058d9f9eaf229603808c735f7d5af365 100644 (file)
@@ -61,7 +61,7 @@ $(_FORCE):
 depend : $(CFILES) $(HFILES)
        $(SUBDIRS_MAKERULE)
        touch .dep
-       $(MAKEDEPEND) -f - -- $(CFLAGS) -- $(CFILES) | \
+       $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
        $(SED) -e 's,`pwd`,$(TOPDIR),g' \
            -e 's,  */[^ ]*,,g' \
            -e '/^[^ ]*: *$$/d' \
@@ -72,4 +72,6 @@ depend : $(CFILES) $(HFILES)
 # Include dep, but only if it exists
 ifeq ($(shell test -f .dep && echo .dep), .dep)
 include .dep
+else
+$(OBJECTS): $(HFILES)
 endif