-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibrary.mk
executable file
·176 lines (150 loc) · 2.97 KB
/
library.mk
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
CLEAN_BINS =
DUMMY_BINS =
#** chainX_api **
CLEAN_BINS += \
chainX_123 \
client_123 \
tty_123 \
ping_123
#** clist_api **
CLEAN_BINS += \
clist_123
#** thread_api, led_api **
CLEAN_BINS += \
led_123
#** statex_api **
CLEAN_BINS += \
statex_123
#** thread_api **
CLEAN_BINS += \
thread_123
ifeq ("$(PJ_HAS_LIBUSB)", "yes")
CLEAN_BINS += \
usb_123
LIBXXX_OBJS += \
usbX_api.o
LIBS_yes += -lusb-1.0
endif
ifeq ("$(PJ_HAS_JANSSON)", "yes")
DUMMY_BINS += \
jqx
CLEAN_BINS += \
json_123
LIBXXX_OBJS += \
json_api.o
LIBS_yes += -ljansson
endif
ifeq ("$(PJ_HAS_JSONC)", "yes")
LIBS_yes += -ljson-c
endif
ifeq ("$(PJ_HAS_MXML)", "yes")
CLEAN_BINS += \
onvif_pass_123 \
onvif_client_123 \
wsdiscovery_123
LIBXXX_OBJS += \
onvif_api.o \
soap_api.o \
wsdiscovery_api.o
LIBS_yes += -lmxml
endif
ifeq ("$(PJ_HAS_MOSQUITTO)", "yes")
CLEAN_BINS += \
mqtt_123
LIBXXX_OBJS += \
mqtt_api.o
LIBS_yes += -lmosquitto
endif
ifeq ("$(PJ_HAS_LIBWEBSOCKETS)", "yes")
CLEAN_BINS += \
lws_123
LIBXXX_OBJS += \
lws_api.o
LIBS_yes += -lwebsockets #-lwebsockets-evlib_uv
endif
ifeq ("$(PJ_HAS_CURL)", "yes")
CLEAN_BINS += \
http_client_123
LIBXXX_OBJS += \
curl_api.o \
rtp_api.o
LIBS_yes += -lcurl
endif
ifeq ("$(PJ_HAS_LIBSSH)", "yes")
CLEAN_BINS += \
sshX_123 \
tunnel_123
LIBXXX_OBJS += \
ssh_api.o \
#LIBS_yes += -lssh
LIBS_yes += $(SDK_LIB_DIR)/libssh.a
endif
ifeq ("$(PJ_HAS_LIBUV)", "yes")
CLEAN_BINS += \
uv_000 \
uv_spawn_123 \
cronx_123 \
uv_123
LIBXXX_OBJS += \
uv_api.o
LIBS_yes += -luv
endif
ifeq ("$(PJ_HAS_URIPARSER)", "yes")
LIBS_yes += -luriparser
endif
ifeq ("$(PJ_HAS_LIBYUAREL)", "yes")
LIBXXX_OBJS += \
yuarel_api.o
LIBS_yes += -lyuarel
endif
ifeq ("$(PJ_HAS_DBUS)", "yes")
CLEAN_BINS += \
dbusx_456
LIBXXX_OBJS += \
dbusx_api.o
LIBS_yes += -lexpat -ldbus-1
ifneq (,$(wildcard $(SDK_LIB_DIR)/libdbus-1.so))
CFLAGS += -I$(SDK_INC_DIR)/dbus-1.0/dbus -I$(SDK_INC_DIR)/dbus-1.0 -I$(SDK_LIB_DIR)/dbus-1.0/include
else
CFLAGS += $(shell pkg-config --cflags dbus-1)
endif
endif
ifeq ("$(PJ_HAS_UBUS)", "yes")
CLEAN_BINS += \
ubus_123
LIBXXX_OBJS += \
ubus_api.o
LIBS_yes += -lubus -lblobmsg_json
endif
ifeq ("$(PJ_HAS_SWCONFIG)", "yes")
CLEAN_BINS += \
swlink_123
LIBS_yes += -lswconfig
endif
ifeq ("$(PJ_HAS_UCI)", "yes")
CLEAN_BINS += \
uci_123
LIBXXX_OBJS += \
uci_api.o
LIBS_yes += -luci
endif
ifeq ("$(PJ_HAS_LIBUBOX)", "yes")
LIBS_yes += -lubox
endif
ifeq ("$(PJ_HAS_LIBNL_TINY)", "yes")
LIBS_yes += -lnl-tiny
CFLAGS += -I$(SDK_INC_DIR)/libnl-tiny
endif
ifeq ("$(PJ_HAS_LIBBACKTRACE)", "yes")
CLEAN_BINS += \
backtrace_456
LIBXXX_OBJS += \
backtrace_api.o
LIBS_yes += -lbacktrace
endif
ifeq ("$(PJ_HAS_OPENSSL)", "yes")
LIBS_yes += -lssl -lcrypto
endif
LIBS_yes += -lz
include $(PJ_MK_REVISION)
include $(PJ_MK_MESON)