diff options
author | vm <vm@vm.vm> | 2020-06-22 16:48:00 +0200 |
---|---|---|
committer | vm <vm@vm.vm> | 2020-06-22 16:48:00 +0200 |
commit | 6937968af721c32be8b6a0247f7552470084e874 (patch) | |
tree | 38c2912b8e168e925066f19ec2061c3f8646c710 | |
parent | 239f248456ad00f894dc26dceefa968898738c9d (diff) | |
download | betriebssysteme-6937968af721c32be8b6a0247f7552470084e874.tar.gz betriebssysteme-6937968af721c32be8b6a0247f7552470084e874.zip |
packed on ref
-rw-r--r-- | 02_exercise/es | 1 | ||||
-rw-r--r-- | 02_exercise/file | 3 | ||||
-rw-r--r-- | 03_exercise/ghd | 33 | ||||
-rw-r--r-- | 03_exercise/srv/.file.swp | bin | 0 -> 1024 bytes | |||
-rw-r--r-- | 03_exercise/srv/file | 4 | ||||
-rw-r--r-- | 03_exercise/srv/upload/Makefile | 23 | ||||
-rw-r--r-- | 03_exercise/srv/upload/test | 0 | ||||
-rw-r--r-- | 03_exercise/upload/Makefile | 33 | ||||
-rw-r--r-- | 03_exercise/upload/ghd | 33 | ||||
-rw-r--r-- | 03_exercise/upload/test | 33 |
10 files changed, 163 insertions, 0 deletions
diff --git a/02_exercise/es b/02_exercise/es new file mode 100644 index 0000000..49d96d5 --- /dev/null +++ b/02_exercise/es @@ -0,0 +1 @@ +lnfedsmnkffefwfek knjnwnwvcewvek dk diff --git a/02_exercise/file b/02_exercise/file new file mode 100644 index 0000000..3feec48 --- /dev/null +++ b/02_exercise/file @@ -0,0 +1,3 @@ +dwdwdwdwdwfwhallo +dwdw +fbefene diff --git a/03_exercise/ghd b/03_exercise/ghd new file mode 100644 index 0000000..dbf4b28 --- /dev/null +++ b/03_exercise/ghd @@ -0,0 +1,33 @@ +#!/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 + sleep 1 + 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) diff --git a/03_exercise/srv/.file.swp b/03_exercise/srv/.file.swp Binary files differnew file mode 100644 index 0000000..e68b146 --- /dev/null +++ b/03_exercise/srv/.file.swp diff --git a/03_exercise/srv/file b/03_exercise/srv/file new file mode 100644 index 0000000..816612a --- /dev/null +++ b/03_exercise/srv/file @@ -0,0 +1,4 @@ +Hallo +123 +5 + diff --git a/03_exercise/srv/upload/Makefile b/03_exercise/srv/upload/Makefile new file mode 100644 index 0000000..c09533d --- /dev/null +++ b/03_exercise/srv/upload/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) diff --git a/03_exercise/srv/upload/test b/03_exercise/srv/upload/test new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/03_exercise/srv/upload/test diff --git a/03_exercise/upload/Makefile b/03_exercise/upload/Makefile new file mode 100644 index 0000000..dbf4b28 --- /dev/null +++ b/03_exercise/upload/Makefile @@ -0,0 +1,33 @@ +#!/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 + sleep 1 + 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) diff --git a/03_exercise/upload/ghd b/03_exercise/upload/ghd new file mode 100644 index 0000000..dbf4b28 --- /dev/null +++ b/03_exercise/upload/ghd @@ -0,0 +1,33 @@ +#!/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 + sleep 1 + 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) diff --git a/03_exercise/upload/test b/03_exercise/upload/test new file mode 100644 index 0000000..dbf4b28 --- /dev/null +++ b/03_exercise/upload/test @@ -0,0 +1,33 @@ +#!/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 + sleep 1 + 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) |