Further BUILDENV refinement, further fool-proofing of Makefiles and
[openssl.git] / crypto / rc4 / Makefile
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 AR=             ar r
12
13 RC4_ENC=rc4_enc.o
14
15 CFLAGS= $(INCLUDES) $(CFLAG)
16 ASFLAGS= $(INCLUDES) $(ASFLAG)
17 AFLAGS= $(ASFLAGS)
18
19 GENERAL=Makefile
20 TEST=rc4test.c
21 APPS=
22
23 LIB=$(TOP)/libcrypto.a
24 LIBSRC=rc4_skey.c rc4_enc.c
25 LIBOBJ=rc4_skey.o $(RC4_ENC)
26
27 SRC= $(LIBSRC)
28
29 EXHEADER= rc4.h
30 HEADER= $(EXHEADER) rc4_locl.h
31
32 ALL=    $(GENERAL) $(SRC) $(HEADER)
33
34 top:
35         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
36
37 all:    lib
38
39 lib:    $(LIBOBJ)
40         $(AR) $(LIB) $(LIBOBJ)
41         $(RANLIB) $(LIB) || echo Never mind.
42         @touch lib
43
44 # ELF
45 rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
46         (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
47 # COFF
48 rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
49         (cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
50 # a.out
51 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
52         (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
53
54 rc4-x86_64.s: asm/rc4-x86_64.pl;        $(PERL) asm/rc4-x86_64.pl $@
55
56 rc4-ia64.s: asm/rc4-ia64.S
57         $(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@
58
59 files:
60         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
61
62 links:
63         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
64         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
65         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
66
67 install:
68         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
69         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
70         do  \
71         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
72         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
73         done;
74
75 tags:
76         ctags $(SRC)
77
78 tests:
79
80 lint:
81         lint -DLINT $(INCLUDES) $(SRC)>fluff
82
83 depend:
84         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
85         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
86
87 dclean:
88         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
89         mv -f Makefile.new $(MAKEFILE)
90
91 clean:
92         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
93
94 # DO NOT DELETE THIS LINE -- make depend depends on it.
95
96 rc4_enc.o: ../../e_os.h ../../include/openssl/bio.h
97 rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
98 rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
99 rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
100 rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
101 rc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
102 rc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
103 rc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h
104 rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h
105 rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
106 rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
107 rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
108 rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
109 rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
110 rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
111 rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c