root/src/Makefile.in

Revision fae36de7018c6dd78c9d31601985c2996a9991a2, 2.8 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 6 years ago)

Make the creation of test certs independent of the all target

  • Property mode set to 100644
Line 
1 CC=@CC@
2 CPPFLAGS=@CPPFLAGS@
3 CFLAGS=@CFLAGS@
4 LDFLAGS=@LDFLAGS@
5 AR=@AR@
6 RANLIB=@RANLIB@
7 LIBS=@LIBS@
8 PGLIBS=@PGLIBS@
9 INSTALL=@INSTALL@
10
11 prefix=@prefix@
12 exec_prefix=@exec_prefix@
13 bindir=@bindir@
14 sbindir=@sbindir@
15 libdir=@libdir@
16 includedir=${prefix}/include
17 libexecdir=@libexecdir@
18 datarootdir = @datarootdir@
19 mandir=@mandir@
20 mansubdir=@mansubdir@
21 docdir=${prefix}/@docdir@
22 sysconfdir=@sysconfdir@
23 srcdir=@srcdir@
24 top_srcdir=@top_srcdir@
25
26 SUBS=utils jlog eventer modules noitedit
27
28 NOIT_OBJS=noitd.o noit_listener.o \
29         noit_console.o noit_console_state.o noit_console_telnet.o \
30         noit_check.o noit_check_log.o noit_check_tools.o \
31         noit_module.o noit_conf.o noit_conf_checks.o noit_tokenizer.o \
32         noit_jlog_listener.o
33
34 STRATCON_OBJS=stratcond.o noit_listener.o \
35         noit_console.o noit_console_state.o noit_console_telnet.o \
36         noit_conf.o noit_tokenizer.o \
37         stratcon_jlog_streamer.o stratcon_datastore.o
38
39 all:    noitd stratcond
40
41 make-subdirs:   serf/.libs/libserf-0.a
42         for dir in $(SUBS) ; do \
43                 (cd $$dir && make) ; \
44         done
45
46 serf/.libs/libserf-0.a:
47         (cd serf && python serfmake)
48
49 noitd:  make-subdirs $(NOIT_OBJS)
50         $(CC) -o $@ $(NOIT_OBJS) \
51                 $(LDFLAGS) \
52                 -Leventer -leventer \
53                 -Lutils -lnoit_utils \
54                 -Ljlog -ljlog \
55                 -Lnoitedit -lnoitedit \
56                 $(LIBS)
57
58 stratcond:      make-subdirs $(STRATCON_OBJS)
59         $(CC) -o $@ $(STRATCON_OBJS) \
60                 $(LDFLAGS) \
61                 -Leventer -leventer \
62                 -Lutils -lnoit_utils \
63                 -Ljlog -ljlog \
64                 -Lnoitedit -lnoitedit \
65                 $(LIBS) $(PGLIBS)
66
67 .c.o:
68         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
69
70 noit_tokenizer.c:       noit_tokenizer.re
71         re2c -o $@ noit_tokenizer.re
72
73 # This stuff if all cert stuff to make testing the daemons easier
74
75 demoCA-dir:
76         @mkdir -p demoCA
77         @touch demoCA/index.txt
78         @test -f demoCA/serial || echo 00 > demoCA/serial
79
80 test-ca.key:
81         openssl genrsa -out test-ca.key
82
83 test-ca.csr:    test-ca.key
84         openssl req -key test-ca.key -days 365 -new -out test-ca.csr
85
86 test-ca.crt:    test-ca.key test-ca.csr
87         openssl x509 -req -in test-ca.csr -signkey test-ca.key -out test-ca.crt
88
89 test.key:
90         openssl genrsa -out test.key
91
92 test.csr:       test.key
93         openssl req -key test.key -days 365 -new -out test.csr
94
95 test.crt:       test.csr test-ca.key
96         openssl ca -in test.csr -out test.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
97
98 test-strat.key:
99         openssl genrsa -out test-strat.key
100
101 test-strat.csr: test-strat.key
102         openssl req -key test-strat.key -days 365 -new -out test-strat.csr
103
104 test-strat.crt: test-strat.csr test-ca.key
105         openssl ca -in test-strat.csr -out test-strat.crt -outdir . -keyfile test-ca.key -cert test-ca.crt -days 120
106
107 testcerts:      demoCA-dir test.key test.crt test-strat.key test-strat.crt test-ca.key test-ca.crt
108
109 clean-subdirs:
110         for dir in $(SUBS) ; do \
111                 (cd $$dir && make clean) ; \
112         done
113
114 clean-keys:
115         test.key test.csr test.crt test-strat.key test-strat.csr test-strat.crt
116
117 clean:  clean-subdirs
118         rm -f *.o noitd
119
Note: See TracBrowser for help on using the browser.