2 # Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
4 # This program is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 ifndef _BUILDRULES_INCLUDED_
18 _BUILDRULES_INCLUDED_ = 1
20 include $(TOPDIR)/include/builddefs
22 clean clobber : $(addsuffix -clean,$(SUBDIRS))
29 # Never blow away subdirs
43 $(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
44 $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
48 $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
49 $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
56 %.pot: $(XGETTEXTFILES)
57 $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
59 # Generate temp .po files, to check whether translations need updating.
60 # Not by default, due to gettext output differences between versions.
62 # $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
63 # if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
72 endif # _BUILDRULES_INCLUDED_
78 DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
79 $(SED) -e 's,`pwd`,$(TOPDIR),g' \
85 DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
88 depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS))
89 $(DEPENDSCRIPT) > .dep
90 test -s .dep || rm -f .dep
95 # Include dep, but only if it exists
96 ifeq ($(shell test -f .dep && echo .dep), .dep)
100 $(LTOBJECTS): $(HFILES)
102 $(OBJECTS): $(HFILES)