1 CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
2 CFLAGS += -I../../../../usr/include/
9 # lib.mk TEST_CUSTOM_PROGS var is for custom tests that need special
10 # build rules. lib.mk will run and install them.
12 TEST_CUSTOM_PROGS := $(OUTPUT)/sync_test
13 all: $(TEST_CUSTOM_PROGS)
15 OBJS = sync_test.o sync.o
21 TESTS += sync_stress_parallelism.o
22 TESTS += sync_stress_consumer.o
23 TESTS += sync_stress_merge.o
25 OBJS := $(patsubst %,$(OUTPUT)/%,$(OBJS))
26 TESTS := $(patsubst %,$(OUTPUT)/%,$(TESTS))
28 $(TEST_CUSTOM_PROGS): $(TESTS) $(OBJS)
29 $(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS)
31 $(OBJS): $(OUTPUT)/%.o: %.c
34 $(TESTS): $(OUTPUT)/%.o: %.c
37 EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS)