1#
2# SSLeay/fips/des/Makefile
3#
4
5DIR=	des
6TOP=	../..
7CC=	cc
8INCLUDES=
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR=     /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKEDEPPROG=	makedepend
14MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
15MAKEFILE=	Makefile
16AR=		ar r
17
18FIPS_DES_ENC=fips_des_enc.o
19
20CFLAGS= $(INCLUDES) $(CFLAG)
21
22GENERAL=Makefile
23TEST= fips_desmovs.c
24APPS=
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC=fips_des_enc.c asm/fips-dx86-elf.s fips_des_selftest.c fips_set_key.c
28LIBOBJ=$(FIPS_DES_ENC) fips_des_selftest.o fips_set_key.o
29
30SRC= $(LIBSRC)
31
32EXHEADER=
33HEADER=	$(EXHEADER) fips_des_locl.h
34
35ALL=    $(GENERAL) $(SRC) $(HEADER)
36
37top:
38	(cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all)
39
40all:	check lib
41
42check:
43	TOP=`pwd`/$(TOP) ../fips_check_sha1 fingerprint.sha1 $(SRC) $(HEADER)
44
45lib:	$(LIBOBJ)
46	$(AR) $(LIB) $(LIBOBJ)
47	$(RANLIB) $(LIB) || echo Never mind.
48	@sleep 2; touch lib
49
50files:
51	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
52
53links:
54	@$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
55	@$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
56	@$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
57
58install:
59	@headerlist="$(EXHEADER)"; for i in $$headerlist; \
60	do  \
61	  (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62	  chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63	done
64
65tags:
66	ctags $(SRC)
67
68tests:
69
70top_fips_desmovs:
71	(cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) TARGET=fips_desmovs sub_target)
72
73fips_desmovs: fips_desmovs.o $(TOP)/libcrypto.a
74	$(CC) $(CFLAGS) -o fips_desmovs fips_desmovs.o $(PEX_LIBS) $(TOP)/libcrypto.a $(EX_LIBS)
75	TOP=$(TOP) $(TOP)/fips/openssl_fips_fingerprint $(TOP)/libcrypto.a fips_desmovs
76
77fips_test: top_fips_desmovs
78	find ../testvectors/des/req -name '*.req' > testlist
79	-rm -rf ../testvectors/des/rsp
80	mkdir ../testvectors/des/rsp
81	./fips_desmovs -d testlist
82	find ../testvectors/des2/req -name '*.req' > testlist
83	-rm -rf ../testvectors/des2/rsp
84	mkdir ../testvectors/des2/rsp
85	./fips_desmovs -d testlist
86	find ../testvectors/des3/req -name '*.req' > testlist
87	-rm -rf ../testvectors/des3/rsp
88	mkdir ../testvectors/des3/rsp
89	./fips_desmovs -d testlist
90
91lint:
92	lint -DLINT $(INCLUDES) $(SRC)>fluff
93
94depend:
95	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) \
96		$(SRC) $(TEST)
97dclean:
98	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
99	mv -f Makefile.new $(MAKEFILE)
100
101clean:
102	rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
103# DO NOT DELETE THIS LINE -- make depend depends on it.
104
105fips_des_enc.o: ../../e_os.h ../../include/openssl/crypto.h
106fips_des_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
107fips_des_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
108fips_des_enc.o: ../../include/openssl/opensslconf.h
109fips_des_enc.o: ../../include/openssl/opensslv.h
110fips_des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
111fips_des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
112fips_des_enc.o: ../../include/openssl/ui_compat.h fips_des_enc.c
113fips_des_enc.o: fips_des_locl.h
114fips_des_selftest.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
115fips_des_selftest.o: ../../include/openssl/des.h
116fips_des_selftest.o: ../../include/openssl/des_old.h
117fips_des_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
118fips_des_selftest.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
119fips_des_selftest.o: ../../include/openssl/opensslconf.h
120fips_des_selftest.o: ../../include/openssl/opensslv.h
121fips_des_selftest.o: ../../include/openssl/safestack.h
122fips_des_selftest.o: ../../include/openssl/stack.h
123fips_des_selftest.o: ../../include/openssl/symhacks.h
124fips_des_selftest.o: ../../include/openssl/ui.h
125fips_des_selftest.o: ../../include/openssl/ui_compat.h fips_des_selftest.c
126fips_desmovs.o: ../../e_os.h ../../include/openssl/aes.h
127fips_desmovs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
128fips_desmovs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
129fips_desmovs.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
130fips_desmovs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
131fips_desmovs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
132fips_desmovs.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
133fips_desmovs.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
134fips_desmovs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
135fips_desmovs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
136fips_desmovs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
137fips_desmovs.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
138fips_desmovs.o: ../../include/openssl/opensslconf.h
139fips_desmovs.o: ../../include/openssl/opensslv.h
140fips_desmovs.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h
141fips_desmovs.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
142fips_desmovs.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
143fips_desmovs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
144fips_desmovs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
145fips_desmovs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
146fips_desmovs.o: fips_desmovs.c
147fips_set_key.o: ../../e_os.h ../../include/openssl/crypto.h
148fips_set_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
149fips_set_key.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
150fips_set_key.o: ../../include/openssl/opensslconf.h
151fips_set_key.o: ../../include/openssl/opensslv.h
152fips_set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
153fips_set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
154fips_set_key.o: ../../include/openssl/ui_compat.h fips_des_locl.h
155fips_set_key.o: fips_set_key.c
156