71adb3c38cf84062aa01f190ef962c56914c8e69
[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 AFLAGS= $(ASFLAGS)
25
26 GENERAL=Makefile
27 TEST=shatest.c sha1test.c sha256t.c sha512t.c
28 APPS=
29
30 LIB=$(TOP)/libcrypto.a
31 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
32 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
33
34 SRC= $(LIBSRC)
35
36 EXHEADER= sha.h
37 HEADER= sha_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 sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
53         (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
54 s512sse2-elf.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
55         (cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
56 # COFF
57 sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
58         (cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
59 s512sse2-cof.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
60         (cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
61 # a.out
62 sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
63         (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
64 s512sse2-out.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
65         (cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
66
67 sha1-ia64.s:   asm/sha1-ia64.pl
68         (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@
69 sha256-ia64.s: asm/sha512-ia64.pl
70         (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
71 sha512-ia64.s: asm/sha512-ia64.pl
72         (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
73
74 files:
75         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
76
77 links:
78         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
79         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
80         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
81         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
82
83 install:
84         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
85         do  \
86         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
87         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
88         done;
89
90 tags:
91         ctags $(SRC)
92
93 tests:
94
95 lint:
96         lint -DLINT $(INCLUDES) $(SRC)>fluff
97
98 depend:
99         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
100
101 dclean:
102         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
103         mv -f Makefile.new $(MAKEFILE)
104
105 clean:
106         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
107
108 # DO NOT DELETE THIS LINE -- make depend depends on it.
109
110 sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
111 sha1_one.o: ../../include/openssl/opensslconf.h
112 sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113 sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
114 sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
115 sha1_one.o: sha1_one.c
116 sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
117 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
118 sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
119 sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
120 sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
121 sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
122 sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
123 sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
124 sha512.o: ../../e_os.h ../../include/openssl/bio.h
125 sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
126 sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
127 sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
128 sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
129 sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
130 sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131 sha512.o: ../cryptlib.h sha512.c
132 sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
133 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
134 sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
135 sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
136 sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
137 sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
138 sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
139 sha_one.o: ../../include/openssl/symhacks.h sha_one.c