Makefile 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9
#
# SSLeay/crypto/rand/Makefile
#

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

CFLAGS= $(INCLUDES) $(CFLAG)

GENERAL=Makefile
TEST= randtest.c
APPS=

LIB=$(TOP)/libcrypto.a
22
LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
R
Richard Levitte 已提交
23
	rand_win.c rand_unix.c rand_os2.c rand_nw.c
24
LIBOBJ=md_rand.o randfile.o rand_lib.o rand_err.o rand_egd.o \
R
Richard Levitte 已提交
25
	rand_win.o rand_unix.o rand_os2.o rand_nw.o
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

SRC= $(LIBSRC)

EXHEADER= rand.h
HEADER=	$(EXHEADER)

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

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

all:	lib

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

files:
B
Ben Laurie 已提交
45
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
46 47

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

install:
A
Andy Polyakov 已提交
53
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
54
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
55
	do  \
56 57
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
58 59 60 61 62 63 64 65 66 67 68
	done;

tags:
	ctags $(SRC)

tests:

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

depend:
69
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
70 71

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

clean:
76
	rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
77 78

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

G
Geoff Thorpe 已提交
80 81
rand_egd.o: rand_egd.c
rand_err.o: rand_err.c
B
Bodo Möller 已提交
82 83 84 85
rand_lib.o: rand_lib.c
rand_nw.o: rand_lcl.h rand_nw.c
rand_os2.o: rand_lcl.h rand_os2.c
rand_win.o: rand_lcl.h rand_win.c