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