libamxrt  0.4.2
Ambiorix Run Time Library
All Data Structures Files Functions Variables Typedefs Macros Modules Pages
test_targets.mk
Go to the documentation of this file.
1 all: $(TARGET)
2 
3 run: $(TARGET)
4  -killall pcb_sysbus && killall ubusd
5  /usr/local/bin/pcb_sysbus
6  ubusd &
7  set -o pipefail; valgrind --leak-check=full --exit-on-first-error=yes --error-exitcode=1 ./$< 2>&1 | tee -a $(OBJDIR)/unit_test_results.txt;
8  -killall pcb_sysbus && killall ubusd
9 
10 $(TARGET): $(OBJECTS)
11  $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
12 
13 -include $(OBJECTS:.o=.d)
14 
15 $(OBJDIR)/%.o: ./%.c | $(OBJDIR)/
16  $(CC) $(CFLAGS) -c -o $@ $<
17  @$(CC) $(CFLAGS) -MM -MP -MT '$(@) $(@:.o=.d)' -MF $(@:.o=.d) $(<)
18 
19 $(OBJDIR)/%.o: $(MOCK_SRCDIR)/%.c | $(OBJDIR)/
20  $(CC) $(CFLAGS) -c -o $@ $<
21  @$(CC) $(CFLAGS) -MM -MP -MT '$(@) $(@:.o=.d)' -MF $(@:.o=.d) $(<)
22 
23 $(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)/
24  $(CC) $(CFLAGS) -c -o $@ $<
25  @$(CC) $(CFLAGS) -MM -MP -MT '$(@) $(@:.o=.d)' -MF $(@:.o=.d) $(<)
26 
27 $(OBJDIR)/:
28  mkdir -p $@
29 
30 clean:
31  rm -rf $(TARGET) $(OBJDIR)
32 
33 .PHONY: clean $(OBJDIR)/