root/trunk/makefile

Revision 6, 1.0 kB (checked in by jesus, 14 years ago)

Updated regex support to use Solaris native regex's under Solaris and the
GNU regex under Linux. Fixed rejoin after disconnect bug.
Robustified makefile for Solaris.

  • 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 CFLAGS=-g -D__USE_LARGEFILE64
3 INCLUDES=-I/usr/local/include
4
5 #### BEGIN ARCH DEPENDANT SECTION ####
6 # For Linux
7 LDFLAGS=-L/usr/local/lib -L.
8 LIBS=-lsp -lskiplist
9
10 # For Solaris
11 #LIBS=-lsp -lskiplist -lnsl -lsocket -lucb
12 #LDFLAGS=-L/usr/local/lib -L/usr/ucblib -R/usr/ucblib -L.
13 #BSDINCLUDES=-I/usr/ucbinclude
14 #### END ARCH DEPENDANT SECTION ####
15
16 YACC=bison -y
17 LEX=flex
18
19 OBJS=spreadlogd.o lex.yy.o y.tab.o config.o
20 LSLOBJS=skiplist.o
21
22 all:    spreadlogd
23
24 parser: lex.yy.c y.tab.c y.tab.h
25
26 lex.yy.c:       config_gram.l
27         $(LEX) config_gram.l
28 y.tab.c y.tab.h:        config_gram.y
29         $(YACC) -d config_gram.y
30 lex.yy.o: lex.yy.c y.tab.h
31         $(CC) $(CFLAGS) $(INCLUDES) -c lex.yy.c
32 y.tab.o: y.tab.c config.h
33         $(CC) $(CFLAGS) $(INCLUDES) -c y.tab.c
34
35 config.o:       config.c
36         $(CC) $(CFLAGS) $(BSDINCLUDES) $(INCLUDES) -c $<
37
38 .c.o:   $*.c
39         $(CC) $(CFLAGS) $(INCLUDES) -c $<
40
41 libskiplist.a:  $(LSLOBJS)
42         $(AR) cq libskiplist.a $(LSLOBJS)
43
44 spreadlogd:     libskiplist.a $(OBJS)
45         $(CC) -g -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
46
47 clean:
48         rm -f *~ *.o spreadlogd libskiplist.a y.tab.h y.tab.c lex.yy.c
Note: See TracBrowser for help on using the browser.