CC = gcc CFLAGS = -std=c11 -O0 -g -D_XOPEN_SOURCE=700 -Iinclude -Iport -ffunction-sections -fdata-sections SOURCES = src/timer.c src/thread.c src/semaphore.c port/controlled.c .PHONY: smoke clean smoke: smoke-bin ./smoke-bin smoke-bin: $(SOURCES) smoke.c $(CC) $(CFLAGS) $(SOURCES) smoke.c -Wl,--gc-sections -o $@ clean: rm -f smoke-bin .PHONY: reproduce reproduce: reproduce-bin ./reproduce-bin reproduce-bin: $(SOURCES) reproduce.c $(CC) $(CFLAGS) $(SOURCES) reproduce.c -Wl,--gc-sections -o $@