Update perl asm scripts include paths for perlasm.
[openssl.git] / crypto / bf / Makefile
1 #
2 # OpenSSL/crypto/blowfish/Makefile
3 #
4
5 DIR=    bf
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=
10 CFLAG=-g
11 MAKEFILE=       Makefile
12 AR=             ar r
13
14 BF_ENC=         bf_enc.o
15 # or use
16 #DES_ENC=       bx86-elf.o
17
18 CFLAGS= $(INCLUDES) $(CFLAG)
19 ASFLAGS= $(INCLUDES) $(ASFLAG)
20 AFLAGS= $(ASFLAGS)
21
22 GENERAL=Makefile
23 TEST=bftest.c
24 APPS=
25
26 LIB=$(TOP)/libcrypto.a
27 LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
28 LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
29
30 SRC= $(LIBSRC)
31
32 EXHEADER= blowfish.h
33 HEADER= bf_pi.h bf_locl.h $(EXHEADER)
34
35 ALL=    $(GENERAL) $(SRC) $(HEADER)
36
37 top:
38         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40 all:    lib
41
42 lib:    $(LIBOBJ)
43         $(AR) $(LIB) $(LIBOBJ)
44         $(RANLIB) $(LIB) || echo Never mind.
45         @touch lib
46
47 # ELF
48 bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
49         (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
50 # COFF
51 bx86-cof.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
52         (cd asm; $(PERL) bf-586.pl coff $(CFLAGS) $(PROCESSOR) > ../$@)
53 # a.out
54 bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
55         (cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
56 bx86-macosx.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
57         (cd asm; $(PERL) bf-586.pl macosx $(CFLAGS) $(PROCESSOR) > ../$@)
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 # We need to use force because 'install' matches 'INSTALL' on case
68 # insensitive systems
69 FRC.install:
70 install: FRC.install
71         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
72         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
73         do  \
74         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
75         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
76         done;
77
78 tags:
79         ctags $(SRC)
80
81 tests:
82
83 lint:
84         lint -DLINT $(INCLUDES) $(SRC)>fluff
85
86 depend:
87         @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
88         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
89
90 dclean:
91         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
92         mv -f Makefile.new $(MAKEFILE)
93
94 clean:
95         rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
96
97 # DO NOT DELETE THIS LINE -- make depend depends on it.
98
99 bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
100 bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
101 bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
102 bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
103 bf_ecb.o: bf_ecb.c bf_locl.h
104 bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
105 bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
106 bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
107 bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
108 bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
109 bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c