]>
Commit | Line | Data |
---|---|---|
d02b48c6 | 1 | # |
15ac9716 | 2 | # OpenSSL/crypto/sha/Makefile |
d02b48c6 RE |
3 | # |
4 | ||
58964a49 RE |
5 | DIR= sha |
6 | TOP= ../.. | |
7 | CC= cc | |
623bb80b | 8 | CPP= $(CC) -E |
d02b48c6 RE |
9 | INCLUDES= |
10 | CFLAG=-g | |
42ba5d23 | 11 | MAKEFILE= Makefile |
58964a49 RE |
12 | AR= ar r |
13 | ||
14 | SHA1_ASM_OBJ= | |
d02b48c6 RE |
15 | |
16 | CFLAGS= $(INCLUDES) $(CFLAG) | |
fda5e385 | 17 | ASFLAGS= $(INCLUDES) $(ASFLAG) |
16760a30 | 18 | AFLAGS= $(ASFLAGS) |
d02b48c6 RE |
19 | |
20 | GENERAL=Makefile | |
63077bd4 | 21 | TEST=shatest.c sha1test.c sha256t.c sha512t.c |
d02b48c6 RE |
22 | APPS= |
23 | ||
24 | LIB=$(TOP)/libcrypto.a | |
63077bd4 AP |
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) | |
d02b48c6 RE |
27 | |
28 | SRC= $(LIBSRC) | |
29 | ||
30 | EXHEADER= sha.h | |
58964a49 | 31 | HEADER= sha_locl.h $(EXHEADER) |
d02b48c6 RE |
32 | |
33 | ALL= $(GENERAL) $(SRC) $(HEADER) | |
34 | ||
35 | top: | |
36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | |
37 | ||
58964a49 | 38 | all: lib |
d02b48c6 | 39 | |
58964a49 | 40 | lib: $(LIBOBJ) |
d02b48c6 | 41 | $(AR) $(LIB) $(LIBOBJ) |
4e20b1a6 | 42 | $(RANLIB) $(LIB) || echo Never mind. |
d02b48c6 RE |
43 | @touch lib |
44 | ||
ec38ddc7 | 45 | # ELF |
67ea999d | 46 | sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl |
ec38ddc7 | 47 | (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@) |
67ea999d | 48 | s512sse2-elf.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl |
ec38ddc7 AP |
49 | (cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > ../$@) |
50 | # COFF | |
67ea999d | 51 | sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl |
ec38ddc7 | 52 | (cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@) |
67ea999d | 53 | s512sse2-cof.s: asm/sha512-sse2.pl ../perlasm/x86asm.pl |
ec38ddc7 | 54 | (cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@) |
58964a49 | 55 | # a.out |
16760a30 AP |
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) > ../$@) | |
58964a49 | 60 | |
67ea999d | 61 | sha1-ia64.s: asm/sha1-ia64.pl |
905fd45b | 62 | (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@ |
67ea999d | 63 | sha256-ia64.s: asm/sha512-ia64.pl |
bc3e7fab | 64 | (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS)) |
67ea999d | 65 | sha512-ia64.s: asm/sha512-ia64.pl |
bc3e7fab | 66 | (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS)) |
ba3b2f15 AP |
67 | sha1-x86_64.s: asm/sha1-x86_64.pl |
68 | $(PERL) asm/sha1-x86_64.pl $@ | |
612a9111 AP |
69 | sha256-x86_64.s: asm/sha512-x86_64.pl |
70 | $(PERL) asm/sha512-x86_64.pl $@ | |
71 | sha512-x86_64.s: asm/sha512-x86_64.pl | |
72 | $(PERL) asm/sha512-x86_64.pl $@ | |
33c3ecf7 | 73 | |
a9c32ace AP |
74 | sha1-ppc_aix32.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@ |
75 | sha1-ppc_aix64.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@ | |
76 | # non-AIX targets are believed to be armed with GNU make | |
77 | sha1-ppc_%.s: asm/sha1-ppc.pl; $(PERL) $< $@ | |
78 | ||
d02b48c6 | 79 | files: |
42ba5d23 | 80 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
d02b48c6 RE |
81 | |
82 | links: | |
1314c344 BM |
83 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) |
84 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | |
85 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | |
d02b48c6 RE |
86 | |
87 | install: | |
81a86fcf | 88 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... |
a2ac429d | 89 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ |
d02b48c6 | 90 | do \ |
e5f3045f BM |
91 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
92 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | |
d02b48c6 RE |
93 | done; |
94 | ||
95 | tags: | |
96 | ctags $(SRC) | |
97 | ||
98 | tests: | |
99 | ||
100 | lint: | |
101 | lint -DLINT $(INCLUDES) $(SRC)>fluff | |
102 | ||
103 | depend: | |
ce92b6eb | 104 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... |
001ab3ab | 105 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
d02b48c6 RE |
106 | |
107 | dclean: | |
99aab161 | 108 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
d02b48c6 RE |
109 | mv -f Makefile.new $(MAKEFILE) |
110 | ||
111 | clean: | |
67ea999d | 112 | rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
d02b48c6 | 113 | |
d02b48c6 | 114 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
6242bb9c | 115 | |
ce92b6eb AP |
116 | sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
117 | sha1_one.o: ../../include/openssl/opensslconf.h | |
118 | sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | |
119 | sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | |
120 | sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | |
9c52d2cc | 121 | sha1_one.o: sha1_one.c |
ce92b6eb AP |
122 | sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h |
123 | sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h | |
124 | sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h | |
125 | sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | |
126 | sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | |
127 | sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | |
128 | sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | |
129 | sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c | |
130 | sha512.o: ../../e_os.h ../../include/openssl/bio.h | |
131 | sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | |
132 | sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | |
133 | sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | |
134 | sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | |
135 | sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | |
136 | sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | |
137 | sha512.o: ../cryptlib.h sha512.c | |
138 | sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h | |
139 | sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h | |
140 | sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h | |
141 | sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | |
142 | sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | |
143 | sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | |
144 | sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | |
145 | sha_one.o: ../../include/openssl/symhacks.h sha_one.c |