michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: SHELL = /bin/sh michael@0: .SUFFIXES: michael@0: .SUFFIXES: .c .o .h .in .a .so michael@0: michael@0: srcdir = @srcdir@ michael@0: VPATH = @srcdir@ michael@0: prefix = @prefix@ michael@0: exec_prefix = @exec_prefix@ michael@0: includedir = @includedir@ michael@0: bindir = @bindir@ michael@0: @SET_MAKE@ michael@0: INSTALL = @INSTALL@ michael@0: RANLIB = @RANLIB@ michael@0: AR = @AR@ michael@0: CC = @CC@ michael@0: LD = @LD@ michael@0: RM = @RM@ michael@0: TAR = @TAR@ michael@0: michael@0: CPPFLAGS = @CPPFLAGS@ michael@0: CFLAGS = @CFLAGS@ michael@0: LDFLAGS = @LDFLAGS@ michael@0: LIBS = @LIBS@ michael@0: michael@0: INSTALL_PROGRAM = $(INSTALL) -m 0500 michael@0: michael@0: all:: program michael@0: michael@0: # Standard Netscape/Mozilla targets: michael@0: # import import_xp export private_export libs program install all clobber michael@0: # clobber_all release release_xp alltags michael@0: michael@0: # Standard GNU targets: michael@0: # all install uninstall install-strip clean distclean mostlyclean michael@0: # maintainer-clean TAGS info dvi dist check installcheck installdirs michael@0: michael@0: # === The actual targets and the real commands that make them === michael@0: program:: trivial michael@0: michael@0: trivial: trivial.c config.h Makefile michael@0: $(CC) -I. -I${srcdir} $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS) $(LIBS) michael@0: michael@0: # Now, various standard targets, some that do stuff, some that are no-ops michael@0: michael@0: import:: michael@0: michael@0: export:: install michael@0: michael@0: private_export:: michael@0: michael@0: program:: michael@0: michael@0: clobber:: clean michael@0: michael@0: clobber_all:: maintainer-clean michael@0: michael@0: alltags:: TAGS michael@0: michael@0: RESULTS = \ michael@0: $(DESTDIR)$(bindir)/trivial \ michael@0: $(NULL) michael@0: michael@0: install:: $(RESULTS) michael@0: michael@0: $(DESTDIR)$(bindir)/trivial: trivial michael@0: $(INSTALL_PROGRAM) trivial $(DESTDIR)$(bindir)/trivial michael@0: michael@0: # "rm -f" with no arguments bites on some platforms. michael@0: # There should be an autoconf check and maybe a more michael@0: # general $(FORCEDREMOVE) command michael@0: michael@0: uninstall:: michael@0: $(RM) -f $(RESULTS) michael@0: michael@0: install-strip:: michael@0: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s ' install michael@0: michael@0: clean:: michael@0: $(RM) -f *~ core trivial.o trivial michael@0: michael@0: distclean:: clean michael@0: $(RM) -f Makefile config.cache config.h config.log config.status stamp-h stamp-h.in michael@0: michael@0: mostlyclean:: clean michael@0: michael@0: maintainer-clean:: distclean michael@0: $(RM) -f TAGS trivial*.tar.gz michael@0: michael@0: TAGS:: michael@0: michael@0: DISTFILES = \ michael@0: .cvsignore \ michael@0: README.txt \ michael@0: Makefile.in \ michael@0: acconfig.h \ michael@0: config.h.in \ michael@0: configure \ michael@0: configure.in \ michael@0: install-sh \ michael@0: trivial.c \ michael@0: $(NULL) michael@0: michael@0: dist:: trivial.tar.gz michael@0: michael@0: # There must be an easier and more portable way of doing this.. michael@0: trivial.tar.gz: $(DISTFILES) michael@0: echo $(DISTFILES) | tr ' ' '\n' | sed "s^.*^`( cd ${srcdir}; pwd ) | xargs basename`/&^" | xargs tar czf $@ -C ${srcdir}/.. michael@0: michael@0: # other "standard" but irrelevant targets michael@0: info:: michael@0: michael@0: dvi:: michael@0: michael@0: check:: michael@0: michael@0: installcheck:: michael@0: michael@0: installdirs:: michael@0: michael@0: # Include dependancies michael@0: michael@0: michael@0: # autoheader might not change config.h.in, so touch a stamp file michael@0: ${srcdir}/config.h.in: stamp-h.in michael@0: ${srcdir}/stamp-h.in: configure.in acconfig.h michael@0: cd ${srcdir} && autoheader michael@0: echo timestamp > ${srcdir}/stamp-h.in michael@0: michael@0: # Remake the configuration michael@0: ${srcdir}/configure: configure.in michael@0: cd ${srcdir} && autoconf michael@0: michael@0: config.h: stamp-h michael@0: stamp-h: config.h.in config.status michael@0: ./config.status michael@0: michael@0: Makefile: Makefile.in config.status michael@0: ./config.status michael@0: michael@0: config.status: configure michael@0: ./config.status --recheck