From e6e360a87ba7b67a7d894c91a8397616892ce420 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sat, 18 Jul 2026 22:12:32 +0200 Subject: Makefile modernisiert --- makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 7723923..c5161ac 100644 --- a/makefile +++ b/makefile @@ -1,18 +1,22 @@ .PHONY: all clean +include config.mk + BIN=bin/srcut -OBJS+=obj/srcut.o -HEADER=${wildcard include/*.hpp} +OBJS=obj/srcut.o CPPFLAGS=-Wall -Werror -std=c++20 -pedantic -Iinclude -O2 all: $(BIN) -$(BIN): $(OBJS) +$(BIN): $(OBJS) | bin c++ -o $@ $(OBJS) -obj/%.o: src/%.cpp $(HEADER) +obj/%.o: src/%.cpp | obj c++ -o $@ $(CPPFLAGS) -c $< +bin obj: + mkdir -p $@ + clean: - rm -f obj/* bin/* + rm -rf obj bin -- cgit v1.3