Fix trivial memory leak
[tftp-hpa.git] / Makefile
blobf09c8045e6462f443fb2efb5c91985a63ffc936d
1 # You can do "make SUB=blah" to make only a few, or edit here, or both
2 # You can also run make directly in the subdirs you want.
4 SUB = lib tftp tftpd
6 %.build: MCONFIG acconfig.h version.h
7 $(MAKE) -C $(patsubst %.build, %, $@)
9 %.install: MCONFIG acconfig.h version.h
10 $(MAKE) -C $(patsubst %.install, %, $@) install
12 %.clean:
13 $(MAKE) -C $(patsubst %.clean, %, $@) clean
15 %.distclean:
16 $(MAKE) -C $(patsubst %.distclean, %, $@) distclean
18 all: MCONFIG $(patsubst %, %.build, $(SUB))
20 tftp.build: lib.build
21 tftpd.build: lib.build
23 install: MCONFIG $(patsubst %, %.install, $(SUB))
25 clean: localclean $(patsubst %, %.clean, $(SUB))
27 localclean:
28 rm -f version.h
30 distclean: localdistclean $(patsubst %, %.distclean, $(SUB))
32 localdistclean:
33 rm -f MCONFIG config.status config.log acconfig.h *~ \#*
34 rm -rf *.cache
35 find . -type f \( -name \*.orig -o -name \*.rej \) | xargs -r rm -f
37 spotless: distclean
38 rm -f configure acconfig.h.in
40 autoconf: configure acconfig.h.in
42 config: MCONFIG acconfig.h
44 release:
45 $(MAKE) autoconf
46 $(MAKE) distclean
48 MCONFIG: configure MCONFIG.in acconfig.h.in
49 ./configure
51 acconfig.h: MCONFIG
52 : Generated by side effect
54 acconfig.h.in: configure.in aclocal.m4
55 rm -f acconfig.h.in acconfig.h
56 autoheader -f
58 configure: configure.in aclocal.m4
59 rm -f MCONFIG configure config.log acconfig.h config.cache
60 autoconf
62 version.h: version
63 echo \#define VERSION \"tftp-hpa `cat version`\" > version.h