author | Emilio Largo <largo@largo.homelinux.org> |
Thu, 16 Apr 2009 12:49:12 +0200 | |
changeset 45 | 7197576fedcf |
parent 39 | 46d7ec9d63bd |
child 66 | 2b4f786d9073 |
permissions | -rw-r--r-- |
37 | 1 |
CC=gcc |
2 |
LD=ld |
|
3 |
YACC=bison -y |
|
4 |
FLEX=flex |
|
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
5 |
CFLAGS=-Wall -O2 -ansi -D_XOPEN_SOURCE=500 |
37 | 6 |
LDFLAGS= |
7 |
INCLUDE=include |
|
8 |
OBJECTS=main.o parser.o lexer.o |
|
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
9 |
TARGET=calc |
37 | 10 |
|
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
11 |
.SUFFIXES: .c .y .l |
37 | 12 |
|
39 | 13 |
.c.o: |
37 | 14 |
$(CC) -c $(CFLAGS) -I$(INCLUDE) $(CONFIG) $< |
15 |
||
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
16 |
.y.c: |
37 | 17 |
$(YACC) -d $< -o $@ |
18 |
||
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
19 |
.l.c: |
37 | 20 |
$(FLEX) -o $@ $< |
21 |
||
22 |
all: $(TARGET) |
|
23 |
||
24 |
||
25 |
$(TARGET): $(OBJECTS) |
|
26 |
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ |
|
27 |
||
28 |
.PHONY: distclean clean |
|
29 |
||
30 |
clean: |
|
31 |
rm -f *.[oae]; |
|
32 |
rm -f *~; |
|
38
48f6f3918b82
Project Split finished
Markus Bröker <mbroeker@largo.localnet>
parents:
37
diff
changeset
|
33 |
rm -f parser.h |
37 | 34 |
|
35 |
distclean: |
|
36 |
make clean |
|
37 |
rm -f $(TARGET) |