b9e658feacf55b89f9b6d77a0f9fad26b6690bad
[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=
10 CFLAG=-g
11 INSTALL_PREFIX=
12 OPENSSLDIR=     /usr/local/ssl
13 INSTALLTOP=/usr/local/ssl
14 MAKE=           make -f Makefile.ssl
15 MAKEDEPEND=     $(TOP)/util/domd $(TOP)
16 MAKEFILE=       Makefile.ssl
17 AR=             ar r
18
19 MD5_ASM_OBJ=
20
21 CFLAGS= $(INCLUDES) $(CFLAG)
22
23 GENERAL=Makefile
24 TEST=md5test.c
25 APPS=md5.c
26
27 LIB=$(TOP)/libcrypto.a
28 LIBSRC=md5_dgst.c md5_one.c
29 LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
30
31 SRC= $(LIBSRC)
32
33 EXHEADER= md5.h
34 HEADER= md5_locl.h $(EXHEADER)
35
36 ALL=    $(GENERAL) $(SRC) $(HEADER)
37
38 top:
39         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
40
41 all:    lib
42
43 lib:    $(LIBOBJ)
44         $(AR) $(LIB) $(LIBOBJ)
45         $(RANLIB) $(LIB)
46         @touch lib
47
48 # elf
49 asm/mx86-elf.o: asm/mx86unix.cpp
50         $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o
51
52 # solaris
53 asm/mx86-sol.o: asm/mx86unix.cpp
54         $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s
55         as -o asm/mx86-sol.o asm/mx86-sol.s
56         rm -f asm/mx86-sol.s
57
58 # a.out
59 asm/mx86-out.o: asm/mx86unix.cpp
60         $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
61
62 # bsdi
63 asm/mx86bsdi.o: asm/mx86unix.cpp
64         $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o
65
66 asm/mx86unix.cpp: asm/md5-586.pl
67         (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
68
69 # works for both SC and gcc
70 # (PATH is changed because /usr/ccs/bin/as knows opcodes we need
71 # that GNU as has never heard of)
72 asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
73         $(CPP) -DULTRASPARC -DMD5_BLOCK_DATA_ORDER asm/md5-sparcv9.S | \
74         PATH=/usr/ccs/bin:$(PATH) as -xarch=v8plus /dev/fd/0 -o asm/md5-sparcv8plus.o
75
76 asm/md5-sparcv9.o: asm/md5-sparcv9.S
77         PATH=/usr/ccs/bin:$(PATH) $(CC) -xarch=v9 -DULTRASPARC -DMD5_BLOCK_DATA_ORDER -c asm/md5-sparcv9.S -o asm/md5-sparcv9.o
78
79
80 files:
81         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
82
83 links:
84         @$(TOP)/util/point.sh Makefile.ssl Makefile
85         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
86         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
87         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
88
89 install:
90         @for i in $(EXHEADER) ; \
91         do  \
92         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
93         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
94         done;
95
96 tags:
97         ctags $(SRC)
98
99 tests:
100
101 lint:
102         lint -DLINT $(INCLUDES) $(SRC)>fluff
103
104 depend:
105         $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
106
107 dclean:
108         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
109         mv -f Makefile.new $(MAKEFILE)
110
111 clean:
112         rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
113
114 # DO NOT DELETE THIS LINE -- make depend depends on it.
115
116 md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslv.h
117 md5_dgst.o: ../md32_common.h md5_locl.h
118 md5_one.o: ../../include/openssl/md5.h