summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTim Shimmin <tes@sgi.com>2006-07-04 03:51:26 +0000
committerTim Shimmin <tes@sgi.com>2006-07-04 03:51:26 +0000
commit9d5650b8f4000c6177181ed93dc1bf85b350ac61 (patch)
tree2d59f524308cae8c04e601518cad2c17c77471f0 /include
parent2c19df1593699a8f418ed515708c108664b00096 (diff)
downloadattr-9d5650b8f4000c6177181ed93dc1bf85b350ac61.tar.gz
some Makefile dependency fixes
Merge of master-melb:xfs-cmds:26405a by kenmcd. specify platform for depend flags
Diffstat (limited to 'include')
-rw-r--r--include/builddefs.in13
-rw-r--r--include/buildrules4
2 files changed, 16 insertions, 1 deletions
diff --git a/include/builddefs.in b/include/builddefs.in
index 58debc6..634ee35 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -62,6 +62,19 @@ ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" ""
PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
endif
+ifeq ($(PKG_PLATFORM),linux)
+DEPENDFLAGS = -D__linux__
+endif
+ifeq ($(PKG_PLATFORM),darwin)
+DEPENDFLAGS = -D__APPLE__
+endif
+ifeq ($(PKG_PLATFORM),irix)
+DEPENDFLAGS = -D__sgi__
+endif
+ifeq ($(PKG_PLATFORM),freebsd)
+DEPENDFLAGS = -D__FreeBSD__
+endif
+
GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
-DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
-DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
diff --git a/include/buildrules b/include/buildrules
index c530bcc..f721283 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -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