summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-07-18 22:12:32 +0200
committerThomas Schmucker <ts@its1.de>2026-07-18 22:12:32 +0200
commite6e360a87ba7b67a7d894c91a8397616892ce420 (patch)
tree4f3c680fc492e4ab7c8f60a931546643d560e85d
parentf954c1b8350118107d7f2e7ddab42e5ca7f6a052 (diff)
downloadscissor-e6e360a87ba7b67a7d894c91a8397616892ce420.tar.gz
scissor-e6e360a87ba7b67a7d894c91a8397616892ce420.tar.bz2
scissor-e6e360a87ba7b67a7d894c91a8397616892ce420.zip
Makefile modernisiert
-rw-r--r--config.mk1
-rw-r--r--makefile14
2 files changed, 10 insertions, 5 deletions
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..c718b91
--- /dev/null
+++ b/config.mk
@@ -0,0 +1 @@
CPPFLAGS=-Wall -Werror -std=c++20 -pedantic -O2
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