Makefile 2.6 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 25 26
LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c
LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
	$(MODES_ASM_OBJ)
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

SRC= $(LIBSRC)

#EXHEADER= store.h str_compat.h
EXHEADER= modes.h
HEADER=	$(EXHEADER)

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

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

all:	lib

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

46
ghash-ia64.s:	asm/ghash-ia64.pl
47 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) > $@
ghash-sparcv9.s:	asm/ghash-sparcv9.pl
53
	$(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
54 55
ghash-alpha.s:	asm/ghash-alpha.pl
	$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
A
Andy Polyakov 已提交
56
ghash-parisc.s:	asm/ghash-parisc.pl
57
	$(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
58

59
# GNU make "catch all"
60
ghash-%.s:	asm/ghash-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
61

62 63 64 65 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
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:
95
	rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
96 97 98

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

A
Andy Polyakov 已提交
99 100 101 102 103 104
cbc128.o: ../../include/openssl/modes.h cbc128.c modes_lcl.h
cfb128.o: ../../include/openssl/modes.h cfb128.c modes_lcl.h
ctr128.o: ../../include/openssl/modes.h ctr128.c modes_lcl.h
cts128.o: ../../include/openssl/modes.h cts128.c modes_lcl.h
gcm128.o: ../../include/openssl/modes.h gcm128.c modes_lcl.h
ofb128.o: ../../include/openssl/modes.h modes_lcl.h ofb128.c