1#
2# OpenSSL/crypto/blowfish/Makefile
3#
4
5DIR=	bf
6TOP=	../..
7CC=	cc
8CPP=	$(CC) -E
9INCLUDES=
10CFLAG=-g
11MAKEFILE=	Makefile
12AR=		ar r
13
14BF_ENC=		bf_enc.o
15# or use
16#DES_ENC=	bx86-elf.o
17
18CFLAGS= $(INCLUDES) $(CFLAG)
19ASFLAGS= $(INCLUDES) $(ASFLAG)
20AFLAGS= $(ASFLAGS)
21
22GENERAL=Makefile
23TEST=bftest.c
24APPS=
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
28LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
29
30SRC= $(LIBSRC)
31
32EXHEADER= blowfish.h
33HEADER=	bf_pi.h bf_locl.h $(EXHEADER)
34
35ALL=    $(GENERAL) $(SRC) $(HEADER)
36
37top:
38	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40all:	lib
41
42lib:	$(LIBOBJ)
43	$(ARX) $(LIB) $(LIBOBJ)
44	$(RANLIB) $(LIB) || echo Never mind.
45	@touch lib
46
47# ELF
48bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
49	(cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
50# COFF
51bx86-cof.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
52	(cd asm; $(PERL) bf-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
53# a.out
54bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
55	(cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
56
57files:
58	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
59
60links:
61	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
62	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
63	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64
65# We need to use force because 'install' matches 'INSTALL' on case
66# insensitive systems
67FRC.install:
68install: FRC.install
69	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
70	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
71	do  \
72	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
73	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
74	done;
75
76tags:
77	ctags $(SRC)
78
79tests:
80
81lint:
82	lint -DLINT $(INCLUDES) $(SRC)>fluff
83
84depend:
85	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
86	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
87
88dclean:
89	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
90	mv -f Makefile.new $(MAKEFILE)
91
92clean:
93	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
94
95# DO NOT DELETE THIS LINE -- make depend depends on it.
96
97bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
98bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
99bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
100bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
101bf_ecb.o: bf_ecb.c bf_locl.h
102bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
103bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
104bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
105bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
106bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h
107bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
108bf_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
109bf_skey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
110bf_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
111bf_skey.o: bf_locl.h bf_pi.h bf_skey.c
112