07d33fc8b7c937606e27159b395cddb28c78a5f8
[openssl.git] / crypto / rc5 / Makefile
1 #
2 # SSLeay/crypto/rc5/Makefile
3 #
4
5 DIR=    rc5
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=
10 CFLAG=-g
11 MAKEDEPPROG=    makedepend
12 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
13 MAKEFILE=       Makefile
14 AR=             ar r
15
16 RC5_ENC=                rc5_enc.o
17 # or use
18 #DES_ENC=       r586-elf.o
19
20 CFLAGS= $(INCLUDES) $(CFLAG)
21 ASFLAGS= $(INCLUDES) $(ASFLAG)
22 AFLAGS= $(ASFLAGS)
23
24 GENERAL=Makefile
25 TEST=rc5test.c
26 APPS=
27
28 LIB=$(TOP)/libcrypto.a
29 LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c 
30 LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o
31
32 SRC= $(LIBSRC)
33
34 EXHEADER= rc5.h
35 HEADER= rc5_locl.h $(EXHEADER)
36
37 ALL=    $(GENERAL) $(SRC) $(HEADER)
38
39 top:
40         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42 all:    lib
43
44 lib:    $(LIBOBJ)
45         $(AR) $(LIB) $(LIBOBJ)
46         $(RANLIB) $(LIB) || echo Never mind.
47         @touch lib
48
49 # ELF
50 r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
51         (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > ../$@)
52 # COFF
53 r586-cof.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
54         (cd asm; $(PERL) rc5-586.pl coff $(CFLAGS) > ../$@)
55 # a.out
56 r586-out.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
57         (cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) > ../$@)
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         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
85
86 dclean:
87         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
88         mv -f Makefile.new $(MAKEFILE)
89
90 clean:
91         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
92
93 # DO NOT DELETE THIS LINE -- make depend depends on it.
94
95 rc5_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
96 rc5_ecb.o: ../../include/openssl/rc5.h rc5_ecb.c rc5_locl.h
97 rc5_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
98 rc5_enc.o: rc5_enc.c rc5_locl.h
99 rc5_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
100 rc5_skey.o: rc5_locl.h rc5_skey.c
101 rc5cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
102 rc5cfb64.o: rc5_locl.h rc5cfb64.c
103 rc5ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h
104 rc5ofb64.o: rc5_locl.h rc5ofb64.c