Makefile.ssl 2.9 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 23 24 25 26 27 28 29

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
30
LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ)
31 32 33 34

SRC= $(LIBSRC)

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

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

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

42
all:    lib
43

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

49 50
# elf
asm/sx86-elf.o: asm/sx86unix.cpp
U
Ulf Möller 已提交
51
	$(CPP) -DELF -x c asm/sx86unix.cpp | as -o asm/sx86-elf.o
52 53 54 55 56 57 58 59 60 61 62 63 64

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

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

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

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

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

tags:
	ctags $(SRC)

tests:

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

depend:
95
	$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
96 97

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

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

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

106
sha1_one.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
107
sha1_one.o: ../../include/openssl/sha.h
108
sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
109
sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
110
sha1dgst.o: ../md32_common.h sha_locl.h
111
sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
112
sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
113
sha_dgst.o: ../md32_common.h sha_locl.h
114
sha_one.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
115
sha_one.o: ../../include/openssl/sha.h