summaryrefslogtreecommitdiffstats
path: root/03_exercise/echo_server/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '03_exercise/echo_server/Makefile')
-rw-r--r--03_exercise/echo_server/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/03_exercise/echo_server/Makefile b/03_exercise/echo_server/Makefile
new file mode 100644
index 0000000..df023d1
--- /dev/null
+++ b/03_exercise/echo_server/Makefile
@@ -0,0 +1,22 @@
+#!/usr/bin/make
+.SUFFIXES:
+.PHONY: all run clean
+.SILENT: run
+
+TAR = client server
+CFLAGS = -c -Os -Wall -Werror
+
+%.o: %.c
+ $(CC) $(CFLAGS) $^ -o $@
+
+%: %.o
+ $(CC) -o $@ $^
+
+all: $(TAR)
+
+run: all
+ ./server&
+ ./client
+
+clean:
+ $(RM) $(RMFILES) $(TAR) *.o