diff options
author | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-06-10 17:10:02 +0200 |
---|---|---|
committer | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-06-10 17:10:02 +0200 |
commit | 47aaae2c42d554963fb811b68fdf28c9743598e8 (patch) | |
tree | c5c75adf2633f17b4f738a692273d6b92d362a7a /04_exercise/Makefile | |
parent | 9eb2eddf718bacb968733be6c07dae40bec28256 (diff) | |
download | betriebssysteme-47aaae2c42d554963fb811b68fdf28c9743598e8.tar.gz betriebssysteme-47aaae2c42d554963fb811b68fdf28c9743598e8.zip |
Starting threadpool
Diffstat (limited to '04_exercise/Makefile')
-rw-r--r-- | 04_exercise/Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/04_exercise/Makefile b/04_exercise/Makefile new file mode 100644 index 0000000..064ec4b --- /dev/null +++ b/04_exercise/Makefile @@ -0,0 +1,34 @@ +#!/usr/bin/make +.SUFFIXES: +.PHONY: all run pack clean + +SRC = $(wildcard *.c) +OBJ = $(SRC:%.c=%.o) +TAR = threadpool +PCK = lab-4.zip + +CFLAGS = -std=gnu11 -c -g -Os -Wall -MMD -MP +LFLAGS = -pthread + +DEP = $(OBJ:%.o=%.d) +-include $(DEP) + +%.o: %.c + $(CC) $(CFLAGS) $< -o $@ + +$(TAR): $(filter-out quicksort.o,$(OBJ)) + $(CC) $(LFLAGS) -o $@ $^ + +all: $(TAR) + +bench: $(filter-out main.o,$(OBJ)) + $(CC) $(LFLAGS) -o $@ $^ + +run: all + ./$(TAR) + +pack: clean + zip $(PCK) $(SRC) $(wildcard *.h) $(wildcard *.pdf) $(wildcard *.txt) Makefile + +clean: + $(RM) $(RMFILES) $(OBJ) $(TAR) bench $(DEP) $(PCK) |