c11-queues/Makefile

40 lines
782 B
Makefile
Raw Normal View History

2016-09-18 21:41:16 +02:00
TARGETS = spsc_ub_test_fib spsc_ub_test_default mpmc_test mpmc_test_fib spsc_test_fib
CFLAGS = -Wall -std=c11
ifeq ($(shell uname), Linux)
LIBS = -pthread
endif
DEBUG ?= 1
ifdef DEBUG
CFLAGS += -g -O0
else
CFLAGS += -O3
2016-08-27 15:57:20 -04:00
endif
.PHONY: all clean
all: $(TARGETS)
2016-09-09 18:38:17 +02:00
spsc_ub_test_fib: spsc_ub_test_fib.o spsc_ub_queue.o memory.o
$(CC) $^ -Wall $(LIBS) -o $@
2016-09-09 18:38:17 +02:00
spsc_ub_test_default: spsc_ub_test_default.o spsc_ub_queue.o memory.o
$(CC) $^ -Wall $(LIBS) -o $@
mpmc_test: mpmc_test.o mpmc_queue.o memory.o
$(CC) $^ -Wall $(LIBS) -o $@
mpmc_test_fib: mpmc_test_fib.o mpmc_queue.o memory.o
$(CC) $^ -Wall $(LIBS) -o $@
2016-09-18 21:41:16 +02:00
spsc_test_fib: spsc_test_fib.o spsc_queue.o memory.o
$(CC) $^ -Wall $(LIBS) -o $@
2016-09-08 00:52:33 -04:00
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f *.o
2016-08-27 18:47:07 -04:00
rm -f $(TARGETS)