aboutsummaryrefslogtreecommitdiff
path: root/Makefile.slim
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.slim')
-rw-r--r--Makefile.slim24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile.slim b/Makefile.slim
new file mode 100644
index 0000000..c1da3e2
--- /dev/null
+++ b/Makefile.slim
@@ -0,0 +1,24 @@
1SRC:=$(sort $(wildcard src/*.cpp))
2OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC))
3
4.PHONY: all clean
5
6all: build
7
8clean:
9 -rm -Rf build $(OBJ)
10
11build: src/build.yy.c src/build.tab.c $(OBJ)
12 g++ -ggdb -ldl -o build $(OBJ)
13
14%.o: %.cpp
15 g++ -ggdb -Isrc -c -o $@ $<
16
17%.o: %.c
18 g++ -ggdb -Isrc -c -o $@ $<
19
20%.yy.c: %.l
21 flex --bison-bridge --bison-locations -o $@ $<
22
23%.tab.c: %.y
24 bison -v -b$(patsubst %.tab.c,%,$@) $<