Proper support for OpenBSD-i386 shared build, including assember modules!
[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 AFLAGS= $(ASFLAGS)
30
31 GENERAL=Makefile
32 TEST=rc4test.c
33 APPS=
34
35 LIB=$(TOP)/libcrypto.a
36 LIBSRC=rc4_skey.c rc4_enc.c
37 LIBOBJ=rc4_skey.o $(RC4_ENC)
38
39 SRC= $(LIBSRC)
40
41 EXHEADER= rc4.h
42 HEADER= $(EXHEADER) rc4_locl.h
43
44 ALL=    $(GENERAL) $(SRC) $(HEADER)
45
46 top:
47         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
48
49 all:    lib
50
51 lib:    $(LIBOBJ)
52         $(AR) $(LIB) $(LIBOBJ)
53         $(RANLIB) $(LIB) || echo Never mind.
54         @touch lib
55
56 # ELF
57 asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
58         (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
59 # COFF
60 asm/rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
61         (cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
62 # a.out
63 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
64         (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
65
66 asm/rc4-amd64.s: asm/rc4-amd64.pl;      $(PERL) $< $@
67
68 files:
69         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
70
71 links:
72         @sh $(TOP)/util/point.sh Makefile.ssl Makefile
73         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
74         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
75         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
76
77 install:
78         @for i in $(EXHEADER) ; \
79         do  \
80         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
81         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
82         done;
83
84 tags:
85         ctags $(SRC)
86
87 tests:
88
89 lint:
90         lint -DLINT $(INCLUDES) $(SRC)>fluff
91
92 depend:
93         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
94
95 dclean:
96         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
97         mv -f Makefile.new $(MAKEFILE)
98
99 clean:
100         rm -f asm/rx86unix.cpp asm/*.s asm/*.o *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
101
102 # DO NOT DELETE THIS LINE -- make depend depends on it.
103
104 rc4_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc4.h
105 rc4_enc.o: rc4_enc.c rc4_locl.h
106 rc4_skey.o: ../../include/openssl/opensslconf.h
107 rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h
108 rc4_skey.o: rc4_locl.h rc4_skey.c