1142425Snectar#
2160814Ssimon# OpenSSL/crypto/md5/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=    md5
6142425SnectarTOP=    ../..
7142425SnectarCC=     cc
8142425SnectarCPP=    $(CC) -E
9142425SnectarINCLUDES=-I.. -I$(TOP) -I../../include
10142425SnectarCFLAG=-g
11142425SnectarMAKEFILE=       Makefile
12142425SnectarAR=             ar r
13142425Snectar
14142425SnectarMD5_ASM_OBJ=
15142425Snectar
16142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
17142425SnectarASFLAGS= $(INCLUDES) $(ASFLAG)
18160814SsimonAFLAGS= $(ASFLAGS)
19142425Snectar
20142425SnectarGENERAL=Makefile
21142425SnectarTEST=md5test.c
22142425SnectarAPPS=
23142425Snectar
24142425SnectarLIB=$(TOP)/libcrypto.a
25142425SnectarLIBSRC=md5_dgst.c md5_one.c
26142425SnectarLIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
27142425Snectar
28142425SnectarSRC= $(LIBSRC)
29142425Snectar
30142425SnectarEXHEADER= md5.h
31142425SnectarHEADER= md5_locl.h $(EXHEADER)
32142425Snectar
33142425SnectarALL=    $(GENERAL) $(SRC) $(HEADER)
34142425Snectar
35142425Snectartop:
36142425Snectar	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
37142425Snectar
38142425Snectarall:    lib
39142425Snectar
40142425Snectarlib:    $(LIBOBJ)
41238405Sjkim	$(AR) $(LIB) $(LIBOBJ)
42142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
43142425Snectar	@touch lib
44142425Snectar
45238405Sjkimmd5-586.s:	asm/md5-586.pl ../perlasm/x86asm.pl
46238405Sjkim	$(PERL) asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
47142425Snectar
48238405Sjkimmd5-x86_64.s:	asm/md5-x86_64.pl
49238405Sjkim	$(PERL) asm/md5-x86_64.pl $(PERLASM_SCHEME) > $@
50160814Ssimon
51238405Sjkimmd5-ia64.s: asm/md5-ia64.S
52238405Sjkim	$(CC) $(CFLAGS) -E asm/md5-ia64.S | \
53238405Sjkim	$(PERL) -ne 's/;\s+/;\n/g; print;' > $@
54238405Sjkim
55290207Sjkimmd5-sparcv9.S:	asm/md5-sparcv9.pl
56290207Sjkim	$(PERL) asm/md5-sparcv9.pl $@ $(CFLAGS)
57290207Sjkim
58142425Snectarfiles:
59142425Snectar	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
60142425Snectar
61142425Snectarlinks:
62142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
63142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
64142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
65142425Snectar
66142425Snectarinstall:
67160814Ssimon	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
68160814Ssimon	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
69142425Snectar	do  \
70142425Snectar	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
71142425Snectar	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
72142425Snectar	done;
73142425Snectar
74142425Snectartags:
75142425Snectar	ctags $(SRC)
76142425Snectar
77142425Snectartests:
78142425Snectar
79142425Snectarlint:
80142425Snectar	lint -DLINT $(INCLUDES) $(SRC)>fluff
81142425Snectar
82284283Sjkimupdate: depend
83284283Sjkim
84142425Snectardepend:
85160814Ssimon	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
86142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
87142425Snectar
88142425Snectardclean:
89142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
90142425Snectar	mv -f Makefile.new $(MAKEFILE)
91142425Snectar
92142425Snectarclean:
93325335Sjkim	rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
94142425Snectar
95142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
96142425Snectar
97238405Sjkimmd5_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
98194206Ssimonmd5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
99194206Ssimonmd5_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
100194206Ssimonmd5_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
101194206Ssimonmd5_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h md5_dgst.c
102160814Ssimonmd5_dgst.o: md5_locl.h
103142425Snectarmd5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
104142425Snectarmd5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
105160814Ssimonmd5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
106160814Ssimonmd5_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
107160814Ssimonmd5_one.o: ../../include/openssl/symhacks.h md5_one.c
108