Fix gcc 4.8 warning (strict aliasing violation).
[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 CFLAGS += -fno-strict-aliasing
20
21 GENERAL=Makefile
22 TEST=
23 APPS=
24
25 LIB=$(TOP)/libcrypto.a
26 LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
27         ccm128.c xts128.c
28 LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
29         ccm128.o xts128.o $(MODES_ASM_OBJ)
30
31 SRC= $(LIBSRC)
32
33 #EXHEADER= store.h str_compat.h
34 EXHEADER= modes.h
35 HEADER= modes_lcl.h $(EXHEADER)
36
37 ALL=    $(GENERAL) $(SRC) $(HEADER)
38
39 top:
40         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42 all:    lib
43
44 lib:    $(LIBOBJ)
45         $(ARX) $(LIB) $(LIBOBJ)
46         $(RANLIB) $(LIB) || echo Never mind.
47         @touch lib
48
49 ghash-ia64.s:   asm/ghash-ia64.pl
50         $(PERL) asm/ghash-ia64.pl $@ $(CFLAGS)
51 ghash-x86.s:    asm/ghash-x86.pl
52         $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
53 ghash-x86_64.s: asm/ghash-x86_64.pl
54         $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
55 ghash-sparcv9.s:        asm/ghash-sparcv9.pl
56         $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
57 ghash-alpha.s:  asm/ghash-alpha.pl
58         $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
59 ghash-parisc.s: asm/ghash-parisc.pl
60         $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
61
62 # GNU make "catch all"
63 ghash-%.S:      asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
64
65 ghash-armv4.o:  ghash-armv4.S
66
67 files:
68         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
69
70 links:
71         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74
75 install:
76         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
77         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
78         do  \
79         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
80         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81         done;
82
83 tags:
84         ctags $(SRC)
85
86 tests:
87
88 lint:
89         lint -DLINT $(INCLUDES) $(SRC)>fluff
90
91 depend:
92         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
93         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
94
95 dclean:
96         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
97         mv -f Makefile.new $(MAKEFILE)
98
99 clean:
100         rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
101
102 # DO NOT DELETE THIS LINE -- make depend depends on it.
103
104 cbc128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
105 cbc128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
106 cbc128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
107 cbc128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
108 cbc128.o: ../../include/openssl/symhacks.h cbc128.c modes_lcl.h
109 ccm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
110 ccm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
111 ccm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
112 ccm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
113 ccm128.o: ../../include/openssl/symhacks.h ccm128.c modes_lcl.h
114 cfb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
115 cfb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
116 cfb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
117 cfb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
118 cfb128.o: ../../include/openssl/symhacks.h cfb128.c modes_lcl.h
119 ctr128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
120 ctr128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
121 ctr128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122 ctr128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123 ctr128.o: ../../include/openssl/symhacks.h ctr128.c modes_lcl.h
124 cts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
125 cts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
126 cts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
127 cts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
128 cts128.o: ../../include/openssl/symhacks.h cts128.c modes_lcl.h
129 gcm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
130 gcm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
131 gcm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
132 gcm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
133 gcm128.o: ../../include/openssl/symhacks.h gcm128.c modes_lcl.h
134 ofb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
135 ofb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
136 ofb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
137 ofb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
138 ofb128.o: ../../include/openssl/symhacks.h modes_lcl.h ofb128.c
139 xts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
140 xts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
141 xts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
142 xts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
143 xts128.o: ../../include/openssl/symhacks.h modes_lcl.h xts128.c