2 # Copyright (C) 1995 - 2005 Michael Riepe
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
9 # This library 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 GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 # @(#) $Id: Makefile.in,v 1.30 2008/05/23 08:17:56 michael Exp $
23 exec_prefix = @exec_prefix@
26 pkgdir = $(libdir)/pkgconfig
32 INSTALL_DATA = @INSTALL_DATA@
40 # no user serviceable parts below
55 acconfig.h aclocal.m4 ChangeLog config.guess config.h.in \
56 config.sub configure configure.in COPYING.LIB INSTALL install-sh \
57 Makefile.in mkinstalldirs README stamp-h.in VERSION libelf.pc.in
59 all: all-recursive all-local
60 check: check-recursive check-local
61 install: install-recursive install-local
62 uninstall: uninstall-recursive uninstall-local
63 mostlyclean: mostlyclean-recursive mostlyclean-local
64 clean: clean-recursive clean-local
65 distclean: distclean-recursive distclean-local
66 maintainer-clean: maintainer-clean-recursive maintainer-clean-local
68 install-compat uninstall-compat:
71 all-recursive check-recursive install-recursive uninstall-recursive \
72 clean-recursive distclean-recursive mostlyclean-recursive \
73 maintainer-clean-recursive:
74 @subdirs="$(SUBDIRS)"; for subdir in $$subdirs; do \
75 target=`echo $@|sed 's,-recursive,,'`; \
76 echo making $$target in $$subdir; \
77 (cd $$subdir && $(MAKE) $$target) || exit 1; \
84 install-local: $(srcdir)/mkinstalldirs libelf.pc
85 $(SHELL) $(srcdir)/mkinstalldirs $(instroot)$(pkgdir)
86 $(INSTALL_DATA) libelf.pc $(instroot)$(pkgdir)
89 $(RM) $(instroot)$(pkgdir)/libelf.pc
94 clean-local: mostlyclean-local
96 distclean-local: clean-local
97 $(RM) config.cache config.h config.log config.status stamp-h
101 maintainer-clean-local: distclean-local
102 @echo "This command is intended for maintainers to use;"
103 @echo "it deletes files that may require special tools to rebuild."
104 $(RM) config.h.in configure stamp-dist
111 distdir = $(PACKAGE)-$(VERSION)
112 DISTPERMS = --owner=root --group=root --numeric-owner
113 $(MAINT)dist: ./stamp-dist
114 $(MAINT)./stamp-dist: $(DISTFILES)
117 files="$(DISTFILES)"; for file in $$files; do \
118 ln $(srcdir)/$$file $(distdir) || \
119 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
121 subdirs="$(DISTSUBDIRS)"; for subdir in $$subdirs; do \
122 (cd $$subdir && $(MAKE) dist) || exit 1; \
125 find . -type f ! -name MANIFEST -exec wc -c {} \; | \
126 sed 's, \./, ,' | sort -k2 >MANIFEST
127 -$(RM) $(distdir).tar.gz.bak $(PACKAGE).tar.gz
128 -$(MV) $(distdir).tar.gz $(distdir).tar.gz.bak
129 tar cvohfz $(distdir).tar.gz $(DISTPERMS) $(distdir)
130 $(LN_S) $(distdir).tar.gz $(PACKAGE).tar.gz
131 $(RM) stamp-dist && echo timestamp > stamp-dist
136 @echo 'unset CC CFLAGS CPPFLAGS LDFLAGS LIBS' >disttest/config.site
137 cd disttest && CONFIG_SITE=config.site ../$(distdir)/configure
139 $(MAKE) -C disttest check
140 $(MAKE) -C disttest dist
145 ctags lib/*.c lib/*.h
149 $(TRACKFS) -l install.log -b backup.cpio $(MAKE) install
151 # For the justification of the following Makefile rules, see node
152 # `Automatic Remaking' in GNU Autoconf documentation.
154 $(MAINT)$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4
155 $(RM) $(srcdir)/configure
156 cd $(srcdir) && autoconf
158 $(MAINT)$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
159 $(MAINT)$(srcdir)/stamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
160 $(RM) $(srcdir)/config.h.in
161 cd $(srcdir) && autoheader
162 cd $(srcdir) && $(RM) stamp-h.in && echo timestamp > stamp-h.in
164 $(MAINT)config.h: stamp-h
165 $(MAINT)stamp-h: config.h.in config.status
166 CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
167 $(RM) stamp-h && echo timestamp > stamp-h
169 $(MAINT)Makefile: Makefile.in config.status
170 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
172 $(MAINT)lib/Makefile: lib/Makefile.in config.status
173 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
175 $(MAINT)lib/sys_elf.h: lib/stamp-h
176 $(MAINT)lib/stamp-h: lib/sys_elf.h.in config.status
177 CONFIG_FILES= CONFIG_HEADERS=lib/sys_elf.h ./config.status
178 $(RM) lib/stamp-h && echo timestamp > lib/stamp-h
180 $(MAINT)po/Makefile: po/Makefile.in config.status
181 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
183 $(MAINT)libelf.pc: libelf.pc.in config.status
184 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
186 RECHECK_FLAGS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' \
187 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)'
189 $(MAINT)config.status: configure config.h.in VERSION
190 $(RECHECK_FLAGS) ./config.status --recheck
194 $(RECHECK_FLAGS) ./config.status --recheck
196 # Tell versions [3.59,3.63) of GNU make not to export all variables.
197 # Otherwise a system limit (for SysV at least) may be exceeded.