blob: d12435fb3bf99f57e64531673ee23e95e61db827 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
SRC:=$(sort $(wildcard src/*.cpp) $(wildcard src/bu/*.cpp))
OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC))
.PHONY: all clean
all: build
clean:
-rm -Rf build $(OBJ)
build: src/build.yy.c src/build.tab.c $(OBJ)
g++ -ggdb -ldl -o build $(OBJ)
%.o: %.cpp
g++ -ggdb -Isrc -c -o $@ $<
%.o: %.c
g++ -ggdb -Isrc -c -o $@ $<
%.yy.c: %.l
flex --bison-bridge --bison-locations -o $@ $<
%.tab.c: %.y
bison -v -b$(patsubst %.tab.c,%,$@) $<
|