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