Makefile.ssl 4.6 KB
Newer Older
1 2 3 4
#
# SSLeay/crypto/sha/Makefile
#

5 6 7
DIR=    sha
TOP=    ../..
CC=     cc
8
CPP=    $(CC) -E
9 10
INCLUDES=
CFLAG=-g
11 12
INSTALL_PREFIX=
OPENSSLDIR=     /usr/local/ssl
13
INSTALLTOP=/usr/local/ssl
14
MAKE=           make -f Makefile.ssl
15 16
MAKEDEPPROG=	makedepend
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17 18 19 20
MAKEFILE=       Makefile.ssl
AR=             ar r

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 29 30
APPS=

LIB=$(TOP)/libcrypto.a
31 32
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)
33 34 35 36

SRC= $(LIBSRC)

EXHEADER= sha.h
37
HEADER= sha_locl.h $(EXHEADER)
38 39 40 41 42 43

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

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

44
all:    lib
45

46
lib:    $(LIBOBJ)
47
	$(AR) $(LIB) $(LIBOBJ)
48
	$(RANLIB) $(LIB) || echo Never mind.
49 50
	@touch lib

51
# ELF
52
asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
53
	(cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
54
asm/s512sse2-elf.s:	asm/sha512-sse2.pl ../perlasm/x86asm.pl
55 56 57 58 59 60
	(cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
# COFF
asm/sx86-cof.s: asm/sha1-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha1-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
asm/s512sse2-cof.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha512-sse2.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
61
# a.out
62 63 64 65
sx86-out.s: asm/sha1-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
s512sse2-out.s:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
66

67 68 69 70 71
asm/sha256-ia64.s: asm/sha512-ia64.pl
	(cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))
asm/sha512-ia64.s: asm/sha512-ia64.pl
	(cd asm; $(PERL) sha512-ia64.pl $@ $(CFLAGS))

72
files:
73
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
74 75

links:
76
	@sh $(TOP)/util/point.sh Makefile.ssl Makefile
77 78 79
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
80 81 82 83

install:
	@for i in $(EXHEADER) ; \
	do  \
84 85
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
86 87 88 89 90 91 92 93 94 95 96
	done;

tags:
	ctags $(SRC)

tests:

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

depend:
97
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
98 99

dclean:
100
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
101 102 103
	mv -f Makefile.new $(MAKEFILE)

clean:
104
	rm -f asm/sx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
105 106

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

R
Richard Levitte 已提交
108 109
sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha1_one.o: ../../include/openssl/opensslconf.h
110 111 112 113
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
sha1_one.o: sha1_one.c
114
sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
115
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
R
Richard Levitte 已提交
116
sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
R
Richard Levitte 已提交
117 118 119 120 121 122 123 124 125 126
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: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha512.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
sha512.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
sha512.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
sha512.o: ../../include/openssl/symhacks.h sha512.c
127
sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
128
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
R
Richard Levitte 已提交
129
sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
R
Richard Levitte 已提交
130 131
sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
132 133 134
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