root/src/Makefile.in

Revision 308a8d66df2cbb21de3dd87144c2d4ef3144c8d7, 2.7 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 11 years ago)

rename sample.conf to noit.conf and start on stratcond.

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