| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-01 20:33:00 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-01 20:33:00 +0200 |
| commit | d705e71f90bc4874fb13e4496a2ebd6968d38a79 (patch) | |
| tree | ef7f6cafdce7b2babef39f2c01ab9e66af480c55 /src/Makefile | |
| parent | cc9d637652875020e1a26874f15ff362938aa9e0 (diff) | |
Switches to Makefiles.
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..1cd5199 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,21 @@ +SRC_FILES = $(wildcard ./*.c) +OBJ_FILES = $(SRC_FILES:.c=.o) +DEP_FILES = $(SRC_FILES:.c=.d) + +build: export.a + +export.a: $(OBJ_FILES) + ar cr $@ $^ + +clean: + rm -f $(OBJ_FILES) + rm -f $(DEP_FILES) + rm -f export.a + +%.d: %.c + @set -e; rm -f $@; \ + $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ + sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ + rm -f $@.$$$$ + +include $(DEP_FILES) |


