-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (29 loc) · 1.11 KB
/
Copy pathMakefile
File metadata and controls
43 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
override THIS_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
override TARGETS := stochar test test-json test-rev test-utf8
all:| $(TARGETS)
clean:| $(TARGETS:%=clean-%)
install:| $(TARGETS:%=install-%)
override PUBLISH := \
all $(TARGETS) \
clean $(TARGETS:%=clean-%) \
install $(TARGETS:%=install-%)
.PHONY: $(PUBLISH)
# Prevent sub-target tab-completion and direct build.
ifneq (,$(filter $(PUBLISH),$(or $(MAKECMDGOALS),all)))
include $(THIS_DIR)../common.mk
override SRC_stochar := letopt.c stochar.c utf8.c
override DBG_stochar := dbg.c
override SRC_test := cc.c cxx.cpp dstr.c file.c test.c
override DBG_test := dbg.c
override LIBS_test = $(CJSON_LIBS)
override CFLAGS_test.c = $(CJSON_CFLAGS)
override SRC_test-rev := parse.c test-rev.c
override SRC_test-json := json.c test-json.c
override DBG_test-json := dbg.c
override SRC_test-utf8 := letopt.c test-utf8.c utf8.c utf8_graph.c
override DBG_test-utf8 := dbg.c
$(call pkg_libs,libcjson,CJSON_LIBS,-lcjson)
$(call pkg_cflags,libcjson,CJSON_CFLAGS)
$(call target_rules,$(TARGETS))
all clean install:; $(nop)
endif