root/tags/v_1_5_0/makefile

Revision 34, 1.9 kB (checked in by jesus, 11 years ago)

clean target perlxsi.c

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 CC=gcc
2
3 #### BEGIN ARCH DEPENDANT SECTION ####
4 # For Linux
5 #LDFLAGS=-L/usr/local/lib -L.
6 #LIBS=-lsp -lskiplist
7 #CFLAGS=-g -D__USE_LARGEFILE64 -Wall
8 #MAIN=spreadlogd.o
9
10 # For FreeBSD
11 #LDFLAGS=-L/usr/local/lib -L. `perl -MExtUtils::Embed -e ldopts`
12 #LIBS=-lsp -lskiplist -lgnuregex
13 #INCLUDES=-I/usr/local/include `perl -MExtUtils::Embed -e ccopts` -DPERL
14 #CFLAGS=-g -Wall -DHAVE_GNUREGEX_H
15 #MAIN=spreadlogd-kqueue.o
16 #PERL_OBJS=perl.o perlxsi.o
17
18 #MACOSX
19 #LDFLAGS=-L/usr/local/lib -L.
20 #LIBS=-lsp -lskiplist
21 #CFLAGS=-g -Wall
22 #MAIN=spreadlogd.o
23
24 # For Solaris
25 #LIBS=-lsp -lskiplist -lnsl -lsocket -lucb
26 #LDFLAGS=-L/usr/local/lib -L/usr/ucblib -R/usr/ucblib -L.
27 #BSDINCLUDES=-I/usr/ucbinclude
28 #CFLAGS=-g -D__USE_LARGEFILE64 -Wall
29 #MAIN=spreadlogd.o
30 #### END ARCH DEPENDANT SECTION ####
31
32 YACC=bison -y
33 LEX=flex
34 AR=ar
35 RANLIB=ranlib
36
37 OBJS=lex.sld_.o y.tab.o config.o hash.o timefuncs.o $(PERL_OBJS)
38 LSLOBJS=skiplist.o
39
40 all:    spreadlogd
41
42 parser: lex.sld_.c y.tab.c y.tab.h
43
44 lex.sld_.c:     config_gram.l
45         $(LEX) -Psld_ config_gram.l
46 y.tab.c y.tab.h:        config_gram.y
47         $(YACC) -p sld_ -d config_gram.y
48 lex.sld_.o: lex.sld_.c y.tab.h
49         $(CC) $(CFLAGS) $(INCLUDES) -c lex.sld_.c
50 y.tab.o: y.tab.c config.h
51         $(CC) $(CFLAGS) $(INCLUDES) -c y.tab.c
52
53 perlxsi.c:
54         perl -MExtUtils::Embed -e xsinit -- -o perlxsi.c
55
56 test.o: test.c
57         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
58
59 config.o:       config.c
60         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
61 hash.o:         hash.c
62         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
63 .c.o:   $*.c
64         $(CC) $(CFLAGS) $(INCLUDES) -c $<
65
66 libskiplist.a:  $(LSLOBJS)
67         $(AR) cq libskiplist.a $(LSLOBJS)
68         $(RANLIB) libskiplist.a
69
70 spreadlogd:     libskiplist.a $(MAIN) $(OBJS)
71         @if test -z "$(MAIN)"; then \
72                 echo "Uncomment the correct section the makefile"; \
73                 exit; \
74         else \
75                 $(CC) -g -o $@ $(MAIN) $(OBJS) $(LDFLAGS) $(LIBS); \
76         fi
77
78 clean:
79         rm -f *~ *.o spreadlogd libskiplist.a y.tab.h y.tab.c lex.sld_.c \
80                 perlxsi.c
Note: See TracBrowser for help on using the browser.