This commit is contained in:
Nikolaj
2021-10-26 14:15:16 +02:00
parent b57db9596c
commit a988405fd3
10 changed files with 616 additions and 0 deletions

23
A2/Makefile Normal file
View File

@ -0,0 +1,23 @@
CC=gcc
CFLAGS=-g -Wall -Wextra -pedantic -std=gnu99 -pthread
EXAMPLES=fibs fauxgrep fauxgrep-mt fhistogram fhistogram-mt
.PHONY: all test clean ../src.zip
all: $(TESTS) $(EXAMPLES)
job_queue.o: job_queue.c job_queue.h
$(CC) -c job_queue.c $(CFLAGS)
%: %.c job_queue.o
$(CC) -o $@ $^ $(CFLAGS)
test: $(TESTS)
@set e; for test in $(TESTS); do echo ./$$test; ./$$test; done
clean:
rm -rf $(TESTS) $(EXAMPLES) *.o core
../src.zip:
make clean
cd .. && zip src.zip -r src