3 RELEASE_DATE:=27 March 2006
6 # You can specify DESTDIR on the command line to do a add
7 # a prefix to the install so it doesn't really happen
8 # Useful for building binary packages
13 pkgdatadir = $(datadir)/$(PACKAGE)
14 pkglibdir = $(libdir)/$(PACKAGE)
15 pkgincludedir = $(includedir)/$(PACKAGE)
17 CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"' -I include
18 HOST_CPPFLAGS=$(CPPFLAGS)
19 I386_CPPFLAGS=$(CPPFLAGS) -I arch/i386/include
20 IA64_CPPFLAGS=$(CPPFLAGS) -I arch/ia64/include
24 ./linux-i386/convert.bin.c\
25 ./linux-ia64/convert.bin.c
27 SPEC=$(OBJDIR)/mkelfImage-$(VERSION).spec
28 TARBALL=$(OBJDIR)/mkelfImage-$(VERSION).tar.gz
29 SRCS:=$(shell find ./AUTHORS ./COPYING ./Makefile ./Makefile.conf.in ./News \
31 ./mkelfImage.spec.in \
34 ./main ./util ./include ./arch \
37 ! -path '*CVS*' ! -name '*~' ! -name '.*' -type f -print )
38 SRCS+=$(GENERATED_SRCS)
39 PSRCS:=$(patsubst ./%,mkelfImage-$(VERSION)/%,$(SRCS))
40 PSRCS+=./mkelfImage-$(VERSION).spec
42 SBIN_TARGETS=$(OBJDIR)/sbin/mkelfImage
43 MAN8_TARGETS=$(OBJDIR)/man/man8/mkelfImage.8
45 TARGETS:=$(SBIN_TARGETS) $(MAN8_TARGETS)
47 DEPS:= Makefile Makefile.conf
52 include linux-i386/Makefile
53 include linux-ia64/Makefile
59 @$(RM) -f config.log config.status config.cache
60 @$(RM) -f $(SBIN_TARGETS) $(MAN1_TARGETS)
61 @$(RM) -f mkelfImage-$(VERSION) $(TARBALL)
64 @$(FIND) . -type f -name '*~' | xargs $(RM) -f
67 maintainer-clean:: dist-clean
68 @$(RM) -f $(SPEC) $(GENERATED_SRCS)
72 $(MKDIR) -p $(DESTDIR)/$(pkgdatadir)/elf32-i386/ $(DESTDIR)/$(sbindir) $(DESTDIR)/$(mandir)/man8
73 $(CP) -ar $(SBIN_TARGETS) $(DESTDIR)/$(sbindir)/
74 $(CP) -ar $(MAN8_TARGETS) $(DESTDIR)/$(mandir)/man8/
79 # pod2man --date="$(RELEASE_DATE)" --release="$(VERSION)" $*.pl > $@
85 $(TARBALL): $(SRCS) $(SPEC)
87 $(RM) -f $(OBJDIR)/mkelfImage-$(VERSION)
88 $(LN) -s .. $(OBJDIR)/mkelfImage-$(VERSION)
89 (cd $(OBJDIR); $(TAR) -cf - $(PSRCS) | gzip -9) > $@
92 $(MKDIR) -p $(OBJDIR)/RPM $(OBJDIR)/SRPM $(OBJDIR)/BUILD $(OBJDIR)/SPECS $(OBJDIR)/TMP
93 unset MAKEFLAGS MAKELEVEL; \
95 --define '_rpmdir $(CWD)/$(OBJDIR)/RPM' \
96 --define '_srcrpmdir $(CWD)/$(OBJDIR)/SRPM' \
97 --define '_builddir $(CWD)/$(OBJDIR)/BUILD' \
98 --define '_specdir $(CWD)/$(OBJDIR)/SPECS' \
99 --define '_tmppath $(CWD)/$(OBJDIR)/TMP' \
102 Makefile.conf: Makefile.conf.in configure
106 configure: configure.ac
108 $(RM) -rf autom4te.cache
110 $(SPEC): mkelfImage.spec.in Makefile
111 $(SED) -e 's,^Version: $$,Version: $(VERSION),' $< > $@
114 .PHONY: echo install realinstall