summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/makefile b/makefile
index 7723923..c5161ac 100644
--- a/makefile
+++ b/makefile
@@ -1,18 +1,22 @@
1.PHONY: all clean 1.PHONY: all clean
2 2
3include config.mk
4
3BIN=bin/srcut 5BIN=bin/srcut
4OBJS+=obj/srcut.o 6OBJS=obj/srcut.o
5HEADER=${wildcard include/*.hpp}
6 7
7CPPFLAGS=-Wall -Werror -std=c++20 -pedantic -Iinclude -O2 8CPPFLAGS=-Wall -Werror -std=c++20 -pedantic -Iinclude -O2
8 9
9all: $(BIN) 10all: $(BIN)
10 11
11$(BIN): $(OBJS) 12$(BIN): $(OBJS) | bin
12 c++ -o $@ $(OBJS) 13 c++ -o $@ $(OBJS)
13 14
14obj/%.o: src/%.cpp $(HEADER) 15obj/%.o: src/%.cpp | obj
15 c++ -o $@ $(CPPFLAGS) -c $< 16 c++ -o $@ $(CPPFLAGS) -c $<
16 17
18bin obj:
19 mkdir -p $@
20
17clean: 21clean:
18 rm -f obj/* bin/* 22 rm -rf obj bin