root/trunk/makefile

Revision 2, 0.7 kB (checked in by jesus, 14 years ago)

Initial revision

  • 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 -Wall -D__USE_LARGEFILE64
3 INCLUDES=-I/usr/local/include
4 LDFLAGS=-L/usr/local/lib -L.
5 LIBS=-lsp -lskiplist
6
7 YACC=bison -y
8 LEX=flex
9
10 OBJS=spreadlogd.o lex.yy.o y.tab.o config.o
11 LSLOBJS=skiplist.o
12
13 all:    spreadlogd
14
15 parser: lex.yy.c y.tab.c y.tab.h
16
17 lex.yy.c:       config_gram.l
18         $(LEX) config_gram.l
19 y.tab.c y.tab.h:        config_gram.y
20         $(YACC) -d config_gram.y
21 lex.yy.o: lex.yy.c y.tab.h
22         $(CC) $(CFLAGS) $(INCLUDES) -c lex.yy.c
23 y.tab.o: y.tab.c config.h
24         $(CC) $(CFLAGS) $(INCLUDES) -c y.tab.c
25
26 .c.o:   $*.c
27         $(CC) $(CFLAGS) $(INCLUDES) -c $<
28
29 libskiplist.a:  $(LSLOBJS)
30         $(AR) cq libskiplist.a $(LSLOBJS)
31
32 spreadlogd:     libskiplist.a $(OBJS)
33         $(CC) -g -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
34
35 clean:
36         rm -f *~ *.o spreadlogd libskiplist.a y.tab.h y.tab.c lex.yy.c
Note: See TracBrowser for help on using the browser.