aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 65163ff..c7761c0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
+CXXFILES := main.cpp parser.cpp llvm.cpp ast.cpp var.cpp
+CXXFLAGS := `llvm-config --cxxflags` -std=c++20 -ggdb -O0 -g3
+LDFLAGS := `llvm-config --ldflags --system-libs --libs core`
+
all: main
-main: main.cpp
- $(CXX) -o $@ $^ `llvm-config --cxxflags --ldflags --system-libs --libs core` -std=c++20 -ggdb -O0 -g3
+main: $(subst .cpp,.o,$(CXXFILES))
+ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
prog: main test.fp
./main < test.fp 2> forsp.ir