Makefile 3.3 KB
Newer Older
1
#
2
# OpenSSL/crypto/rc4/Makefile
3 4 5 6 7
#

DIR=	rc4
TOP=	../..
CC=	cc
8
CPP=    $(CC) -E
9 10 11 12
INCLUDES=
CFLAG=-g
AR=		ar r

13
RC4_ENC=rc4_enc.o rc4_skey.o
14

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

GENERAL=Makefile
TEST=rc4test.c
APPS=

LIB=$(TOP)/libcrypto.a
24
LIBSRC=rc4_skey.c rc4_enc.c
25
LIBOBJ=$(RC4_ENC)
26 27 28 29

SRC= $(LIBSRC)

EXHEADER= rc4.h
30
HEADER=	$(EXHEADER) rc4_locl.h
31 32 33 34 35 36 37 38 39

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

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

all:	lib

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

A
Andy Polyakov 已提交
44 45
rc4-586.s:	asm/rc4-586.pl ../perlasm/x86asm.pl
	$(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
46

47 48
rc4-x86_64.s: asm/rc4-x86_64.pl
	$(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
A
Andy Polyakov 已提交
49

A
Andy Polyakov 已提交
50 51 52
rc4-ia64.S: asm/rc4-ia64.pl
	$(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@

A
Andy Polyakov 已提交
53 54 55
rc4-parisc.s:	asm/rc4-parisc.pl
	$(PERL) asm/rc4-parisc.pl $(PERLASM_SCHEME) $@

A
Andy Polyakov 已提交
56
rc4-ia64.s: rc4-ia64.S
57
	@case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
A
Andy Polyakov 已提交
58 59
	int)	set -x; $(CC) $(CFLAGS) -DSZ=4 -E rc4-ia64.S > $@ ;; \
	char)	set -x; $(CC) $(CFLAGS) -DSZ=1 -E rc4-ia64.S > $@ ;; \
60 61
	*)	exit 1 ;; \
	esac
A
Andy Polyakov 已提交
62

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

66
files:
B
Ben Laurie 已提交
67
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
68 69

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

install:
A
Andy Polyakov 已提交
75
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
76
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
77
	do  \
78 79
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
80 81 82 83 84 85 86 87 88 89 90
	done;

tags:
	ctags $(SRC)

tests:

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

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

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

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

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

103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
rc4_enc.o: ../../e_os.h ../../include/openssl/bio.h
rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
rc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
rc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h
rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h
rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c