diff options
author | Niklas Halle <niklas@niklashalle.net> | 2020-05-28 13:16:29 +0200 |
---|---|---|
committer | Niklas Halle <niklas@niklashalle.net> | 2020-05-28 13:16:36 +0200 |
commit | bc48f521390b360e1e1b131fc670cc3d02dcaf89 (patch) | |
tree | ae6ea2faa672f2eec1adb51f161f51793021a9e1 /03_exercise/Makefile | |
parent | bb6bae6d3149145313e8dbc57c38f5c85345cdb3 (diff) | |
download | betriebssysteme-bc48f521390b360e1e1b131fc670cc3d02dcaf89.tar.gz betriebssysteme-bc48f521390b360e1e1b131fc670cc3d02dcaf89.zip |
init task 3
Diffstat (limited to '03_exercise/Makefile')
-rw-r--r-- | 03_exercise/Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/03_exercise/Makefile b/03_exercise/Makefile new file mode 100644 index 0000000..8c02dc9 --- /dev/null +++ b/03_exercise/Makefile @@ -0,0 +1,32 @@ +#!/usr/bin/make +.SUFFIXES: +.PHONY: all run pack clean +.SILENT: run + +TAR = cli/client srv/server +PCK = lab-3.zip + +export CFLAGS = -std=gnu11 -c -g -Os -Wall -Werror -MMD -MP + +cli/client: $(wildcard cli/*.c) $(wildcard cli/*.h) + @$(MAKE) -C $(@D) + +srv/server: $(wildcard srv/*.c) $(wildcard srv/*.h) + @$(MAKE) -C $(@D) + +all: $(TAR) + +run: all + srv/server& echo $$! > .srv_pid + echo "Client Ready:" + cli/client + kill `cat .srv_pid` + $(RM) $(RMFILES) .srv_pid + +pack: clean + zip -r $(PCK) cli srv Makefile -x "*/.*" + +clean: + @$(MAKE) -C cli clean + @$(MAKE) -C srv clean + $(RM) $(RMFILES) $(PCK) |