Makefile 5.2 KB
Newer Older
1
#
2
# OpenSSL/crypto/sha/Makefile
3 4
#

5 6 7
DIR=    sha
TOP=    ../..
CC=     cc
8
CPP=    $(CC) -E
9 10
INCLUDES=
CFLAG=-g
B
Ben Laurie 已提交
11
MAKEFILE=       Makefile
12 13 14
AR=             ar r

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 23 24
APPS=

LIB=$(TOP)/libcrypto.a
25 26
LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha256.c sha512.c
LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o sha256.o sha512.o $(SHA1_ASM_OBJ)
27 28 29 30

SRC= $(LIBSRC)

EXHEADER= sha.h
31
HEADER= sha_locl.h $(EXHEADER)
32 33 34 35 36 37

ALL=    $(GENERAL) $(SRC) $(HEADER)

top:
	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)

38
all:    lib
39

40
lib:    $(LIBOBJ)
41
	$(AR) $(LIB) $(LIBOBJ)
42
	$(RANLIB) $(LIB) || echo Never mind.
43 44
	@touch lib

A
Andy Polyakov 已提交
45 46 47 48 49 50
sha1-586.s:	asm/sha1-586.pl ../perlasm/x86asm.pl
	$(PERL) asm/sha1-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
sha256-586.s:	asm/sha256-586.pl ../perlasm/x86asm.pl
	$(PERL) asm/sha256-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
sha512-586.s:	asm/sha512-586.pl ../perlasm/x86asm.pl
	$(PERL) asm/sha512-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
51

52
sha1-ia64.s:   asm/sha1-ia64.pl
53
	(cd asm; $(PERL) sha1-ia64.pl ../$@ $(CFLAGS))
54
sha256-ia64.s: asm/sha512-ia64.pl
A
Andy Polyakov 已提交
55
	(cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
56
sha512-ia64.s: asm/sha512-ia64.pl
A
Andy Polyakov 已提交
57
	(cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
58

A
Andy Polyakov 已提交
59 60 61
sha256-armv4.s: asm/sha256-armv4.pl
	$(PERL) $< $@

A
Andy Polyakov 已提交
62
# Solaris make has to be explicitly told
63 64 65
sha1-x86_64.s:	asm/sha1-x86_64.pl;	$(PERL) asm/sha1-x86_64.pl $(PERLASM_SCHEME) > $@
sha256-x86_64.s:asm/sha512-x86_64.pl;	$(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@
sha512-x86_64.s:asm/sha512-x86_64.pl;	$(PERL) asm/sha512-x86_64.pl $(PERLASM_SCHEME) $@
A
Andy Polyakov 已提交
66 67 68
sha1-sparcv9.s:	asm/sha1-sparcv9.pl;	$(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS)
sha256-sparcv9.s:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
sha512-sparcv9.s:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
A
Andy Polyakov 已提交
69

A
Andy Polyakov 已提交
70 71 72 73
sha1-ppc.s:	asm/sha1-ppc.pl;	$(PERL) asm/sha1-ppc.pl $(PERLASM_SCHEME) $@
sha256-ppc.s:	asm/sha512-ppc.pl;	$(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
sha512-ppc.s:	asm/sha512-ppc.pl;	$(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@

A
Andy Polyakov 已提交
74 75 76 77
# GNU make "catch all"
sha1-%.s:	asm/sha1-%.pl;		$(PERL) $< $@
sha256-%.s:	asm/sha512-%.pl;	$(PERL) $< $@
sha512-%.s:	asm/sha512-%.pl;	$(PERL) $< $@
A
Andy Polyakov 已提交
78

79
files:
B
Ben Laurie 已提交
80
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
81 82

links:
83 84 85
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
86 87

install:
A
Andy Polyakov 已提交
88
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
89
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
90
	do  \
91 92
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
93 94 95 96 97 98 99 100 101 102 103
	done;

tags:
	ctags $(SRC)

tests:

lint:
	lint -DLINT $(INCLUDES) $(SRC)>fluff

depend:
104
	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
105
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
106 107

dclean:
108
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
109 110 111
	mv -f Makefile.new $(MAKEFILE)

clean:
112
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
113 114

# DO NOT DELETE THIS LINE -- make depend depends on it.
B
Ben Laurie 已提交
115

116 117 118 119 120
sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha1_one.o: ../../include/openssl/opensslconf.h
sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
121
sha1_one.o: sha1_one.c
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
sha256.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
sha256.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
sha256.o: ../../include/openssl/symhacks.h ../md32_common.h sha256.c
sha512.o: ../../e_os.h ../../include/openssl/bio.h
sha512.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
sha512.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
sha512.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
sha512.o: ../cryptlib.h sha512.c
sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
sha_one.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
sha_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
sha_one.o: ../../include/openssl/symhacks.h sha_one.c