akaros/tests/vmm/Makefrag
<<
>>
Prefs
   1VMM_TESTS_DIR = $(TESTS_DIR)/vmm
   2
   3VMM_TESTS_CFLAGS += $(CFLAGS_TESTS)
   4
   5ALL_VMM_TEST_FILES := $(wildcard $(VMM_TESTS_DIR)/*.c)
   6
   7VMM_TESTS_LDLIBS := $(TESTS_LDLIBS) -lelf
   8
   9VMM_TESTS_SRCS := $(ALL_VMM_TEST_FILES)
  10
  11VMM_TESTS_LDDEPENDS := $(VMM_TESTS_DIR)/%.c 
  12
  13TESTS_EXECS_C  += $(patsubst $(VMM_TESTS_DIR)/%.c, \
  14                      $(OBJDIR)/$(VMM_TESTS_DIR)/%, \
  15                      $(VMM_TESTS_SRCS))
  16
  17STATIC := $(findstring static,$(VMM_TESTS_CFLAGS))
  18$(OBJDIR)/$(VMM_TESTS_DIR)/%: $(VMM_TESTS_LDDEPENDS)
  19        @echo + cc [VMM_TESTS] $<
  20        @mkdir -p $(@D)
  21        $(Q)$(CC) $(VMM_TESTS_CFLAGS) -o $@ $< $(VMM_TESTS_LDLIBS)
  22        @if [ "$(STATIC)" != "static" ]; then \
  23                $(OBJDUMP) -S $@ > $@.asm; \
  24                $(NM) -n $@ > $@.sym; \
  25        fi
  26