ed2a9e3dfaa62a38bb394f0c02b96b9fb01f02e2
[openssl.git] / crypto / modes / Makefile
1 #
2 # OpenSSL/crypto/modes/Makefile
3 #
4
5 DIR=    modes
6 TOP=    ../..
7 CC=     cc
8 INCLUDES= -I.. -I$(TOP) -I../../include
9 CFLAG=-g
10 MAKEFILE=       Makefile
11 AR=             ar r
12
13 MODES_ASM_OBJ=
14
15 CFLAGS= $(INCLUDES) $(CFLAG)
16 ASFLAGS= $(INCLUDES) $(ASFLAG)
17 AFLAGS= $(ASFLAGS)
18
19 GENERAL=Makefile
20
21 LIB=$(TOP)/libcrypto.a
22 LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
23         ccm128.c xts128.c wrap128.c ocb128.c
24 LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
25         ccm128.o xts128.o wrap128.o ocb128.o $(MODES_ASM_OBJ)
26
27 SRC= $(LIBSRC)
28
29 HEADER= modes_lcl.h
30
31 ALL=    $(GENERAL) $(SRC) $(HEADER)
32
33 top:
34         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
35
36 all:    lib
37
38 lib:    $(LIBOBJ)
39         $(AR) $(LIB) $(LIBOBJ)
40         $(RANLIB) $(LIB) || echo Never mind.
41         @touch lib
42
43 ghash-ia64.s:   asm/ghash-ia64.pl
44         $(PERL) asm/ghash-ia64.pl $@ $(CFLAGS)
45 ghash-x86.s:    asm/ghash-x86.pl
46         $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
47 ghash-x86_64.s: asm/ghash-x86_64.pl
48         $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
49 aesni-gcm-x86_64.s:     asm/aesni-gcm-x86_64.pl
50         $(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@
51 ghash-sparcv9.s:        asm/ghash-sparcv9.pl
52         $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
53 ghash-alpha.s:  asm/ghash-alpha.pl
54         (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
55         $(PERL) asm/ghash-alpha.pl > $$preproc && \
56         $(CC) -E -P $$preproc > $@ && rm $$preproc)
57 ghash-parisc.s: asm/ghash-parisc.pl
58         $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
59 ghashv8-armx.S: asm/ghashv8-armx.pl
60         $(PERL) asm/ghashv8-armx.pl $(PERLASM_SCHEME) $@
61 ghashp8-ppc.s:  asm/ghashp8-ppc.pl
62         $(PERL) asm/ghashp8-ppc.pl $(PERLASM_SCHEME) $@
63
64 # GNU make "catch all"
65 ghash-%.S:      asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
66
67 ghash-armv4.o:  ghash-armv4.S
68 ghashv8-armx.o: ghashv8-armx.S
69
70 files:
71         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
72
73 tags:
74         ctags $(SRC)
75
76 tests:
77
78 lint:
79         lint -DLINT $(INCLUDES) $(SRC)>fluff
80
81 depend:
82         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
83         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
84
85 dclean:
86         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
87         mv -f Makefile.new $(MAKEFILE)
88
89 clean:
90         rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
91
92 # DO NOT DELETE THIS LINE -- make depend depends on it.
93
94 cbc128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
95 cbc128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
96 cbc128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
97 cbc128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
98 cbc128.o: ../../include/openssl/symhacks.h cbc128.c modes_lcl.h
99 ccm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
100 ccm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
101 ccm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
102 ccm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
103 ccm128.o: ../../include/openssl/symhacks.h ccm128.c modes_lcl.h
104 cfb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
105 cfb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
106 cfb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107 cfb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
108 cfb128.o: ../../include/openssl/symhacks.h cfb128.c modes_lcl.h
109 ctr128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
110 ctr128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
111 ctr128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
112 ctr128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
113 ctr128.o: ../../include/openssl/symhacks.h ctr128.c modes_lcl.h
114 cts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
115 cts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
116 cts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
117 cts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
118 cts128.o: ../../include/openssl/symhacks.h cts128.c modes_lcl.h
119 gcm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
120 gcm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
121 gcm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122 gcm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123 gcm128.o: ../../include/openssl/symhacks.h gcm128.c modes_lcl.h
124 ocb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
125 ocb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
126 ocb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
127 ocb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
128 ocb128.o: ../../include/openssl/symhacks.h modes_lcl.h ocb128.c
129 ofb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
130 ofb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
131 ofb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
132 ofb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
133 ofb128.o: ../../include/openssl/symhacks.h modes_lcl.h ofb128.c
134 wrap128.o: ../../e_os.h ../../include/openssl/bio.h
135 wrap128.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
136 wrap128.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
137 wrap128.o: ../../include/openssl/lhash.h ../../include/openssl/modes.h
138 wrap128.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
139 wrap128.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
140 wrap128.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
141 wrap128.o: ../cryptlib.h wrap128.c
142 xts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
143 xts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
144 xts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
145 xts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
146 xts128.o: ../../include/openssl/symhacks.h modes_lcl.h xts128.c