From 47aaae2c42d554963fb811b68fdf28c9743598e8 Mon Sep 17 00:00:00 2001 From: Stefan Zabka Date: Wed, 10 Jun 2020 17:10:02 +0200 Subject: Starting threadpool --- 04_exercise/Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 04_exercise/Makefile (limited to '04_exercise/Makefile') 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) -- cgit v1.2.3-54-g00ecf