RFC 3161 compliant time stamp request creation, response generation
[oweals/openssl.git] / crypto / sha / Makefile
1 #
2 # OpenSSL/crypto/sha/Makefile
3 #
4
5 DIR=    sha
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=
10 CFLAG=-g
11 MAKEFILE=       Makefile
12 AR=             ar r
13
14 SHA1_ASM_OBJ=
15
16 CFLAGS= $(INCLUDES) $(CFLAG)
17 ASFLAGS= $(INCLUDES) $(ASFLAG)
18 AFLAGS= $(ASFLAGS)
19
20 GENERAL=Makefile
21 TEST=shatest.c sha1test.c sha256t.c sha512t.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
26 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
27
28 SRC= $(LIBSRC)
29
30 EXHEADER= sha.h
31 HEADER= sha_locl.h $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         $(AR) $(LIB) $(LIBOBJ)
42         $(RANLIB) $(LIB) || echo Never mind.
43         @touch lib
44
45 # ELF
46 sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
47         (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
48 s512sse2-elf.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl
49         (cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
50 # COFF
51 sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
52         (cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
53 s512sse2-cof.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
54         (cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
55 # a.out
56 sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
57         (cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
58 s512sse2-out.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
59         (cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
60
61 sha1-ia64.s:   asm/sha1-ia64.pl
62         (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@
63 sha256-ia64.s: asm/sha512-ia64.pl
64         (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
65 sha512-ia64.s: asm/sha512-ia64.pl
66         (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
67 sha256-x86_64.s: asm/sha512-x86_64.pl
68         $(PERL) asm/sha512-x86_64.pl $@
69 sha512-x86_64.s: asm/sha512-x86_64.pl
70         $(PERL) asm/sha512-x86_64.pl $@
71
72 files:
73         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
74
75 links:
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         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
82         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
83         do  \
84         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
85         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
86         done;
87
88 tags:
89         ctags $(SRC)
90
91 tests:
92
93 lint:
94         lint -DLINT $(INCLUDES) $(SRC)>fluff
95
96 depend:
97         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
98         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
99
100 dclean:
101         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
102         mv -f Makefile.new $(MAKEFILE)
103
104 clean:
105         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
106
107 # DO NOT DELETE THIS LINE -- make depend depends on it.
108
109 sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
110 sha1_one.o: ../../include/openssl/opensslconf.h
111 sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
112 sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
113 sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
114 sha1_one.o: sha1_one.c
115 sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
116 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
117 sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
118 sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
119 sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
120 sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
121 sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
122 sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
123 sha512.o: ../../e_os.h ../../include/openssl/bio.h
124 sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
125 sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
126 sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
127 sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
128 sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
129 sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
130 sha512.o: ../cryptlib.h sha512.c
131 sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
132 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
133 sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
134 sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
135 sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
136 sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
137 sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138 sha_one.o: ../../include/openssl/symhacks.h sha_one.c