better makefile

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@55 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-29 05:26:50 +00:00
parent 3cb4492952
commit a3d3f013d0

View File

@@ -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)