Files
apfstests/include/buildrules
T

86 lines
1.7 KiB
Plaintext
Raw Normal View History

2001-01-16 04:10:42 +00:00
#
# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
#
2001-01-16 04:10:42 +00:00
ifndef _BUILDRULES_INCLUDED_
_BUILDRULES_INCLUDED_ = 1
include $(TOPDIR)/include/builddefs
clean clobber : $(SUBDIRS)
rm -f $(DIRT)
@rm -fr .libs
2001-01-16 04:10:42 +00:00
$(SUBDIRS_MAKERULE)
# Never blow away subdirs
ifdef SUBDIRS
.PRECIOUS: $(SUBDIRS)
$(SUBDIRS):
$(SUBDIRS_MAKERULE)
endif
#
# Standard targets
#
ifdef LTCOMMAND
$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
$(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef LTLIBRARY
$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
$(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
%.lo: %.c
$(LTCOMPILE) -c $<
endif
2006-07-14 15:34:37 +00:00
ifdef POTHEAD
%.pot: $(XGETTEXTFILES)
2006-07-14 15:34:37 +00:00
$(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
2006-07-14 15:34:37 +00:00
# Generate temp .po files, to check whether translations need updating.
# Not by default, due to gettext output differences between versions.
%.po: $(POTHEAD)
# $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
# if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
%.mo: %.po
$(MSGFMT) -o $@ $<
endif
2001-01-16 04:10:42 +00:00
source :
$(SOURCE_MAKERULE)
endif # _BUILDRULES_INCLUDED_
2001-01-16 04:10:42 +00:00
$(_FORCE):
.PHONY : depend
2006-07-14 15:34:37 +00:00
DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SED) -e 's,`pwd`,$(TOPDIR),g' \
-e 's, */[^ ]*,,g' \
-e '/^[^ ]*: *$$/d' \
2006-07-14 15:34:37 +00:00
-e '/^ *$$/d'
ifdef LTLIBRARY
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
endif
depend : $(CFILES) $(HFILES)
$(SUBDIRS_MAKERULE)
$(DEPENDSCRIPT) > .dep
test -s .dep || rm -f .dep
2001-01-16 04:10:42 +00:00
# Include dep, but only if it exists
ifeq ($(shell test -f .dep && echo .dep), .dep)
include .dep
2006-07-04 03:51:26 +00:00
else
2006-07-14 15:34:37 +00:00
ifdef LTLIBRARY
$(LTOBJECTS): $(HFILES)
else
2006-07-04 03:51:26 +00:00
$(OBJECTS): $(HFILES)
2001-01-16 04:10:42 +00:00
endif
2006-07-14 15:34:37 +00:00
endif