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