diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-19 21:46:52 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-23 19:54:18 +0000 |
commit | ba010851fafea3da0d0655b103158f0a9efe6406 (patch) | |
tree | bb26879ee1ac5e2d578948701b20c1bb33db14a9 /lib/x1000-installer/Makefile | |
parent | 6e794c9a2d9e91a926f70d0fcc66e255b0bdc221 (diff) | |
download | rockbox-ba010851fafea3da0d0655b103158f0a9efe6406.tar.gz rockbox-ba010851fafea3da0d0655b103158f0a9efe6406.zip |
Remove lib/x1000-installer
Carrying this library is somewhat of a maintenance burden because
some Rockbox APIs are mocked or duplicated in the test suite and
thus need to be fixed up when refactoring.
It's also unused & incomplete, so there's no good reason to keep
it in tree any more.
Change-Id: If39c62744b4edc0d81b1b6608ee5df69430e6581
Diffstat (limited to 'lib/x1000-installer/Makefile')
-rw-r--r-- | lib/x1000-installer/Makefile | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/lib/x1000-installer/Makefile b/lib/x1000-installer/Makefile deleted file mode 100644 index 54c590dce4..0000000000 --- a/lib/x1000-installer/Makefile +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | OBJ = src/xf_error.o \ | ||
2 | src/xf_flashmap.o \ | ||
3 | src/xf_nandio.o \ | ||
4 | src/xf_package.o \ | ||
5 | src/xf_stream.o \ | ||
6 | src/xf_update.o | ||
7 | LIB = libx1000-installer.a | ||
8 | |||
9 | TOBJ = test_lib/core_alloc.o \ | ||
10 | test_lib/fakenand.o \ | ||
11 | test_lib/file.o \ | ||
12 | test_lib/pathfuncs.o \ | ||
13 | test_lib/md5.o \ | ||
14 | test_lib/strlcpy.o \ | ||
15 | test/main.o \ | ||
16 | test/test_flashmap.o \ | ||
17 | test/test_stream.o | ||
18 | TBIN = xf_test | ||
19 | |||
20 | # dependency needs to be built manually | ||
21 | MTARINC = -I../microtar/src | ||
22 | MTARLIB = ../microtar/libmicrotar.a | ||
23 | |||
24 | CPPFLAGS = -Iinclude -Itest_lib $(MTARINC) -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L | ||
25 | CFLAGS = -std=c99 -Wall -Wextra | ||
26 | LDFLAGS = | ||
27 | |||
28 | PROFRAW_FILE=$(TBIN).profraw | ||
29 | PROFDATA_FILE=$(TBIN).profdata | ||
30 | |||
31 | export LLVM_PROFILE_FILE=$(PROFRAW_FILE) | ||
32 | |||
33 | ifeq ($(COVERAGE),1) | ||
34 | CC = clang | ||
35 | CFLAGS += -g -Og -fprofile-instr-generate -fcoverage-mapping | ||
36 | LDFLAGS += -fprofile-instr-generate -fcoverage-mapping | ||
37 | else | ||
38 | CFLAGS += -O2 | ||
39 | endif | ||
40 | |||
41 | ifeq ($(SANITIZE),1) | ||
42 | CFLAGS += -fsanitize=address -fsanitize=undefined | ||
43 | LDFLAGS += -fsanitize=address -fsanitize=undefined | ||
44 | endif | ||
45 | |||
46 | .PHONY: all | ||
47 | all: $(LIB) $(TBIN) | ||
48 | |||
49 | .PHONY: test | ||
50 | test: $(TBIN) | ||
51 | @./$(TBIN) | ||
52 | |||
53 | .PHONY: cov | ||
54 | cov: $(PROFDATA_FILE) | ||
55 | @llvm-cov report $(TBIN) -instr-profile=$(PROFDATA_FILE) | ||
56 | |||
57 | .PHONY: cov-show | ||
58 | cov-show: $(PROFDATA_FILE) | ||
59 | @llvm-cov show $(TBIN) --use-color -instr-profile=$(PROFDATA_FILE) $(f) | less -R | ||
60 | |||
61 | .PHONY: clean | ||
62 | clean: | ||
63 | rm -f $(LIB) $(OBJ) | ||
64 | rm -f $(TBIN) $(TOBJ) | ||
65 | rm -f $(PROFRAW_FILE) $(PROFDATA_FILE) | ||
66 | rm -f fakeNAND.bin fakeNAND_meta.bin | ||
67 | |||
68 | $(LIB): $(OBJ) | ||
69 | $(AR) rcs $@ $^ >/dev/null | ||
70 | |||
71 | $(TBIN): $(TOBJ) $(LIB) $(MTARLIB) | ||
72 | $(CC) -o $@ $^ $(LDFLAGS) | ||
73 | |||
74 | %.o: %.c | ||
75 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ | ||
76 | |||
77 | # use separate rule instead of depending on 'test' to avoid re-running | ||
78 | $(PROFRAW_FILE): $(TBIN) | ||
79 | @./$(TBIN) | ||
80 | |||
81 | $(PROFDATA_FILE): $(PROFRAW_FILE) | ||
82 | @llvm-profdata merge -sparse $(PROFRAW_FILE) -o $(PROFDATA_FILE) | ||