From a3d3f013d0e6aeb3e5a6d8ce3e1fb5138c6f8887 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 29 Sep 2025 05:26:50 +0000 Subject: [PATCH] better makefile git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@55 b9cfdab3-6d41-4d17-bbe4-086880011989 --- GNUmakefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index fb8cd77..14571e6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,11 +47,13 @@ SO = .dll EXEC = .exe endif +EXAMPLES = examples/example$(EXEC) + .PHONY: all format clean lib examples all: lib examples lib: src/libMw$(SO) -examples: examples/example$(EXEC) +examples: $(EXAMPLES) format: clang-format --verbose -i $(shell find src include -name "*.c" -or -name "*.h") @@ -69,4 +71,4 @@ examples/%.o: examples/%.o $(CC) $(E_CFLAGS) -c -o $@ $< clean: - rm -f src/*.dll src/*.so src/*.a src/*.lib */*.o examples/*.exe examples/example + rm -f src/*.dll src/*.so src/*.a src/*.lib */*.o examples/*.exe $(EXAMPLES)