4f5413cbd70bdd7e691ddf1a952da407800901cd
[openssl.git] / crypto / sha / Makefile.ssl
1 #
2 # SSLeay/crypto/sha/Makefile
3 #
4
5 DIR=    sha
6 TOP=    ../..
7 CC=     cc
8 INCLUDES=
9 CFLAG=-g
10 INSTALLTOP=/usr/local/ssl
11 MAKE=           make -f Makefile.ssl
12 MAKEDEPEND=     $(TOP)/util/domd $(TOP)
13 MAKEFILE=       Makefile.ssl
14 AR=             ar r
15
16 SHA1_ASM_OBJ=
17
18 CFLAGS= $(INCLUDES) $(CFLAG)
19
20 GENERAL=Makefile
21 TEST=shatest.c sha1test.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
26 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ)
27
28 SRC= $(LIBSRC)
29
30 EXHEADER= sha.h
31 HEADER= sha_locl.h $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         $(AR) $(LIB) $(LIBOBJ)
42         $(RANLIB) $(LIB)
43         @touch lib
44
45 # elf
46 asm/sx86-elf.o: asm/sx86unix.cpp
47         $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o
48
49 # solaris
50 asm/sx86-sol.o: asm/sx86unix.cpp
51         $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s
52         as -o asm/sx86-sol.o asm/sx86-sol.s
53         rm -f asm/sx86-sol.s
54
55 # a.out
56 asm/sx86-out.o: asm/sx86unix.cpp
57         $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
58
59 # bsdi
60 asm/sx86bsdi.o: asm/sx86unix.cpp
61         $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
62
63 asm/sx86unix.cpp:
64         (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
65
66 files:
67         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
68
69 links:
70         @$(TOP)/util/point.sh Makefile.ssl Makefile
71         @$(TOP)/util/mklink.sh ../../include/openssl $(EXHEADER)
72         @$(TOP)/util/mklink.sh ../../test $(TEST)
73         @$(TOP)/util/mklink.sh ../../apps $(APPS)
74
75 install:
76         @for i in $(EXHEADER) ; \
77         do  \
78         (cp $$i $(INSTALLTOP)/include/openssl/$$i; \
79         chmod 644 $(INSTALLTOP)/include/openssl/$$i ); \
80         done;
81
82 tags:
83         ctags $(SRC)
84
85 tests:
86
87 lint:
88         lint -DLINT $(INCLUDES) $(SRC)>fluff
89
90 depend:
91         $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
92
93 dclean:
94         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
95         mv -f Makefile.new $(MAKEFILE)
96
97 clean:
98         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
99
100 # DO NOT DELETE THIS LINE -- make depend depends on it.
101
102 sha1_one.o: ../../include/openssl/sha.h
103 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
104 sha1dgst.o: sha_locl.h
105 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
106 sha_dgst.o: sha_locl.h
107 sha_one.o: ../../include/openssl/sha.h