From bc48f521390b360e1e1b131fc670cc3d02dcaf89 Mon Sep 17 00:00:00 2001 From: Niklas Halle Date: Thu, 28 May 2020 13:16:29 +0200 Subject: init task 3 --- 03_exercise/srv/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 03_exercise/srv/Makefile (limited to '03_exercise/srv/Makefile') diff --git a/03_exercise/srv/Makefile b/03_exercise/srv/Makefile new file mode 100644 index 0000000..4fede74 --- /dev/null +++ b/03_exercise/srv/Makefile @@ -0,0 +1,23 @@ +#!/usr/bin/make +.SUFFIXES: +.PHONY: all run clean +TAR = server +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) -- cgit v1.2.3-54-g00ecf