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
commit7f781d375c150b8af953394cc174f962bbfc418a (patch)
tree0105e4a949ae2dc0b49a24c4e43e12f481420f42 /include
parent01777d90ec8d09c495761d2fe4c16addf0293ea8 (diff)
downloadacl-7f781d375c150b8af953394cc174f962bbfc418a.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 65319c8..c082ea6 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -63,6 +63,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