HP-UX tune-up: new unified configs, HP C compiler bug workaround.
[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 # We let the C compiler driver to take care of .s files. This is done in
24 # order to be excused from maintaining a separate set of architecture
25 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
26 # gcc, then the driver will automatically translate it to -xarch=v8plus
27 # and pass it down to assembler.
28 AS=$(CC) -c
29 ASFLAGS=$(CFLAGS)
30
31 GENERAL=Makefile
32 TEST=md5test.c
33 APPS=md5.c
34
35 LIB=$(TOP)/libcrypto.a
36 LIBSRC=md5_dgst.c md5_one.c
37 LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ)
38
39 SRC= $(LIBSRC)
40
41 EXHEADER= md5.h
42 HEADER= md5_locl.h $(EXHEADER)
43
44 ALL=    $(GENERAL) $(SRC) $(HEADER)
45
46 top:
47         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49 all:    lib
50
51 lib:    $(LIBOBJ)
52         $(AR) $(LIB) $(LIBOBJ)
53         $(RANLIB) $(LIB)
54         @touch lib
55
56 # elf
57 asm/mx86-elf.o: asm/mx86unix.cpp
58         $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o
59
60 # solaris
61 asm/mx86-sol.o: asm/mx86unix.cpp
62         $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s
63         as -o asm/mx86-sol.o asm/mx86-sol.s
64         rm -f asm/mx86-sol.s
65
66 # a.out
67 asm/mx86-out.o: asm/mx86unix.cpp
68         $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o
69
70 # bsdi
71 asm/mx86bsdi.o: asm/mx86unix.cpp
72         $(CPP) -DBSDI asm/mx86unix.cpp | sed 's/ :/:/' | as -o asm/mx86bsdi.o
73
74 asm/mx86unix.cpp: asm/md5-586.pl
75         (cd asm; $(PERL) md5-586.pl cpp >mx86unix.cpp)
76
77 asm/md5-sparcv8plus.o: asm/md5-sparcv9.S
78         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
79                 -o asm/md5-sparcv8plus.o asm/md5-sparcv9.S
80
81 # Old GNU assembler doesn't understand V9 instructions, so we
82 # hire /usr/ccs/bin/as to do the job. Note that option is called
83 # *-gcc27, but even gcc 2>=8 users may experience similar problem
84 # if they didn't bother to upgrade GNU assembler. Such users should
85 # not choose this option, but be adviced to *remove* GNU assembler
86 # or upgrade it.
87 asm/md5-sparcv8plus-gcc27.o: asm/md5-sparcv9.S
88         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -E asm/md5-sparcv9.S | \
89                 /usr/ccs/bin/as -xarch=v8plus - -o asm/md5-sparcv8plus-gcc27.o
90
91 asm/md5-sparcv9.o: asm/md5-sparcv9.S
92         $(CC) $(ASFLAGS) -DMD5_BLOCK_DATA_ORDER -c \
93                 -o asm/md5-sparcv9.o asm/md5-sparcv9.S
94
95 files:
96         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
97
98 links:
99         @$(TOP)/util/point.sh Makefile.ssl Makefile
100         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
101         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
102         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
103
104 install:
105         @for i in $(EXHEADER) ; \
106         do  \
107         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
108         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
109         done;
110
111 tags:
112         ctags $(SRC)
113
114 tests:
115
116 lint:
117         lint -DLINT $(INCLUDES) $(SRC)>fluff
118
119 depend:
120         $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
121
122 dclean:
123         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
124         mv -f Makefile.new $(MAKEFILE)
125
126 clean:
127         rm -f asm/mx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
128
129 # DO NOT DELETE THIS LINE -- make depend depends on it.
130
131 md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
132 md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_locl.h
133 md5_one.o: ../../include/openssl/md5.h