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

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

SHA1_ASM_OBJ=
19 20 21 22 23 24 25 26 27

CFLAGS= $(INCLUDES) $(CFLAG)

GENERAL=Makefile
TEST=shatest.c sha1test.c
APPS=

LIB=$(TOP)/libcrypto.a
LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
28
LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ)
29 30 31 32

SRC= $(LIBSRC)

EXHEADER= sha.h
33
HEADER= sha_locl.h $(EXHEADER)
34 35 36 37 38 39

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

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

40
all:    lib
41

42
lib:    $(LIBOBJ)
43
	$(AR) $(LIB) $(LIBOBJ)
44
	$(RANLIB) $(LIB)
45 46
	@touch lib

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
# elf
asm/sx86-elf.o: asm/sx86unix.cpp
	$(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o

# solaris
asm/sx86-sol.o: asm/sx86unix.cpp
	$(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s
	as -o asm/sx86-sol.o asm/sx86-sol.s
	rm -f asm/sx86-sol.s

# 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
63
	$(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
64 65

asm/sx86unix.cpp:
66
	(cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
67

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

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

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

tags:
	ctags $(SRC)

tests:

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

depend:
93
	$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
94 95

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

clean:
B
Bodo Möller 已提交
100
	rm -f asm/sx86unix.cpp *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
101 102

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

B
Bodo Möller 已提交
104
sha1_one.o: ../../include/openssl/sha.h
B
Ben Laurie 已提交
105
sha1dgst.o: ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
106 107
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
sha1dgst.o: sha_locl.h
B
Ben Laurie 已提交
108
sha_dgst.o: ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
109 110 111
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
sha_dgst.o: sha_locl.h
sha_one.o: ../../include/openssl/sha.h