diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-07-12 15:19:57 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-07-12 15:19:57 +0200 |
| commit | c17b523d4710134218bca4f2fdbe8fd0cee39ecd (patch) | |
| tree | 2d404a33440469804ef9f01162e52edb1bd70df4 /makefile | |
| download | use-zlib-c17b523d4710134218bca4f2fdbe8fd0cee39ecd.tar.gz use-zlib-c17b523d4710134218bca4f2fdbe8fd0cee39ecd.tar.bz2 use-zlib-c17b523d4710134218bca4f2fdbe8fd0cee39ecd.zip | |
Erstes Beispiel für die Benutzung von zlib
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..4ce05bc --- /dev/null +++ b/makefile | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | include config.mk | ||
| 2 | |||
| 3 | SIMPLE=bin/simple | ||
| 4 | SIMPLE_OBJ_FILES=obj/simple.o | ||
| 5 | |||
| 6 | release: $(SIMPLE) | ||
| 7 | release: CFLAGS+=-DNDEBUG -O2 | ||
| 8 | |||
| 9 | debug: $(SIMPLE) | ||
| 10 | debug: CFLAGS+=-g | ||
| 11 | |||
| 12 | $(SIMPLE): $(SIMPLE_OBJ_FILES) | bin | ||
| 13 | cc $(LDFLAGS) $^ -o $@ | ||
| 14 | |||
| 15 | obj/%.o: src/%.c | obj | ||
| 16 | cc $(CFLAGS) -c $< -o $@ | ||
| 17 | |||
| 18 | bin obj: | ||
| 19 | mkdir -p $@ | ||
| 20 | |||
| 21 | clean: | ||
| 22 | rm -rf bin obj | ||
| 23 | |||
| 24 | .PHONY: release debug clean | ||
