summaryrefslogtreecommitdiff
path: root/firmware/test/buflib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/test/buflib/Makefile')
-rw-r--r--firmware/test/buflib/Makefile67
1 files changed, 0 insertions, 67 deletions
diff --git a/firmware/test/buflib/Makefile b/firmware/test/buflib/Makefile
deleted file mode 100644
index 33191c6cbe..0000000000
--- a/firmware/test/buflib/Makefile
+++ /dev/null
@@ -1,67 +0,0 @@
1FIRMWARE=../..
2
3CC ?= gcc
4# Note: Don't be fooled by MEMORYSIZE here
5# We have a fixed, predictable buffer in UT_core_allocator_init()
6CFLAGS += -g -O2 -DDEBUG -D__PCTOOL__ -DBUFLIB_UNIT_TEST -DMEMORYSIZE=8 -DBUFLIB_DEBUG_BLOCKS -std=gnu99 -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I.
7LDFLAGS += -L. -lpthread
8
9.PHONY: clean all
10
11TARGETS_OBJ = test_main.o \
12 test_main2.o \
13 test_move.o \
14 test_move2.o \
15 test_max.o \
16 test_shrink.o \
17 test_shrink_unaligned.o \
18 test_shrink_startchanged.o \
19 test_shrink_cb.o
20
21TARGETS = $(TARGETS_OBJ:.o=)
22
23LIB_OBJ = buflib.o \
24 core_alloc.o \
25 crc32.o \
26 strlcpy.o \
27 util.o
28
29LIB_FILE = libbuflib.a
30LIB = buflib
31
32
33ifndef V
34SILENT:=@
35else
36VERBOSEOPT:=-v
37endif
38
39PRINTS=$(SILENT)$(call info,$(1))
40
41all: $(TARGETS)
42
43test_%: test_%.o $(LIB_FILE)
44 $(call PRINTS,LD $@)$(CC) $(LDFLAGS) -o $@ $< -l$(LIB)
45
46$(TARGETS): $(TARGETS_OBJ) $(LIB_FILE)
47
48buflib.o: $(FIRMWARE)/buflib.c
49 $(CC) $(CFLAGS) -c $< -o $@
50
51core_alloc.o: $(FIRMWARE)/core_alloc.c
52 $(CC) $(CFLAGS) -c $< -o $@
53
54crc32.o: $(FIRMWARE)/common/crc32.c
55 $(CC) $(CFLAGS) -c $< -o $@
56
57strlcpy.o: $(FIRMWARE)/common/strlcpy.c
58 $(CC) $(CFLAGS) -c $< -o $@
59
60%.o: %.c
61 $(call PRINTS,CC $<)$(CC) $(CFLAGS) -c $<
62
63$(LIB_FILE): $(LIB_OBJ)
64 $(call PRINTS,AR $@)ar rcs $@ $^
65
66clean:
67 rm *.o $(TARGETS) $(LIB_FILE)