1 |
bertho |
1.1 |
# Directories
|
2 |
|
|
prefix = @prefix@
|
3 |
|
|
ETCDIR = $(prefix)/etc
|
4 |
|
|
|
5 |
|
|
# Set to your utilities
|
6 |
|
|
CC = @CC@
|
7 |
|
|
LEX = @LEX@
|
8 |
|
|
YACC = @YACC@
|
9 |
|
|
RM = rm -f
|
10 |
|
|
|
11 |
|
|
LIBS = @LDFLAGS@
|
12 |
|
|
CFLAGS = @CFLAGS@ -DETCDIR=\"$(ETCDIR)\"
|
13 |
|
|
|
14 |
|
|
# Everything below here should be alright
|
15 |
|
|
TARGET = cvsgraph
|
16 |
|
|
|
17 |
|
|
CSRCS =\
|
18 |
|
|
cvsgraph.c\
|
19 |
|
|
utils.c
|
20 |
|
|
|
21 |
|
|
GENSRCS =\
|
22 |
|
|
y.tab.c\
|
23 |
|
|
lex.yy.c
|
24 |
|
|
|
25 |
|
|
COBJS = $(CSRCS:.c=.o)
|
26 |
|
|
GENOBJS = $(GENSRCS:.c=.o)
|
27 |
|
|
|
28 |
|
|
.c.o:
|
29 |
|
|
$(CC) $(CFLAGS) -c -o $*.o $<
|
30 |
|
|
|
31 |
|
|
$(TARGET): $(COBJS) $(GENOBJS)
|
32 |
|
|
$(CC) $(CFLAGS) -o $(TARGET) $(COBJS) $(GENOBJS) $(LIBS)
|
33 |
|
|
|
34 |
bertho |
1.2 |
cvsgraph.o: cvsgraph.c config.h cvsgraph.h utils.h readconf.h
|
35 |
bertho |
1.1 |
utils.o: utils.c utils.h readconf.h
|
36 |
|
|
|
37 |
|
|
y.tab.o: y.tab.c cvsgraph.h utils.h readconf.h
|
38 |
bertho |
1.2 |
lex.yy.o: lex.yy.c y.tab.h readconf.h utils.h
|
39 |
bertho |
1.1 |
|
40 |
|
|
y.tab.c y.tab.h: confy.y
|
41 |
|
|
$(YACC) -d confy.y
|
42 |
|
|
|
43 |
|
|
lex.yy.c: confl.l
|
44 |
|
|
$(LEX) -8 confl.l
|
45 |
|
|
|
46 |
|
|
clean::
|
47 |
|
|
$(RM) *.o $(TARGET) $(GENSRCS) y.tab.h
|
48 |
bertho |
1.2 |
|
49 |
|
|
distclean: clean
|
50 |
|
|
$(RM) config.cache config.status config.log Makefile config.h
|
51 |
|
|
|