root/trunk/makefile

Revision 23, 1.7 kB (checked in by jesus, 11 years ago)

perl interp

  • 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 INCLUDES=-I/usr/local/include
3
4 INCLUDES=-I/usr/local/include `perl -MExtUtils::Embed -e ccopts`
5
6 #### BEGIN ARCH DEPENDANT SECTION ####
7 # For Linux
8 #LDFLAGS=-L/usr/local/lib -L.
9 #LIBS=-lsp -lskiplist
10 #CFLAGS=-g -D__USE_LARGEFILE64 -Wall
11
12 # For FreeBSD
13 #LDFLAGS=-L/usr/local/lib -L. `perl -MExtUtils::Embed -e ldopts`
14 #LIBS=-lsp -lskiplist -lgnuregex
15 #CFLAGS=-g -Wall -DHAVE_GNUREGEX_H
16
17 #MACOSX
18 LDFLAGS=-L/usr/local/lib -L. `perl -MExtUtils::Embed -e ldopts`
19 LIBS=-lsp -lskiplist
20 CFLAGS=-g -Wall
21
22 # For Solaris
23 #LIBS=-lsp -lskiplist -lnsl -lsocket -lucb
24 #LDFLAGS=-L/usr/local/lib -L/usr/ucblib -R/usr/ucblib -L.
25 #BSDINCLUDES=-I/usr/ucbinclude
26 #CFLAGS=-g -D__USE_LARGEFILE64 -Wall
27 #### END ARCH DEPENDANT SECTION ####
28
29 YACC=bison -y
30 LEX=flex
31 AR=ar
32 RANLIB=ranlib
33
34 OBJS=spreadlogd.o lex.sld_.o y.tab.o config.o hash.o timefuncs.o perl.o perlxsi.o
35 LSLOBJS=skiplist.o
36
37 all:    spreadlogd
38
39 parser: lex.sld_.c y.tab.c y.tab.h
40
41 lex.sld_.c:     config_gram.l
42         $(LEX) -Psld_ config_gram.l
43 y.tab.c y.tab.h:        config_gram.y
44         $(YACC) -p sld_ -d config_gram.y
45 lex.sld_.o: lex.sld_.c y.tab.h
46         $(CC) $(CFLAGS) $(INCLUDES) -c lex.sld_.c
47 y.tab.o: y.tab.c config.h
48         $(CC) $(CFLAGS) $(INCLUDES) -c y.tab.c
49
50 perlxsi.c:
51         perl -MExtUtils::Embed -e xsinit -- -o perlxsi.c
52
53 test.o: test.c
54         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
55
56 config.o:       config.c
57         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
58 hash.o:         hash.c
59         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
60 .c.o:   $*.c
61         $(CC) $(CFLAGS) $(INCLUDES) -c $<
62
63 libskiplist.a:  $(LSLOBJS)
64         $(AR) cq libskiplist.a $(LSLOBJS)
65         $(RANLIB) libskiplist.a
66
67 spreadlogd:     libskiplist.a $(OBJS)
68         $(CC) -g -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
69
70 clean:
71         rm -f *~ *.o spreadlogd libskiplist.a y.tab.h y.tab.c lex.sld_.c
Note: See TracBrowser for help on using the browser.