OpenBSD fix-up for new a.out targets. OpenBSD .s.o rule is busted...
[openssl.git] / crypto / sha / Makefile.ssl
1 #
2 # SSLeay/crypto/sha/Makefile
3 #
4
5 DIR=    sha
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 MAKEDEPPROG=    makedepend
16 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17 MAKEFILE=       Makefile.ssl
18 AR=             ar r
19
20 SHA1_ASM_OBJ=
21
22 CFLAGS= $(INCLUDES) $(CFLAG)
23 ASFLAGS= $(INCLUDES) $(ASFLAG)
24
25 GENERAL=Makefile
26 TEST=shatest.c sha1test.c sha256t.c sha512t.c
27 APPS=
28
29 LIB=$(TOP)/libcrypto.a
30 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
31 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
32
33 SRC= $(LIBSRC)
34
35 EXHEADER= sha.h
36 HEADER= sha_locl.h $(EXHEADER)
37
38 ALL=    $(GENERAL) $(SRC) $(HEADER)
39
40 top:
41         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43 all:    lib
44
45 lib:    $(LIBOBJ)
46         $(AR) $(LIB) $(LIBOBJ)
47         $(RANLIB) $(LIB) || echo Never mind.
48         @touch lib
49
50 # ELF
51 asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
52         (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
53 asm/s512sse2-elf.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
54         (cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
55 # COFF
56 asm/sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
57         (cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
58 asm/s512sse2-cof.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
59         (cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
60 # a.out
61 asm/sx86-out.o: asm/sha1-586.pl ../perlasm/x86asm.pl
62         (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
63 asm/s512sse2-out.o:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
64         (cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
65
66 asm/sha256-ia64.s: asm/sha512-ia64.pl
67         (cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))
68 asm/sha512-ia64.s: asm/sha512-ia64.pl
69         (cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))
70
71 files:
72         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
73
74 links:
75         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
76         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
77         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
78         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
79
80 install:
81         @for i in $(EXHEADER) ; \
82         do  \
83         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
84         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
85         done;
86
87 tags:
88         ctags $(SRC)
89
90 tests:
91
92 lint:
93         lint -DLINT $(INCLUDES) $(SRC)>fluff
94
95 depend:
96         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
97
98 dclean:
99         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
100         mv -f Makefile.new $(MAKEFILE)
101
102 clean:
103         rm -f asm/sx86unix.cpp asm/*.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
104
105 # DO NOT DELETE THIS LINE -- make depend depends on it.
106
107 sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
108 sha1_one.o: ../../include/openssl/opensslconf.h
109 sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
110 sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
111 sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
112 sha1_one.o: sha1_one.c
113 sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
114 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
115 sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
116 sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
117 sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
118 sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
119 sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
120 sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
121 sha512.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
122 sha512.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
123 sha512.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
124 sha512.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
125 sha512.o: ../../include/openssl/symhacks.h sha512.c
126 sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
127 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
128 sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
129 sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
130 sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
131 sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
132 sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
133 sha_one.o: ../../include/openssl/symhacks.h sha_one.c