1142425Snectar#
2160814Ssimon# OpenSSL/crypto/rc4/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=	rc4
6142425SnectarTOP=	../..
7142425SnectarCC=	cc
8142425SnectarCPP=    $(CC) -E
9142425SnectarINCLUDES=
10142425SnectarCFLAG=-g
11142425SnectarAR=		ar r
12142425Snectar
13194206SsimonRC4_ENC=rc4_enc.o rc4_skey.o
14142425Snectar
15142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
16142425SnectarASFLAGS= $(INCLUDES) $(ASFLAG)
17160814SsimonAFLAGS= $(ASFLAGS)
18142425Snectar
19142425SnectarGENERAL=Makefile
20142425SnectarTEST=rc4test.c
21142425SnectarAPPS=
22142425Snectar
23142425SnectarLIB=$(TOP)/libcrypto.a
24238405SjkimLIBSRC=rc4_skey.c rc4_enc.c rc4_utl.c
25238405SjkimLIBOBJ=$(RC4_ENC) rc4_utl.o
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)
40238405Sjkim	$(AR) $(LIB) $(LIBOBJ)
41142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
42142425Snectar	@touch lib
43142425Snectar
44238405Sjkimrc4-586.s:	asm/rc4-586.pl ../perlasm/x86asm.pl
45290207Sjkim	$(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
46142425Snectar
47238405Sjkimrc4-x86_64.s: asm/rc4-x86_64.pl
48238405Sjkim	$(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
49238405Sjkimrc4-md5-x86_64.s:	asm/rc4-md5-x86_64.pl
50238405Sjkim	$(PERL) asm/rc4-md5-x86_64.pl $(PERLASM_SCHEME) > $@
51142425Snectar
52238405Sjkimrc4-ia64.S: asm/rc4-ia64.pl
53238405Sjkim	$(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@
54238405Sjkim
55238405Sjkimrc4-parisc.s:	asm/rc4-parisc.pl
56238405Sjkim	$(PERL) asm/rc4-parisc.pl $(PERLASM_SCHEME) $@
57238405Sjkim
58238405Sjkimrc4-ia64.s: rc4-ia64.S
59160814Ssimon	@case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
60238405Sjkim	int)	set -x; $(CC) $(CFLAGS) -DSZ=4 -E rc4-ia64.S > $@ ;; \
61238405Sjkim	char)	set -x; $(CC) $(CFLAGS) -DSZ=1 -E rc4-ia64.S > $@ ;; \
62160814Ssimon	*)	exit 1 ;; \
63160814Ssimon	esac
64142425Snectar
65238405Sjkim# GNU make "catch all"
66238405Sjkimrc4-%.s:	asm/rc4-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
67238405Sjkim
68142425Snectarfiles:
69290207Sjkim	$(PERL) $(TOP)/util/files.pl "RC4_ENC=$(RC4_ENC)" Makefile >> $(TOP)/MINFO
70142425Snectar
71142425Snectarlinks:
72142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
73142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
74142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
75142425Snectar
76142425Snectarinstall:
77160814Ssimon	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
78160814Ssimon	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
79142425Snectar	do  \
80142425Snectar	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
81142425Snectar	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
82142425Snectar	done;
83142425Snectar
84142425Snectartags:
85142425Snectar	ctags $(SRC)
86142425Snectar
87142425Snectartests:
88142425Snectar
89142425Snectarlint:
90142425Snectar	lint -DLINT $(INCLUDES) $(SRC)>fluff
91142425Snectar
92284283Sjkimupdate: depend
93284283Sjkim
94142425Snectardepend:
95160814Ssimon	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
96142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
97142425Snectar
98142425Snectardclean:
99142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
100142425Snectar	mv -f Makefile.new $(MAKEFILE)
101142425Snectar
102142425Snectarclean:
103325335Sjkim	rm -f *.s *.S *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
104142425Snectar
105142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
106142425Snectar
107160814Ssimonrc4_enc.o: ../../e_os.h ../../include/openssl/bio.h
108160814Ssimonrc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
109160814Ssimonrc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
110160814Ssimonrc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
111160814Ssimonrc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
112160814Ssimonrc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
113160814Ssimonrc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
114160814Ssimonrc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h
115160814Ssimonrc4_skey.o: ../../e_os.h ../../include/openssl/bio.h
116160814Ssimonrc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
117160814Ssimonrc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
118238405Sjkimrc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
119160814Ssimonrc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
120160814Ssimonrc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
121160814Ssimonrc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
122160814Ssimonrc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c
123238405Sjkimrc4_utl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
124238405Sjkimrc4_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
125238405Sjkimrc4_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h
126238405Sjkimrc4_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
127238405Sjkimrc4_utl.o: ../../include/openssl/symhacks.h rc4_utl.c
128