1142425Snectar#
2142425Snectar# crypto/aes/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=	aes
6142425SnectarTOP=	../..
7142425SnectarCC=	cc
8142425SnectarCPP=	$(CC) -E
9142425SnectarINCLUDES=
10142425SnectarCFLAG=-g
11142425SnectarMAKEFILE=	Makefile
12142425SnectarAR=		ar r
13142425Snectar
14238405SjkimAES_ENC=aes_core.o aes_cbc.o
15160814Ssimon
16142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
17160814SsimonASFLAGS= $(INCLUDES) $(ASFLAG)
18160814SsimonAFLAGS= $(ASFLAGS)
19142425Snectar
20142425SnectarGENERAL=Makefile
21142425Snectar#TEST=aestest.c
22142425SnectarTEST=
23142425SnectarAPPS=
24142425Snectar
25142425SnectarLIB=$(TOP)/libcrypto.a
26162911SsimonLIBSRC=aes_core.c aes_misc.c aes_ecb.c aes_cbc.c aes_cfb.c aes_ofb.c \
27194206Ssimon       aes_ctr.c aes_ige.c aes_wrap.c
28194206SsimonLIBOBJ=aes_misc.o aes_ecb.o aes_cfb.o aes_ofb.o aes_ctr.o aes_ige.o aes_wrap.o \
29238405Sjkim       $(AES_ENC)
30142425Snectar
31142425SnectarSRC= $(LIBSRC)
32142425Snectar
33142425SnectarEXHEADER= aes.h
34142425SnectarHEADER= aes_locl.h $(EXHEADER)
35142425Snectar
36142425SnectarALL=    $(GENERAL) $(SRC) $(HEADER)
37142425Snectar
38142425Snectartop:
39142425Snectar	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
40142425Snectar
41142425Snectarall:	lib
42142425Snectar
43142425Snectarlib:	$(LIBOBJ)
44238405Sjkim	$(AR) $(LIB) $(LIBOBJ)
45142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
46142425Snectar	@touch lib
47142425Snectar
48160814Ssimonaes-ia64.s: asm/aes-ia64.S
49160814Ssimon	$(CC) $(CFLAGS) -E asm/aes-ia64.S > $@
50160814Ssimon
51238405Sjkimaes-586.s:	asm/aes-586.pl ../perlasm/x86asm.pl
52238405Sjkim	$(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
53238405Sjkimvpaes-x86.s:	asm/vpaes-x86.pl ../perlasm/x86asm.pl
54238405Sjkim	$(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
55238405Sjkimaesni-x86.s:	asm/aesni-x86.pl ../perlasm/x86asm.pl
56238405Sjkim	$(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
57160814Ssimon
58194206Ssimonaes-x86_64.s: asm/aes-x86_64.pl
59238405Sjkim	$(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
60238405Sjkimvpaes-x86_64.s:	asm/vpaes-x86_64.pl
61238405Sjkim	$(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
62238405Sjkimbsaes-x86_64.s:	asm/bsaes-x86_64.pl
63238405Sjkim	$(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
64238405Sjkimaesni-x86_64.s: asm/aesni-x86_64.pl
65238405Sjkim	$(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
66238405Sjkimaesni-sha1-x86_64.s:	asm/aesni-sha1-x86_64.pl
67238405Sjkim	$(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
68194206Ssimon
69238405Sjkimaes-sparcv9.s: asm/aes-sparcv9.pl
70238405Sjkim	$(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
71238405Sjkim
72238405Sjkimaes-ppc.s:	asm/aes-ppc.pl
73238405Sjkim	$(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
74238405Sjkim
75238405Sjkimaes-parisc.s:	asm/aes-parisc.pl
76238405Sjkim	$(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
77238405Sjkim
78238405Sjkimaes-mips.S:	asm/aes-mips.pl
79238405Sjkim	$(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
80238405Sjkim
81238405Sjkim# GNU make "catch all"
82238405Sjkimaes-%.S:	asm/aes-%.pl;	$(PERL) $< $(PERLASM_SCHEME) > $@
83238405Sjkimaes-armv4.o:	aes-armv4.S
84238405Sjkim
85142425Snectarfiles:
86142425Snectar	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
87142425Snectar
88142425Snectarlinks:
89142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
90142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
91142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
92142425Snectar
93160814Ssimoninstall:
94160814Ssimon	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
95160814Ssimon	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
96142425Snectar	do  \
97142425Snectar	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
98142425Snectar	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
99142425Snectar	done;
100142425Snectar
101142425Snectartags:
102142425Snectar	ctags $(SRC)
103142425Snectar
104142425Snectartests:
105142425Snectar
106142425Snectarlint:
107142425Snectar	lint -DLINT $(INCLUDES) $(SRC)>fluff
108142425Snectar
109284285Sjkimupdate: depend
110284285Sjkim
111142425Snectardepend:
112160814Ssimon	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
113142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
114142425Snectar
115142425Snectardclean:
116142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
117142425Snectar	mv -f Makefile.new $(MAKEFILE)
118142425Snectar
119142425Snectarclean:
120160814Ssimon	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
121142425Snectar
122142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
123142425Snectar
124238405Sjkimaes_cbc.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
125238405Sjkimaes_cbc.o: ../../include/openssl/opensslconf.h aes_cbc.c
126238405Sjkimaes_cfb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
127238405Sjkimaes_cfb.o: ../../include/openssl/opensslconf.h aes_cfb.c
128142425Snectaraes_core.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
129238405Sjkimaes_core.o: ../../include/openssl/opensslconf.h aes_core.c aes_locl.h
130238405Sjkimaes_ctr.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
131238405Sjkimaes_ctr.o: ../../include/openssl/opensslconf.h aes_ctr.c
132142425Snectaraes_ecb.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h
133142425Snectaraes_ecb.o: ../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
134167612Ssimonaes_ige.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/bio.h
135167612Ssimonaes_ige.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
136167612Ssimonaes_ige.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
137167612Ssimonaes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
138167612Ssimonaes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
139167612Ssimonaes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
140167612Ssimonaes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
141238405Sjkimaes_misc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
142238405Sjkimaes_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
143238405Sjkimaes_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
144238405Sjkimaes_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
145238405Sjkimaes_misc.o: ../../include/openssl/symhacks.h aes_locl.h aes_misc.c
146238405Sjkimaes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
147238405Sjkimaes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c
148194206Ssimonaes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
149194206Ssimonaes_wrap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
150194206Ssimonaes_wrap.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
151194206Ssimonaes_wrap.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
152194206Ssimonaes_wrap.o: ../../include/openssl/opensslconf.h
153194206Ssimonaes_wrap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
154194206Ssimonaes_wrap.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
155194206Ssimonaes_wrap.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_wrap.c
156