summaryrefslogtreecommitdiffstats
path: root/03_exercise/cli/Makefile
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-05-28 13:16:29 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-05-28 13:16:36 +0200
commitbc48f521390b360e1e1b131fc670cc3d02dcaf89 (patch)
treeae6ea2faa672f2eec1adb51f161f51793021a9e1 /03_exercise/cli/Makefile
parentbb6bae6d3149145313e8dbc57c38f5c85345cdb3 (diff)
downloadbetriebssysteme-bc48f521390b360e1e1b131fc670cc3d02dcaf89.tar.gz
betriebssysteme-bc48f521390b360e1e1b131fc670cc3d02dcaf89.zip
init task 3
Diffstat (limited to '03_exercise/cli/Makefile')
-rw-r--r--03_exercise/cli/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/03_exercise/cli/Makefile b/03_exercise/cli/Makefile
new file mode 100644
index 0000000..c09533d
--- /dev/null
+++ b/03_exercise/cli/Makefile
@@ -0,0 +1,23 @@
+#!/usr/bin/make
+.SUFFIXES:
+.PHONY: all run clean
+TAR = client
+SRC = $(wildcard *.c)
+OBJ = $(SRC:%.c=%.o)
+
+DEP = $(OBJ:%.o=%.d)
+-include $(DEP)
+
+%.o: %.c
+ $(CC) $(CFLAGS) $< -o $@
+
+$(TAR): $(OBJ)
+ $(CC) $(LFLAGS) $^ -o $@
+
+all: $(TAR)
+
+run: all
+ ./$(TAR)
+
+clean:
+ $(RM) $(RMFILES) $(OBJ) $(TAR) $(DEP)