]>
Commit | Line | Data |
---|---|---|
2bd0ea18 | 1 | # |
6e3140c7 | 2 | # Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved. |
2bd0ea18 NS |
3 | # |
4 | ifndef _BUILDRULES_INCLUDED_ | |
5 | _BUILDRULES_INCLUDED_ = 1 | |
6 | ||
7 | include $(TOPDIR)/include/builddefs | |
8 | ||
2bd0ea18 NS |
9 | clean clobber : $(SUBDIRS) |
10 | rm -f $(DIRT) | |
f937adac | 11 | @rm -fr .libs |
2bd0ea18 NS |
12 | $(SUBDIRS_MAKERULE) |
13 | ||
14 | # Never blow away subdirs | |
15 | ifdef SUBDIRS | |
16 | .PRECIOUS: $(SUBDIRS) | |
17 | $(SUBDIRS): | |
18 | $(SUBDIRS_MAKERULE) | |
19 | endif | |
20 | ||
f937adac NS |
21 | # |
22 | # Standard targets | |
23 | # | |
24 | ||
25 | ifdef LTCOMMAND | |
26 | $(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES) | |
27 | $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS) | |
28 | endif | |
29 | ||
30 | ifdef LTLIBRARY | |
31 | $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS) | |
1b82b560 | 32 | $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS) |
f937adac NS |
33 | |
34 | %.lo: %.c | |
35 | $(LTCOMPILE) -c $< | |
36 | endif | |
37 | ||
9440d84d NS |
38 | ifdef LINGUAS |
39 | %.pot: $(XGETTEXTFILES) | |
16c44ed2 | 40 | xgettext --omit-header --language=C --keyword=_ -o $@ $(XGETTEXTFILES) |
9440d84d | 41 | |
e1687900 NS |
42 | %.po: |
43 | $(MSGMERGE) -o $@.tmpo $@ $(PKG_NAME).pot | |
638473d8 NS |
44 | @if ! diff $@.tmpo $@ >/dev/null; then \ |
45 | echo "$@ is out of date, see $@.tmpo"; \ | |
46 | fi | |
9440d84d | 47 | |
638473d8 | 48 | %.mo: %.po |
9440d84d NS |
49 | $(MSGFMT) -o $@ $< |
50 | endif | |
51 | ||
2bd0ea18 NS |
52 | source : |
53 | $(SOURCE_MAKERULE) | |
54 | ||
f937adac | 55 | endif # _BUILDRULES_INCLUDED_ |
2bd0ea18 NS |
56 | |
57 | $(_FORCE): | |
58 | ||
59 | .PHONY : depend | |
60 | ||
61 | depend : $(CFILES) $(HFILES) | |
62 | $(SUBDIRS_MAKERULE) | |
4df72956 | 63 | touch .dep |
d931d17e | 64 | $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \ |
4df72956 NS |
65 | $(SED) -e 's,`pwd`,$(TOPDIR),g' \ |
66 | -e 's, */[^ ]*,,g' \ | |
67 | -e '/^[^ ]*: *$$/d' \ | |
68 | -e '/^#.*/d' -e '/^ *$$/d' \ | |
69 | > .dep | |
70 | test -s .dep || rm -f .dep | |
2bd0ea18 NS |
71 | |
72 | # Include dep, but only if it exists | |
4df72956 NS |
73 | ifeq ($(shell test -f .dep && echo .dep), .dep) |
74 | include .dep | |
d931d17e TS |
75 | else |
76 | $(OBJECTS): $(HFILES) | |
2bd0ea18 | 77 | endif |