Makefile revision 160814
1142425Snectar#
2160814Ssimon# OpenSSL/crypto/rc4/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=	rc4
6142425SnectarTOP=	../..
7142425SnectarCC=	cc
8142425SnectarCPP=    $(CC) -E
9142425SnectarINCLUDES=
10142425SnectarCFLAG=-g
11142425SnectarAR=		ar r
12142425Snectar
13142425SnectarRC4_ENC=rc4_enc.o
14142425Snectar
15142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
16142425SnectarASFLAGS= $(INCLUDES) $(ASFLAG)
17160814SsimonAFLAGS= $(ASFLAGS)
18142425Snectar
19142425SnectarGENERAL=Makefile
20142425SnectarTEST=rc4test.c
21142425SnectarAPPS=
22142425Snectar
23142425SnectarLIB=$(TOP)/libcrypto.a
24142425SnectarLIBSRC=rc4_skey.c rc4_enc.c
25142425SnectarLIBOBJ=rc4_skey.o $(RC4_ENC)
26142425Snectar
27142425SnectarSRC= $(LIBSRC)
28142425Snectar
29142425SnectarEXHEADER= rc4.h
30142425SnectarHEADER=	$(EXHEADER) rc4_locl.h
31142425Snectar
32142425SnectarALL=    $(GENERAL) $(SRC) $(HEADER)
33142425Snectar
34142425Snectartop:
35142425Snectar	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
36142425Snectar
37142425Snectarall:	lib
38142425Snectar
39142425Snectarlib:	$(LIBOBJ)
40142425Snectar	$(AR) $(LIB) $(LIBOBJ)
41142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
42142425Snectar	@touch lib
43142425Snectar
44160814Ssimon# ELF
45160814Ssimonrx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
46160814Ssimon	(cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
47160814Ssimon# COFF
48160814Ssimonrx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
49160814Ssimon	(cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
50142425Snectar# a.out
51160814Ssimonrx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
52160814Ssimon	(cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
53142425Snectar
54160814Ssimonrc4-x86_64.s: asm/rc4-x86_64.pl;	$(PERL) asm/rc4-x86_64.pl $@
55142425Snectar
56160814Ssimonrc4-ia64.s: asm/rc4-ia64.S
57160814Ssimon	@case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
58160814Ssimon	int)	set -x; $(CC) $(CFLAGS) -DSZ=4 -E asm/rc4-ia64.S > $@ ;; \
59160814Ssimon	char)	set -x; $(CC) $(CFLAGS) -DSZ=1 -E asm/rc4-ia64.S > $@ ;; \
60160814Ssimon	*)	exit 1 ;; \
61160814Ssimon	esac
62142425Snectar
63142425Snectarfiles:
64142425Snectar	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
65142425Snectar
66142425Snectarlinks:
67142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
68142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
69142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
70142425Snectar
71142425Snectarinstall:
72160814Ssimon	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
73160814Ssimon	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
74142425Snectar	do  \
75142425Snectar	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
76142425Snectar	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
77142425Snectar	done;
78142425Snectar
79142425Snectartags:
80142425Snectar	ctags $(SRC)
81142425Snectar
82142425Snectartests:
83142425Snectar
84142425Snectarlint:
85142425Snectar	lint -DLINT $(INCLUDES) $(SRC)>fluff
86142425Snectar
87142425Snectardepend:
88160814Ssimon	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
89142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
90142425Snectar
91142425Snectardclean:
92142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
93142425Snectar	mv -f Makefile.new $(MAKEFILE)
94142425Snectar
95142425Snectarclean:
96160814Ssimon	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
97142425Snectar
98142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
99142425Snectar
100160814Ssimonrc4_enc.o: ../../e_os.h ../../include/openssl/bio.h
101160814Ssimonrc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
102160814Ssimonrc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
103160814Ssimonrc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
104160814Ssimonrc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
105160814Ssimonrc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
106160814Ssimonrc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107160814Ssimonrc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h
108160814Ssimonrc4_skey.o: ../../e_os.h ../../include/openssl/bio.h
109160814Ssimonrc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
110160814Ssimonrc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
111160814Ssimonrc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
112160814Ssimonrc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113160814Ssimonrc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
114160814Ssimonrc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
115160814Ssimonrc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c
116