Makefile 2.1 KB
Newer Older
1 2 3 4 5 6 7
#
# SSLeay/crypto/rc4/Makefile
#

DIR=	rc4
TOP=	../..
CC=	cc
8
CPP=    $(CC) -E
9 10
INCLUDES=
CFLAG=-g
11 12
MAKEDEPPROG=	makedepend
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
13 14
AR=		ar r

15 16
RC4_ENC=rc4_enc.o

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

GENERAL=Makefile
TEST=rc4test.c
APPS=

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

SRC= $(LIBSRC)

EXHEADER= rc4.h
32
HEADER=	$(EXHEADER) rc4_locl.h
33 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)
	$(AR) $(LIB) $(LIBOBJ)
43
	$(RANLIB) $(LIB) || echo Never mind.
44 45
	@touch lib

46
# ELF
47
rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
48 49
	(cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
# COFF
50
rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
51
	(cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
52
# a.out
53 54
rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
55

56
rc4-x86_64.s: asm/rc4-x86_64.pl;	$(PERL) asm/rc4-x86_64.pl $@
A
Andy Polyakov 已提交
57

58
rc4-ia64.s: asm/rc4-ia64.S
A
Andy Polyakov 已提交
59 60
	$(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@

61
files:
B
Ben Laurie 已提交
62
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
63 64

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

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

tags:
	ctags $(SRC)

tests:

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

depend:
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

B
Bodo Möller 已提交
97 98
rc4_enc.o: rc4_enc.c rc4_locl.h
rc4_skey.o: rc4_locl.h rc4_skey.c