Makefile revision 142425
1142425Snectar#
2142425Snectar# SSLeay/crypto/rc4/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=	rc4
6142425SnectarTOP=	../..
7142425SnectarCC=	cc
8142425SnectarCPP=    $(CC) -E
9142425SnectarINCLUDES=
10142425SnectarCFLAG=-g
11142425SnectarINSTALL_PREFIX=
12142425SnectarOPENSSLDIR=     /usr/local/ssl
13142425SnectarINSTALLTOP=/usr/local/ssl
14142425SnectarMAKEDEPPROG=	makedepend
15142425SnectarMAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16142425SnectarMAKEFILE=	Makefile
17142425SnectarAR=		ar r
18142425Snectar
19142425SnectarRC4_ENC=rc4_enc.o
20142425Snectar# or use
21142425Snectar#RC4_ENC=asm/rx86-elf.o
22142425Snectar#RC4_ENC=asm/rx86-out.o
23142425Snectar#RC4_ENC=asm/rx86-sol.o
24142425Snectar#RC4_ENC=asm/rx86bdsi.o
25142425Snectar
26142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
27142425SnectarASFLAGS= $(INCLUDES) $(ASFLAG)
28142425Snectar
29142425SnectarGENERAL=Makefile
30142425SnectarTEST=rc4test.c
31142425SnectarAPPS=
32142425Snectar
33142425SnectarLIB=$(TOP)/libcrypto.a
34142425SnectarLIBSRC=rc4_skey.c rc4_enc.c
35142425SnectarLIBOBJ=rc4_skey.o $(RC4_ENC)
36142425Snectar
37142425SnectarSRC= $(LIBSRC)
38142425Snectar
39142425SnectarEXHEADER= rc4.h
40142425SnectarHEADER=	$(EXHEADER) rc4_locl.h
41142425Snectar
42142425SnectarALL=    $(GENERAL) $(SRC) $(HEADER)
43142425Snectar
44142425Snectartop:
45142425Snectar	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
46142425Snectar
47142425Snectarall:	lib
48142425Snectar
49142425Snectarlib:	$(LIBOBJ)
50142425Snectar	$(AR) $(LIB) $(LIBOBJ)
51142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
52142425Snectar	@touch lib
53142425Snectar
54142425Snectar# elf
55142425Snectarasm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
56142425Snectar	(cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s)
57142425Snectar
58142425Snectar# a.out
59142425Snectarasm/rx86-out.o: asm/rx86unix.cpp
60142425Snectar	$(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
61142425Snectar
62142425Snectar# bsdi
63142425Snectarasm/rx86bsdi.o: asm/rx86unix.cpp
64142425Snectar	$(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o
65142425Snectar
66142425Snectarasm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
67142425Snectar	(cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
68142425Snectar
69142425Snectarfiles:
70142425Snectar	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
71142425Snectar
72142425Snectarlinks:
73142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
74142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
75142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
76142425Snectar
77142425Snectarinstall:
78142425Snectar	@for i in $(EXHEADER) ; \
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
92142425Snectardepend:
93142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
94142425Snectar
95142425Snectardclean:
96142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
97142425Snectar	mv -f Makefile.new $(MAKEFILE)
98142425Snectar
99142425Snectarclean:
100142425Snectar	rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
101142425Snectar
102142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
103142425Snectar
104142425Snectarrc4_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc4.h
105142425Snectarrc4_enc.o: rc4_enc.c rc4_locl.h
106142425Snectarrc4_skey.o: ../../include/openssl/opensslconf.h
107142425Snectarrc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h
108142425Snectarrc4_skey.o: rc4_locl.h rc4_skey.c
109