# Copyright (C) 1994 Ian Murdock # Copyright (C) 1994,1995 Ian Jackson # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, # or (at your option) any later version. # # This is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public # License along with dpkg; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = $(prefix) docdir = $(prefix)/doc devdocdir = $(docdir)/dpkg copyingfile = $(docdir)/copyright/dpkg infodir = $(prefix)/info bindir = $(exec_prefix)/bin sbindir = $(exec_prefix)/sbin libdir = $(prefix)/lib dpkglibdir = $(libdir)/dpkg methodsdir = $(dpkglibdir)/methods datadir = /var/lib/dpkg methodsdatadir = $(datadir)/methods methodsmnt = $(datadir)/methods/mnt pinfodir = $(datadir)/info pupdatesdir = $(datadir)/updates altsdatadir = $(datadir)/alternatives partsdir = $(datadir)/parts mandir = $(prefix)/man man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 man1 = 1 man5 = 5 man8 = 8 etcdir= /etc altsetcdir = $(etcdir)/alternatives BOURNESHELL = /bin/sh INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ CFLAGS = @CFLAGS@ @CWARNS@ $(XCFLAGS) LDFLAGS = $(XLDFLAGS) ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS) SUBDIRS = lib main dpkg-deb split md5sum scripts doc include dselect methods PORTABLEDIRS = lib dpkg-deb split md5sum .SUFFIXES: .c .o .c.o: $(CC) $(ALL_CFLAGS) -c $< all: version set -e; for d in $(SUBDIRS) ; do \ cd $$d ; \ $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)'; \ cd .. ; \ done install: all $(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) $(sbindir) \ $(man1dir) $(man5dir) $(man8dir) $(devdocdir) \ $(libdir) $(datadir) $(pinfodir) $(pupdatesdir) \ $(dpkglibdir) $(methodsdir) $(methodsdatadir) $(methodsmnt) \ $(altsdatadir) $(altsetcdir) $(partsdir) $(infodir) set -e; for d in $(SUBDIRS) ; do \ cd $$d ; \ $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \ install ; \ cd .. ; \ done $(INSTALL_DATA) COPYING $(copyingfile) portable: version set -e; for d in lib dpkg-deb split md5sum ; do \ cd $$d ; \ $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' ; \ cd .. ; \ done install-portable: portable $(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) \ $(man1dir) $(man8dir) $(libdir) $(dpkglibdir) set -e; for d in $(PORTABLEDIRS) ; do \ cd $$d ; \ $(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \ install ; \ cd .. ; \ done # $(INSTALL_DATA) COPYING $(copyingfile) autoconf: autoheader autoconf clean: set -e; for d in $(SUBDIRS) ; do \ cd $$d ; \ $(MAKE) clean ; \ cd .. ; \ done rm -f core version.h.new distclean: clean set -e; for d in $(SUBDIRS) ; do \ cd $$d ; \ $(MAKE) distclean ; \ cd .. ; \ done rm -f Makefile *.orig *~ *.~* ./#*# rm -f config.h config.status install config.cache config.log version: perl insert-version.pl version.h.new cmp -s version.h.new version.h || mv version.h.new version.h