a965c02d949268c8719aac61a120342e288884e6
[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 ASFLAGS= $(INCLUDES) $(ASFLAG)
29
30 GENERAL=Makefile
31 TEST=rc4test.c
32 APPS=
33
34 LIB=$(TOP)/libcrypto.a
35 LIBSRC=rc4_skey.c rc4_enc.c
36 LIBOBJ=rc4_skey.o $(RC4_ENC)
37
38 SRC= $(LIBSRC)
39
40 EXHEADER= rc4.h
41 HEADER= $(EXHEADER) rc4_locl.h
42
43 ALL=    $(GENERAL) $(SRC) $(HEADER)
44
45 top:
46         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
47
48 all:    lib
49
50 lib:    $(LIBOBJ)
51         $(AR) $(LIB) $(LIBOBJ)
52         $(RANLIB) $(LIB) || echo Never mind.
53         @touch lib
54
55 # elf
56 asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
57         (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s)
58
59 # a.out
60 asm/rx86-out.o: asm/rx86unix.cpp
61         $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
62
63 # bsdi
64 asm/rx86bsdi.o: asm/rx86unix.cpp
65         $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o
66
67 asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
68         (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
69
70 asm/rc4-amd64.s: asm/rc4-amd64.pl;      $(PERL) $< $@
71
72 files:
73         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
74
75 links:
76         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
77         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
78         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
79         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
80
81 install:
82         @for i in $(EXHEADER) ; \
83         do  \
84         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
85         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$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) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(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         rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
105
106 # DO NOT DELETE THIS LINE -- make depend depends on it.
107
108 rc4_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc4.h
109 rc4_enc.o: rc4_enc.c rc4_locl.h
110 rc4_skey.o: ../../include/openssl/opensslconf.h
111 rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h
112 rc4_skey.o: rc4_locl.h rc4_skey.c