54f9921584e164973ecebeca17174c6cb7c58441
[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) > sx86-elf.s)
53 asm/s512sse2-elf.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
54         (cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > s512sse2-elf.s)
55
56 # a.out
57 asm/sx86-out.o: asm/sx86unix.cpp
58         $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
59
60 # bsdi
61 asm/sx86bsdi.o: asm/sx86unix.cpp
62         $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
63
64 asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl
65         (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
66
67 files:
68         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
69
70 links:
71         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
72         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
73         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
74         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
75
76 install:
77         @for i in $(EXHEADER) ; \
78         do  \
79         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
80         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81         done;
82
83 tags:
84         ctags $(SRC)
85
86 tests:
87
88 lint:
89         lint -DLINT $(INCLUDES) $(SRC)>fluff
90
91 depend:
92         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
93
94 dclean:
95         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
96         mv -f Makefile.new $(MAKEFILE)
97
98 clean:
99         rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
100
101 # DO NOT DELETE THIS LINE -- make depend depends on it.
102
103 sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
104 sha1_one.o: ../../include/openssl/opensslconf.h
105 sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
106 sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
107 sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
108 sha1_one.o: sha1_one.c
109 sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
110 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
111 sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
112 sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
113 sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
114 sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
115 sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
116 sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
117 sha512.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
118 sha512.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
119 sha512.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
120 sha512.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
121 sha512.o: ../../include/openssl/symhacks.h sha512.c
122 sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
123 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
124 sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
125 sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
126 sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
127 sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
128 sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
129 sha_one.o: ../../include/openssl/symhacks.h sha_one.c