d01245ce373de7711293801c44efb3b2d52f4b18
[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 INSTALL_PREFIX=
11 OPENSSLDIR=     /usr/local/ssl
12 INSTALLTOP=/usr/local/ssl
13 MAKE=           make -f Makefile.ssl
14 MAKEDEPEND=     $(TOP)/util/domd $(TOP)
15 MAKEFILE=       Makefile.ssl
16 AR=             ar r
17
18 SHA1_ASM_OBJ=
19
20 CFLAGS= $(INCLUDES) $(CFLAG)
21
22 GENERAL=Makefile
23 TEST=shatest.c sha1test.c
24 APPS=
25
26 LIB=$(TOP)/libcrypto.a
27 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 SRC= $(LIBSRC)
31
32 EXHEADER= sha.h
33 HEADER= sha_locl.h $(EXHEADER)
34
35 ALL=    $(GENERAL) $(SRC) $(HEADER)
36
37 top:
38         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40 all:    lib
41
42 lib:    $(LIBOBJ)
43         $(AR) $(LIB) $(LIBOBJ)
44         $(RANLIB) $(LIB)
45         @touch lib
46
47 # elf
48 asm/sx86-elf.o: asm/sx86unix.cpp
49         $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o
50
51 # solaris
52 asm/sx86-sol.o: asm/sx86unix.cpp
53         $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s
54         as -o asm/sx86-sol.o asm/sx86-sol.s
55         rm -f asm/sx86-sol.s
56
57 # a.out
58 asm/sx86-out.o: asm/sx86unix.cpp
59         $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
60
61 # bsdi
62 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         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
74         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
75         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
76
77 install:
78         @for i in $(EXHEADER) ; \
79         do  \
80         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
81         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
82         done;
83
84 tags:
85         ctags $(SRC)
86
87 tests:
88
89 lint:
90         lint -DLINT $(INCLUDES) $(SRC)>fluff
91
92 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         mv -f Makefile.new $(MAKEFILE)
98
99 clean:
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.
103
104 sha1_one.o: ../../include/openssl/sha.h
105 sha1dgst.o: ../../include/openssl/opensslconf.h
106 sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
107 sha1dgst.o: sha_locl.h
108 sha_dgst.o: ../../include/openssl/opensslconf.h
109 sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h
110 sha_dgst.o: sha_locl.h
111 sha_one.o: ../../include/openssl/sha.h