Allow ev_qs to not have INDIR throttling (XCC)
[akaros.git] / tests / c3po / Makefrag
1 C3PO_TESTS_DIR = $(TESTS_DIR)/c3po
2
3 C3PO_TESTS_CFLAGS += $(TESTS_CFLAGS) \
4                      -I$(GCC_ROOT)/$(TARGET_ARCH)-ros/sys-include/c3po
5
6 ALL_C3PO_TEST_FILES = $(shell ls $(C3PO_TESTS_DIR)/*.c)
7
8 C3PO_TESTS_LDLIBS := -lpthread -lparlib -lm
9
10 C3PO_TESTS_SRCS := $(ALL_C3PO_TEST_FILES)
11
12 C3PO_TESTS_LDDEPENDS := $(C3PO_TESTS_DIR)/%.c 
13
14 TESTS_EXECS  += $(patsubst $(C3PO_TESTS_DIR)/%.c, \
15                       $(OBJDIR)/$(C3PO_TESTS_DIR)/%, \
16                       $(C3PO_TESTS_SRCS))
17
18 STATIC := $(findstring static,$(C3PO_TESTS_CFLAGS))
19 $(OBJDIR)/$(C3PO_TESTS_DIR)/%: $(C3PO_TESTS_LDDEPENDS)
20         @echo + cc [C3PO_TESTS] $<
21         @mkdir -p $(@D)
22         $(V)$(CC) $(C3PO_TESTS_CFLAGS) -o $@ $(C3PO_TESTS_LDFLAGS) \
23                   $(C3PO_TESTS_LDDIRS) $< $(C3PO_TESTS_LDLIBS)
24         @if [ "$(STATIC)" != "static" ]; then \
25                 $(OBJDUMP) -S $@ > $@.asm; \
26                 $(NM) -n $@ > $@.sym; \
27         fi