blob: c1da3e211d873a3d0206b9e3251b563c2a724c5f (
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))
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,%,$@) $<
|