Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / 3rd-party / zisofs_tools / Makefile
1 ## -----------------------------------------------------------------------
2 ##   
3 ##   Copyright 2001 H. Peter Anvin - All Rights Reserved
4 ##
5 ##   This program is free software; you can redistribute it and/or modify
6 ##   it under the terms of the GNU General Public License as published by
7 ##   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
8 ##   USA; either version 2 of the License, or (at your option) any later
9 ##   version; incorporated herein by reference.
10 ##
11 ## -----------------------------------------------------------------------
12
13 ##
14 ## Makefile for mkzftree
15 ##
16 ## mkzftree mirrors a tree in a form suitable for "mkisofs -z".
17 ##
18
19 -include MCONFIG
20 include MRULES
21
22 PROGS     = mkzftree
23 MAN1PAGES = mkzftree.1
24
25 OBJS =  mkzftree.o walk.o workers.o util.o hash.o iso9660.o copytime.o \
26         compress.o uncompress.o
27
28 all: $(PROGS)
29
30 spec: zisofs-tools.spec
31
32 clean:
33         rm -f *.o *.i *.s version.h $(PROGS)
34
35 distclean: clean
36         rm -f MCONFIG config.status config.log config.h *~ \#*
37         rm -f core *.orig *.rej
38         rm -rf *.cache
39
40 release:
41         $(MAKE) configure
42         $(MAKE) spec
43         $(MAKE) distclean
44
45 mkzftree: $(OBJS)
46         $(CC) $(LDFLAGS) -o mkzftree $(OBJS) $(LIBS)
47
48 spotless: distclean
49         rm -f configure config.h.in zisofs-tools.spec
50
51 install: all
52         mkdir -p $(INSTALLROOT)$(bindir)
53         $(INSTALL_PROGRAM) $(PROGS) $(INSTALLROOT)$(bindir)
54         mkdir -p $(INSTALLROOT)$(mandir)/man1
55         $(INSTALL_DATA) $(MAN1PAGES) $(INSTALLROOT)$(mandir)/man1
56
57 config: MCONFIG
58
59 MCONFIG: configure MCONFIG.in config.h.in
60         ./configure
61
62 config.h: MCONFIG
63         : Generated by side effect
64
65 config.h.in: configure.in
66         rm -f config.h.in
67         autoheader
68
69 configure: configure.in aclocal.m4
70         autoconf
71         rm -f MCONFIG config.cache config.log config.status config.h
72
73 #
74 # Version header
75 #
76 VERSION = $(shell cat version)
77
78 version.h: version
79         echo "#define ZISOFS_TOOLS_VERSION \"$(VERSION)\"" > version.h
80
81 zisofs-tools.spec: zisofs-tools.spec.in version
82         sed -e 's/@@VERSION@@/$(VERSION)/g' < zisofs-tools.spec.in > $@
83
84 #
85 # Dependencies
86 #
87 mkzftree.o:     mkzftree.c mkzftree.h config.h version.h
88 workers.o:      workers.c mkzftree.h config.h
89 compress.o:     compress.c mkzftree.h config.h iso9660.h
90 copytime.o:     copytime.c mkzftree.h config.h
91 hash.o:         hash.c mkzftree.h config.h
92 iso9660.o:      iso9660.c iso9660.h
93 uncompress.o:   uncompress.c mkzftree.h config.h iso9660.h
94 util.o:         util.c mkzftree.h config.h
95 walk.o:         walk.c mkzftree.h config.h
96 workers.o:      workers.c mkzftree.h config.h