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

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

CAST_ENC=c_enc.o

CFLAGS= $(INCLUDES) $(CFLAG)
19
ASFLAGS= $(INCLUDES) $(ASFLAG)
20
AFLAGS= $(ASFLAGS)
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

GENERAL=Makefile
TEST=casttest.c
APPS=

LIB=$(TOP)/libcrypto.a
LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c 
LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o

SRC= $(LIBSRC)

EXHEADER= cast.h
HEADER=	cast_s.h cast_lcl.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
cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
49 50
	(cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > ../$@)
# COFF
51
cx86-cof.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
52
	(cd asm; $(PERL) cast-586.pl coff $(CLAGS) $(PROCESSOR) > ../$@)
53
# a.out
54 55
cx86-out.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
	(cd asm; $(PERL) cast-586.pl a.out $(CLAGS) $(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

install:
A
Andy Polyakov 已提交
66
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
67
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
68
	do  \
69 70
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
71 72 73 74 75 76 77 78 79 80 81
	done;

tags:
	ctags $(SRC)

tests:

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

depend:
82
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
83 84

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

clean:
89
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
90 91

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