Fool-proofing Makefiles
[oweals/openssl.git] / crypto / comp / Makefile
1 #
2 # SSLeay/crypto/comp/Makefile
3 #
4
5 DIR=    comp
6 TOP=    ../..
7 CC=     cc
8 INCLUDES= -I.. -I$(TOP) -I../../include
9 CFLAG=-g
10 MAKEDEPPROG=    makedepend
11 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
12 MAKEFILE=       Makefile
13 AR=             ar r
14
15 CFLAGS= $(INCLUDES) $(CFLAG)
16
17 GENERAL=Makefile
18 TEST=
19 APPS=
20
21 LIB=$(TOP)/libcrypto.a
22 LIBSRC= comp_lib.c comp_err.c \
23         c_rle.c c_zlib.c
24
25 LIBOBJ= comp_lib.o comp_err.o \
26         c_rle.o c_zlib.o
27
28 SRC= $(LIBSRC)
29
30 EXHEADER= comp.h
31 HEADER= $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         $(AR) $(LIB) $(LIBOBJ)
42         $(RANLIB) $(LIB) || echo Never mind.
43         @touch lib
44
45 files:
46         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
47
48 links:
49         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
50         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
51         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
52
53 install:
54         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
55         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
56         do  \
57         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
58         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
59         done;
60
61 tags:
62         ctags $(SRC)
63
64 tests:
65
66 lint:
67         lint -DLINT $(INCLUDES) $(SRC)>fluff
68
69 depend:
70         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
71
72 dclean:
73         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
74         mv -f Makefile.new $(MAKEFILE)
75
76 clean:
77         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
78
79 # DO NOT DELETE THIS LINE -- make depend depends on it.
80
81 c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
82 c_rle.o: ../../include/openssl/comp.h ../../include/openssl/crypto.h
83 c_rle.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
84 c_rle.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
85 c_rle.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
86 c_rle.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
87 c_rle.o: ../../include/openssl/symhacks.h c_rle.c
88 c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
89 c_zlib.o: ../../include/openssl/comp.h ../../include/openssl/crypto.h
90 c_zlib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
91 c_zlib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
92 c_zlib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
93 c_zlib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
94 c_zlib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
95 c_zlib.o: ../../include/openssl/symhacks.h c_zlib.c
96 comp_err.o: ../../include/openssl/bio.h ../../include/openssl/comp.h
97 comp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
98 comp_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
99 comp_err.o: ../../include/openssl/opensslconf.h
100 comp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
101 comp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
102 comp_err.o: ../../include/openssl/symhacks.h comp_err.c
103 comp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
104 comp_lib.o: ../../include/openssl/comp.h ../../include/openssl/crypto.h
105 comp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
106 comp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
107 comp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
108 comp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
109 comp_lib.o: ../../include/openssl/symhacks.h comp_lib.c