6e9c2b15ae662515e2f9a4cbb0a852cc871c82d4
[openssl.git] / crypto / rand / Makefile
1 #
2 # SSLeay/crypto/rand/Makefile
3 #
4
5 DIR=    rand
6 TOP=    ../..
7 CC=     cc
8 INCLUDES=
9 CFLAG=-g
10 MAKEDEPPROG=    makedepend
11 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
12 MAKEFILE=       Makefile
13 AR=             ar r
14
15 CFLAGS= $(INCLUDES) $(CFLAG)
16
17 GENERAL=Makefile
18 TEST= randtest.c
19 APPS=
20
21 LIB=$(TOP)/libcrypto.a
22 LIBSRC=md_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
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 \
25         rand_win.o rand_unix.o rand_os2.o rand_nw.o
26
27 SRC= $(LIBSRC)
28
29 EXHEADER= rand.h
30 HEADER= $(EXHEADER)
31
32 ALL=    $(GENERAL) $(SRC) $(HEADER)
33
34 top:
35         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
36
37 all:    lib
38
39 lib:    $(LIBOBJ)
40         $(AR) $(LIB) $(LIBOBJ)
41         $(RANLIB) $(LIB) || echo Never mind.
42         @touch lib
43
44 files:
45         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
46
47 links:
48         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
49         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
50         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
51
52 install:
53         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
54         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
55         do  \
56         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
57         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
58         done;
59
60 tags:
61         ctags $(SRC)
62
63 tests:
64
65 lint:
66         lint -DLINT $(INCLUDES) $(SRC)>fluff
67
68 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         mv -f Makefile.new $(MAKEFILE)
74
75 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.
79
80 rand_egd.o: rand_egd.c
81 rand_err.o: rand_err.c
82 rand_lib.o: rand_lib.c
83 rand_nw.o: rand_lcl.h rand_nw.c
84 rand_os2.o: rand_lcl.h rand_os2.c
85 rand_win.o: rand_lcl.h rand_win.c