root/src/Makefile.in

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

need to find postgres includes and pass CFLAGS and LDFLAGS to serf's build, refs #32

  • 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 WHOLE_ARCHIVE=@WHOLE_ARCHIVE@
27 NOWHOLE_ARCHIVE=@NOWHOLE_ARCHIVE@
28
29 SUBS=lua utils eventer modules noitedit
30
31 NOIT_OBJS=noitd.o noit_listener.o \
32         noit_console.o noit_console_state.o noit_console_telnet.o \
33         noit_check.o noit_check_log.o noit_check_tools.o \
34         noit_module.o noit_conf.o noit_conf_checks.o noit_tokenizer.o \
35         noit_jlog_listener.o noit_filters.o
36
37 STRATCON_OBJS=stratcond.o noit_listener.o \
38         noit_console.o noit_console_state.o noit_console_telnet.o \
39         noit_conf.o noit_tokenizer.o \
40         stratcon_jlog_streamer.o stratcon_datastore.o
41
42 all:    noitd stratcond
43
44 make-subdirs:   serf/.libs/libserf-0.o jlog/libjlog.a
45         for dir in $(SUBS) ; do \
46                 (cd $$dir && make) ; \
47         done
48
49 jlog/libjlog.a:
50         (cd jlog && make libjlog.a)
51
52 serf/.libs/libserf-0.a:
53         (cd serf && \
54                 env \
55                 CFLAGS="$(CFLAGS)" \
56                 LDFLAGS="$(LDFLAGS)" \
57                 python serfmake --with-apr=@APRPREFIX@)
58
59 serf/.libs/libserf-0.o: serf/.libs/libserf-0.a
60         ld -r -o serf/.libs/libserf-0.o \
61                 serf/.libs/context.o serf/buckets/.libs/*.o
62
63 noitd:  make-subdirs $(NOIT_OBJS)
64         @$(CC) -o $@ $(NOIT_OBJS) \
65                 $(LDFLAGS) \
66                 $(WHOLE_ARCHIVE) \
67                 -Leventer -leventer \
68                 -Lutils -lnoit_utils \
69                 -Ljlog -ljlog \
70                 -Lnoitedit -lnoitedit \
71                 $(NOWHOLE_ARCHIVE) \
72                 $(LIBS)
73         @echo "- linking $@"
74
75 stratcond:      make-subdirs $(STRATCON_OBJS)
76         @$(CC) -o $@ $(STRATCON_OBJS) \
77                 $(LDFLAGS) \
78                 $(WHOLE_ARCHIVE) \
79                 -Leventer -leventer \
80                 -Lutils -lnoit_utils \
81                 -Ljlog -ljlog \
82                 -Lnoitedit -lnoitedit \
83                 $(NOWHOLE_ARCHIVE) \
84                 $(LIBS) $(PGLIBS)
85         @echo "- linking $@"
86
87 .c.o:
88         @$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
89         @echo "- compiling $<"
90
91 noit_tokenizer.c:       noit_tokenizer.re
92         @re2c -o $@ noit_tokenizer.re
93         @echo "- re2c $<"
94
95 clean-subdirs:
96         for dir in $(SUBS) ; do \
97                 (cd $$dir && make clean) ; \
98         done
99
100 clean:  clean-subdirs
101         rm -f *.o noitd
102
Note: See TracBrowser for help on using the browser.