Makefile 5.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#
# OpenSSL/crypto/modes/Makefile
#

DIR=	modes
TOP=	../..
CC=	cc
INCLUDES= -I.. -I$(TOP) -I../../include
CFLAG=-g
MAKEFILE=	Makefile
AR=		ar r

13 14
MODES_ASM_OBJ=

15
CFLAGS= $(INCLUDES) $(CFLAG)
16 17
ASFLAGS= $(INCLUDES) $(ASFLAG)
AFLAGS= $(ASFLAGS)
18 19 20 21 22 23

GENERAL=Makefile
TEST=
APPS=

LIB=$(TOP)/libcrypto.a
24
LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
25
	ccm128.c xts128.c wrap128.c
26
LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
27
	ccm128.o xts128.o wrap128.o $(MODES_ASM_OBJ)
28 29 30 31 32

SRC= $(LIBSRC)

#EXHEADER= store.h str_compat.h
EXHEADER= modes.h
33
HEADER=	modes_lcl.h $(EXHEADER)
34 35 36 37 38 39 40 41 42

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

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

all:	lib

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

47
ghash-ia64.s:	asm/ghash-ia64.pl
48 49 50 51 52
	$(PERL) asm/ghash-ia64.pl $@ $(CFLAGS)
ghash-x86.s:	asm/ghash-x86.pl
	$(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
ghash-x86_64.s:	asm/ghash-x86_64.pl
	$(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
A
Andy Polyakov 已提交
53 54
aesni-gcm-x86_64.s:	asm/aesni-gcm-x86_64.pl
	$(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@
55
ghash-sparcv9.s:	asm/ghash-sparcv9.pl
56
	$(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
57 58
ghash-alpha.s:	asm/ghash-alpha.pl
	$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
A
Andy Polyakov 已提交
59
ghash-parisc.s:	asm/ghash-parisc.pl
60
	$(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
61

62
# GNU make "catch all"
63 64 65
ghash-%.S:	asm/ghash-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@

ghash-armv4.o:	ghash-armv4.S
66

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
files:
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

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

install:
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
	@headerlist="$(EXHEADER)"; for i in $$headerlist; \
	do  \
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
	done;

tags:
	ctags $(SRC)

tests:

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

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

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

clean:
100
	rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
101 102 103

# DO NOT DELETE THIS LINE -- make depend depends on it.

D
Dr. Stephen Henson 已提交
104 105 106 107
cbc128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
cbc128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
cbc128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
cbc128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
108
cbc128.o: ../../include/openssl/symhacks.h cbc128.c modes_lcl.h
B
Bodo Möller 已提交
109 110 111 112
ccm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ccm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
ccm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ccm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
113
ccm128.o: ../../include/openssl/symhacks.h ccm128.c modes_lcl.h
D
Dr. Stephen Henson 已提交
114 115 116 117
cfb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
cfb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
cfb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
cfb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
118
cfb128.o: ../../include/openssl/symhacks.h cfb128.c modes_lcl.h
D
Dr. Stephen Henson 已提交
119 120 121 122
ctr128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ctr128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
ctr128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ctr128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
123
ctr128.o: ../../include/openssl/symhacks.h ctr128.c modes_lcl.h
D
Dr. Stephen Henson 已提交
124 125 126 127
cts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
cts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
cts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
cts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
128
cts128.o: ../../include/openssl/symhacks.h cts128.c modes_lcl.h
B
Bodo Möller 已提交
129
gcm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
B
Bodo Möller 已提交
130 131 132
gcm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
gcm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
gcm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
133
gcm128.o: ../../include/openssl/symhacks.h gcm128.c modes_lcl.h
D
Dr. Stephen Henson 已提交
134 135 136 137
ofb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ofb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
ofb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ofb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
138
ofb128.o: ../../include/openssl/symhacks.h modes_lcl.h ofb128.c
B
Bodo Möller 已提交
139 140 141 142
xts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
xts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
xts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
xts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
B
Ben Laurie 已提交
143
xts128.o: ../../include/openssl/symhacks.h modes_lcl.h xts128.c