032760d54a745ceb3fa250bbd67a30b14dd6a6bd
[openssl.git] / crypto / md5 / Makefile.ssl
1 #
2 # SSLeay/crypto/md5/Makefile
3 #
4
5 DIR=    md5
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=-I.. -I$(TOP) -I../../include
10 CFLAG=-g
11 INSTALL_PREFIX=
12 OPENSSLDIR=     /usr/local/ssl
13 INSTALLTOP=/usr/local/ssl
14 MAKE=           make -f Makefile.ssl
15 MAKEDEPPROG=    makedepend
16 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17 MAKEFILE=       Makefile.ssl
18 AR=             ar r
19
20 MD5_ASM_OBJ=
21
22 CFLAGS= $(INCLUDES) $(CFLAG)
23 ASFLAGS= $(INCLUDES) $(ASFLAG)
24 AFLAGS= $(ASFLAGS)
25
26 GENERAL=Makefile
27 TEST=md5test.c
28 APPS=
29
30 LIB=$(TOP)/libcrypto.a
31 LIBSRC=md5_dgst.c md5_one.c
32 LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
33
34 SRC= $(LIBSRC)
35
36 EXHEADER= md5.h
37 HEADER= md5_locl.h $(EXHEADER)
38
39 ALL=    $(GENERAL) $(SRC) $(HEADER)
40
41 top:
42         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43
44 all:    lib
45
46 lib:    $(LIBOBJ)
47         $(AR) $(LIB) $(LIBOBJ)
48         $(RANLIB) $(LIB) || echo Never mind.
49         @touch lib
50
51 # ELF
52 asm/mx86-elf.s: asm/md5-586.pl ../perlasm/x86asm.pl
53         (cd asm; $(PERL) md5-586.pl elf $(CFLAGS) > ../$@)
54 # COFF
55 asm/mx86-cof.s: asm/md5-586.pl ../perlasm/x86asm.pl
56         (cd asm; $(PERL) md5-586.pl coff $(CFLAGS) > ../$@)
57 # a.out
58 mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
59         (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
60
61 asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
62         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
63                 -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
64
65 # Old GNU assembler doesn't understand V9 instructions, so we
66 # hire /usr/ccs/bin/as to do the job. Note that option is called
67 # *-gcc27, but even gcc 2>=8 users may experience similar problem
68 # if they didn't bother to upgrade GNU assembler. Such users should
69 # not choose this option, but be adviced to *remove* GNU assembler
70 # or upgrade it.
71 asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
72         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
73                 /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o
74
75 asm/md5-sparcv9.o: asm/md5-sparcv9.S
76         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
77                 -o asm/md5-sparcv9.o asm/md5-sparcv9.S
78
79 files:
80         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
81
82 links:
83         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
84         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
85         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
86         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
87
88 install:
89         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
90         do  \
91         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
92         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
93         done;
94
95 tags:
96         ctags $(SRC)
97
98 tests:
99
100 lint:
101         lint -DLINT $(INCLUDES) $(SRC)>fluff
102
103 depend:
104         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
105
106 dclean:
107         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
108         mv -f Makefile.new $(MAKEFILE)
109
110 clean:
111         rm -f asm/mx86unix.cpp asm/*.s asm/*.o *.s *.obj lib tags core .pure .nfs* *.old *.bak fluff
112
113 # DO NOT DELETE THIS LINE -- make depend depends on it.
114
115 md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md5.h
116 md5_dgst.o: ../../include/openssl/opensslconf.h
117 md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_dgst.c
118 md5_dgst.o: md5_locl.h
119 md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
120 md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
121 md5_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122 md5_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123 md5_one.o: ../../include/openssl/symhacks.h md5_one.c