Makefile 2.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#
# SSLeay/crypto/blowfish/Makefile
#

DIR=	bf
TOP=	../..
CC=	cc
CPP=	$(CC) -E
INCLUDES=
CFLAG=-g
B
Ben Laurie 已提交
11
MAKEFILE=	Makefile
12 13 14 15 16 17 18
AR=		ar r

BF_ENC=		bf_enc.o
# or use
#DES_ENC=	bx86-elf.o

CFLAGS= $(INCLUDES) $(CFLAG)
19
ASFLAGS= $(INCLUDES) $(ASFLAG)
20
AFLAGS= $(ASFLAGS)
21 22 23 24 25 26

GENERAL=Makefile
TEST=bftest.c
APPS=

LIB=$(TOP)/libcrypto.a
27 28
LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

SRC= $(LIBSRC)

EXHEADER= blowfish.h
HEADER=	bf_pi.h bf_locl.h $(EXHEADER)

ALL=    $(GENERAL) $(SRC) $(HEADER)

top:
	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)

all:	lib

lib:	$(LIBOBJ)
	$(AR) $(LIB) $(LIBOBJ)
44
	$(RANLIB) $(LIB) || echo Never mind.
45 46
	@touch lib

47
# ELF
48
bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
49 50
	(cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > ../$@)
# 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 55
bx86-out.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
	(cd asm; $(PERL) bf-586.pl a.out $(CFLAGS) $(PROCESSOR) > ../$@)
56

57
files:
B
Ben Laurie 已提交
58
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
59 60

links:
61 62 63
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64

65 66 67 68
# We need to use force because 'install' matches 'INSTALL' on case
# insensitive systems
FRC.install:
install: FRC.install
A
Andy Polyakov 已提交
69
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
70
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
71
	do  \
72 73
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
74 75 76 77 78 79 80 81 82 83 84
	done;

tags:
	ctags $(SRC)

tests:

lint:
	lint -DLINT $(INCLUDES) $(SRC)>fluff

depend:
85
	@[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
86
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
87 88

dclean:
89
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
90 91 92
	mv -f Makefile.new $(MAKEFILE)

clean:
93
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
94 95

# DO NOT DELETE THIS LINE -- make depend depends on it.
B
Ben Laurie 已提交
96

97 98 99 100
bf_cfb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_cfb64.o: ../../include/openssl/opensslconf.h bf_cfb64.c bf_locl.h
bf_ecb.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
R
Richard Levitte 已提交
101
bf_ecb.o: bf_ecb.c bf_locl.h
102 103 104 105 106 107
bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c