Makefile.ssl 3.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 52
asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > sx86-elf.s)
53 54
asm/sse2-elf.s:	asm/sha512-sse2.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) sha512-sse2.pl elf $(CFLAGS) $(PROCESSOR) > sse2-elf.s)
55 56 57 58 59 60 61

# a.out
asm/sx86-out.o: asm/sx86unix.cpp
	$(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o

# bsdi
asm/sx86bsdi.o: asm/sx86unix.cpp
62
	$(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
63

B
Bodo Möller 已提交
64
asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl
65
	(cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
66

67
files:
68
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
69 70

links:
71
	@sh $(TOP)/util/point.sh Makefile.ssl Makefile
72 73 74
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
75 76 77 78

install:
	@for i in $(EXHEADER) ; \
	do  \
79 80
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
81 82 83 84 85 86 87 88 89 90 91
	done;

tags:
	ctags $(SRC)

tests:

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

depend:
92
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
93 94

dclean:
95
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
96 97 98
	mv -f Makefile.new $(MAKEFILE)

clean:
99
	rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
100 101

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

R
Richard Levitte 已提交
103 104
sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha1_one.o: ../../include/openssl/opensslconf.h
105 106 107 108
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
109
sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
110
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
R
Richard Levitte 已提交
111
sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
112
sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
113
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
R
Richard Levitte 已提交
114
sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
R
Richard Levitte 已提交
115 116
sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
117 118 119
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