Makefile.ssl 4.5 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 25

GENERAL=Makefile
26
TEST=shatest.c sha1test.c sha256t.c sha512t.c
27 28 29
APPS=

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

SRC= $(LIBSRC)

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

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

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

43
all:    lib
44

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

50
# ELF
51
asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
52
	(cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
53
asm/s512sse2-elf.s:	asm/sha512-sse2.pl ../perlasm/x86asm.pl
54 55 56 57 58 59
	(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) > ../$@)
60
# a.out
61 62 63 64
asm/sx86-out.o: asm/sha1-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha1-586.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
asm/s512sse2-out.o:     asm/sha512-sse2.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha512-sse2.pl a.out $(CFLAGS) $(PROCESSOR) | as -o ../$@)
65

66 67 68 69 70
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))

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

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

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

tags:
	ctags $(SRC)

tests:

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

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

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

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

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

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