-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
74 lines (53 loc) · 1.52 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
LD_LIB_PATH=:./json-c-build
JSON_C_LDFLAGS=./json-c-build/libjson-c.a
JSON_C_CFLAGS=-I./json-c -I./json-c-build
JSON_C_RULE=./json-c-build/libjson-c.a
API_RULE_DEPEDENCIES=
OAPI_APPIMAGE_RULE_DEPEDENCIES=
APPIMAGETOOL_OPTION=
CLI_NAME=oapi-cli
include config.mk
include COGNAC/oapi-cli.mk
COGNAC/oapi-cli.mk:
git submodule update --init
json-c/.git:
git clone https://github.com/cosmo-ray/json-c.git -b color
json-c-build/libjson-c.a: json-c/.git
rm -rvf ./json-c-build
mkdir json-c-build
cd json-c-build && cmake ../json-c "$${CMAKE_ARG}" # might need to be replace by cmake3
make -C json-c-build json-c-static
main-helper.h:
cp COGNAC/main-helper.h .
main.c: COGNAC/main.c
cp COGNAC/main.c .
osc_sdk.h: osc-sdk-C/osc_sdk.h
cp osc-sdk-C/osc_sdk.h .
osc_sdk.c: osc-sdk-C/osc_sdk.c
cp osc-sdk-C/osc_sdk.c .
$(CLI_NAME)-completion.bash:
cp COGNAC/oapi-cli-completion.bash .
gen: main.c osc_sdk.h osc_sdk.c oapi-cli-completion.bash main-helper.h
osc-sdk-C/:
git submodule update --init
COGNAC/:
git submodule update --init
COGNAC/config.mk: COGNAC/
cd COGNAC && ./configure --compile-json-c $$COGNAC_CONFIG
COGNAC/main.c: COGNAC/config.mk
cp version COGNAC/cli-version
make -j -C COGNAC/
clean_all: fclean
make -C COGNAC/ clean
rm -rvf main-helper.h main.c osc_sdk.h osc_sdk.c
fclean: clean
rm -rvf oapi-cli oapi-cli-x86_64.AppImage
clean:
rm -rvf *.o
tests:
./tests.sh
./local-tests.sh
tests-appimage:
./local-tests.sh ./oapi-cli-x86_64.AppImage
tests-all: tests tests-appimage
.PHONY: clean test clean_all gen