Makefile revision 142425
1142425Snectar#
2142425Snectar# SSLeay/crypto/rc5/Makefile
3142425Snectar#
4142425Snectar
5142425SnectarDIR=	rc5
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
19142425SnectarRC5_ENC=		rc5_enc.o
20142425Snectar# or use
21142425Snectar#DES_ENC=	r586-elf.o
22142425Snectar
23142425SnectarCFLAGS= $(INCLUDES) $(CFLAG)
24142425SnectarASFLAGS= $(INCLUDES) $(ASFLAG)
25142425Snectar
26142425SnectarGENERAL=Makefile
27142425SnectarTEST=rc5test.c
28142425SnectarAPPS=
29142425Snectar
30142425SnectarLIB=$(TOP)/libcrypto.a
31142425SnectarLIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c 
32142425SnectarLIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o
33142425Snectar
34142425SnectarSRC= $(LIBSRC)
35142425Snectar
36142425SnectarEXHEADER= rc5.h
37142425SnectarHEADER=	rc5_locl.h $(EXHEADER)
38142425Snectar
39142425SnectarALL=    $(GENERAL) $(SRC) $(HEADER)
40142425Snectar
41142425Snectartop:
42142425Snectar	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
43142425Snectar
44142425Snectarall:	lib
45142425Snectar
46142425Snectarlib:	$(LIBOBJ)
47142425Snectar	$(AR) $(LIB) $(LIBOBJ)
48142425Snectar	$(RANLIB) $(LIB) || echo Never mind.
49142425Snectar	@touch lib
50142425Snectar
51142425Snectar# elf
52142425Snectarasm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
53142425Snectar	(cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > r586-elf.s)
54142425Snectar
55142425Snectar# a.out
56142425Snectarasm/r586-out.o: asm/r586unix.cpp
57142425Snectar	$(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o
58142425Snectar
59142425Snectar# bsdi
60142425Snectarasm/r586bsdi.o: asm/r586unix.cpp
61142425Snectar	$(CPP) -DBSDI asm/r586unix.cpp | sed 's/ :/:/' | as -o asm/r586bsdi.o
62142425Snectar
63142425Snectarasm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
64142425Snectar	(cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp)
65142425Snectar
66142425Snectarfiles:
67142425Snectar	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
68142425Snectar
69142425Snectarlinks:
70142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
71142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
72142425Snectar	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
73142425Snectar
74142425Snectarinstall:
75142425Snectar	@for i in $(EXHEADER) ; \
76142425Snectar	do  \
77142425Snectar	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
78142425Snectar	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
79142425Snectar	done;
80142425Snectar
81142425Snectartags:
82142425Snectar	ctags $(SRC)
83142425Snectar
84142425Snectartests:
85142425Snectar
86142425Snectarlint:
87142425Snectar	lint -DLINT $(INCLUDES) $(SRC)>fluff
88142425Snectar
89142425Snectardepend:
90142425Snectar	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
91142425Snectar
92142425Snectardclean:
93142425Snectar	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
94142425Snectar	mv -f Makefile.new $(MAKEFILE)
95142425Snectar
96142425Snectarclean:
97142425Snectar	rm -f asm/r586unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
98142425Snectar
99142425Snectar# DO NOT DELETE THIS LINE -- make depend depends on it.
100142425Snectar
101142425Snectarrc5_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h
102142425Snectarrc5_ecb.o: rc5_ecb.c rc5_locl.h
103142425Snectarrc5_enc.o: ../../include/openssl/rc5.h rc5_enc.c rc5_locl.h
104142425Snectarrc5_skey.o: ../../include/openssl/rc5.h rc5_locl.h rc5_skey.c
105142425Snectarrc5cfb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5cfb64.c
106142425Snectarrc5ofb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5ofb64.c
107