This time, get it right.
[openssl.git] / crypto / rc4 / Makefile.ssl
1 #
2 # SSLeay/crypto/rc4/Makefile
3 #
4
5 DIR=    rc4
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 RC4_ENC=rc4_enc.o
17 # or use
18 #RC4_ENC=asm/rx86-elf.o
19 #RC4_ENC=asm/rx86-out.o
20 #RC4_ENC=asm/rx86-sol.o
21 #RC4_ENC=asm/rx86bdsi.o
22
23 CFLAGS= $(INCLUDES) $(CFLAG)
24
25 GENERAL=Makefile
26 TEST=rc4test.c
27 APPS=
28
29 LIB=$(TOP)/libcrypto.a
30 LIBSRC=rc4_skey.c rc4_enc.c
31 LIBOBJ=rc4_skey.o $(RC4_ENC)
32
33 SRC= $(LIBSRC)
34
35 EXHEADER= rc4.h
36 HEADER= $(EXHEADER) rc4_locl.h
37
38 ALL=    $(GENERAL) $(SRC) $(HEADER)
39
40 top:
41         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43 all:    lib
44
45 lib:    $(LIBOBJ)
46         $(AR) $(LIB) $(LIBOBJ)
47         sh $(TOP)/util/ranlib.sh $(LIB)
48         @touch lib
49
50 # elf
51 asm/rx86-elf.o: asm/rx86unix.cpp
52         $(CPP) -DELF asm/rx86unix.cpp | as -o asm/rx86-elf.o
53
54 # solaris
55 asm/rx86-sol.o: asm/rx86unix.cpp
56         $(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s
57         as -o asm/rx86-sol.o asm/rx86-sol.s
58         rm -f asm/rx86-sol.s
59
60 # a.out
61 asm/rx86-out.o: asm/rx86unix.cpp
62         $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
63
64 # bsdi
65 asm/rx86bsdi.o: asm/rx86unix.cpp
66         $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o
67
68 asm/rx86unix.cpp:
69         (cd asm; perl rc4-586.pl cpp >rx86unix.cpp)
70
71 files:
72         perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
73
74 links:
75         /bin/rm -f Makefile
76         $(TOP)/util/point.sh Makefile.ssl Makefile ;
77         $(TOP)/util/mklink.sh ../../include $(EXHEADER)
78         $(TOP)/util/mklink.sh ../../test $(TEST)
79         $(TOP)/util/mklink.sh ../../apps $(APPS)
80
81 install:
82         @for i in $(EXHEADER) ; \
83         do  \
84         (cp $$i $(INSTALLTOP)/include/$$i; \
85         chmod 644 $(INSTALLTOP)/include/$$i ); \
86         done;
87
88 tags:
89         ctags $(SRC)
90
91 tests:
92
93 lint:
94         lint -DLINT $(INCLUDES) $(SRC)>fluff
95
96 depend:
97         $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
98
99 dclean:
100         perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
101         mv -f Makefile.new $(MAKEFILE)
102
103 clean:
104         /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
105
106 errors:
107
108 # DO NOT DELETE THIS LINE -- make depend depends on it.
109
110 rc4_enc.o: rc4.h rc4_locl.h
111 rc4_skey.o: rc4.h rc4_locl.h