-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
223 lines (211 loc) · 4.32 KB
/
Makefile
File metadata and controls
223 lines (211 loc) · 4.32 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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
PROJECT_NAME=membrane-control
APPLICATION_NAME="Membrane Control"
APPLICATION_PACKAGE_NAME=MembraneControl
PLATFORM=$(shell uname)
PLATFORM_CFLAGS=
ifeq ($(PLATFORM), Linux)
PLATFORM_ID=linux
PLATFORM_CFLAGS=-DPLATFORM_LINUX=1
CC=g++
endif
ifeq ($(PLATFORM), Darwin)
PLATFORM_ID=macos
PLATFORM_CFLAGS=-DPLATFORM_MACOS=1 -std=c++11
CC=g++
endif
ifndef BUILD_ID
BUILD_ID=0-ffffffff
endif
ifndef PLATFORM_ID
PLATFORM_ID=unknown
endif
CURL_PREFIX?= /usr
FREETYPE_PREFIX?= /usr
JPEG_PREFIX?= /usr
LIBPNG_PREFIX?= /usr
LIBWEBSOCKETS_PREFIX?= /usr
LUA_PREFIX?= /usr
OPENSSL_PREFIX?= /usr
SDL2_PREFIX?= /usr
SDL2IMAGE_PREFIX?= /usr
ZLIB_PREFIX?= /usr
SRC_PATH=src
O=ActionWindow.o \
AdminSecretWindow.o \
Agent.o \
AgentConfigurationWindow.o \
AgentControl.o \
AgentTaskWindow.o \
App.o \
AsyncCommand.o \
BannerWindow.o \
Buffer.o \
Button.o \
CameraDetailWindow.o \
CameraThumbnailWindow.o \
CameraTimelineUi.o \
CameraTimelineWindow.o \
CameraUi.o \
CameraWindow.o \
CardView.o \
Chip.o \
Color.o \
ComboBox.o \
CommandHistory.o \
CommandList.o \
CommandListener.o \
ConsoleWindow.o \
Font.o \
HashMap.o \
HelpActionWindow.o \
HelpWindow.o \
HistoryWindow.o \
HyperlinkWindow.o \
IconCardWindow.o \
IconLabelWindow.o \
Image.o \
ImageWindow.o \
Input.o \
Ipv4Address.o \
json-builder.o \
Json.o \
json-parser.o \
Label.o \
LabelWindow.o \
LinkClient.o \
ListView.o \
Log.o \
LogoWindow.o \
LuaScript.o \
Main.o \
MainUi.o \
MathUtil.o \
MediaItemUi.o \
MediaLibraryWindow.o \
MediaThumbnailWindow.o \
MediaTimelineWindow.o \
MediaUi.o \
MediaUtil.o \
MediaWindow.o \
Menu.o \
MonitorCacheUi.o \
MonitorWindow.o \
Network.o \
NumberSpace.o \
OsUtil.o \
Panel.o \
Position.o \
Prng.o \
ProgressBar.o \
RecordStore.o \
Resource.o \
ScrollBar.o \
ScrollView.o \
ServerAdminUi.o \
ServerAttachWindow.o \
ServerContactWindow.o \
ServerUi.o \
ServerWindow.o \
SettingsWindow.o \
SharedBuffer.o \
Slider.o \
SliderWindow.o \
SnackbarWindow.o \
SpriteGroup.o \
SpriteHandle.o \
Sprite.o \
StatsWindow.o \
StdString.o \
StreamItemUi.o \
StreamPlaylistWindow.o \
StreamWindow.o \
StringList.o \
SystemInterface.o \
TagWindow.o \
TaskGroup.o \
TaskWindow.o \
TextArea.o \
TextField.o \
TextFieldWindow.o \
TextFlow.o \
Toggle.o \
ToggleWindow.o \
Toolbar.o \
TooltipWindow.o \
UiConfiguration.o \
Ui.o \
UiLaunchWindow.o \
UiStack.o \
UiText.o \
WebKioskUi.o \
WebPlaylistWindow.o \
WidgetHandle.o \
Widget.o
VPATH=$(SRC_PATH)
CFLAGS=$(PLATFORM_CFLAGS) \
-I$(CURL_PREFIX)/include \
-I$(FREETYPE_PREFIX)/include \
-I$(FREETYPE_PREFIX)/include/freetype2 \
-I$(JPEG_PREFIX)/include \
-I$(LIBPNG_PREFIX)/include \
-I$(LIBWEBSOCKETS_PREFIX)/include \
-I$(LUA_PREFIX)/include \
-I$(OPENSSL_PREFIX)/include \
-I$(SDL2_PREFIX)/include \
-I$(SDL2_PREFIX)/include/SDL2 \
-I$(SDL2IMAGE_PREFIX)/include \
-I$(ZLIB_PREFIX)/include \
-I$(SRC_PATH) $(EXTRA_CFLAGS)
LDFLAGS=-L$(CURL_PREFIX)/lib \
-L$(FREETYPE_PREFIX)/lib \
-L$(JPEG_PREFIX)/lib \
-L$(LIBPNG_PREFIX)/lib \
-L$(LIBWEBSOCKETS_PREFIX)/lib \
-L$(LUA_PREFIX)/lib \
-L$(OPENSSL_PREFIX)/lib \
-L$(SDL2_PREFIX)/lib \
-L$(SDL2IMAGE_PREFIX)/lib \
-L$(ZLIB_PREFIX)/lib \
$(EXTRA_LDFLAGS)
LD_STATIC_LIBS=$(LUA_PREFIX)/lib/liblua.a
LD_DYNAMIC_LIBS=-lSDL2 \
-lSDL2_image \
-lfreetype \
-ldl \
-lm \
-lpthread \
-lcurl \
-lwebsockets \
-lssl \
-lcrypto \
-lpng \
-ljpeg \
-lz
all: $(PROJECT_NAME)
clean:
rm -f $(O) $(PROJECT_NAME) $(SRC_PATH)/BuildConfig.h
$(SRC_PATH)/BuildConfig.h:
@echo "#ifndef BUILD_CONFIG_H" > $@
@echo "#define BUILD_CONFIG_H" >> $@
@echo "#ifndef BUILD_ID" >> $@
@echo "#define BUILD_ID \"$(BUILD_ID)\"" >> $@
@echo "#endif" >> $@
@echo "#ifndef PLATFORM_ID" >> $@
@echo "#define PLATFORM_ID \"$(PLATFORM_ID)\"" >> $@
@echo "#endif" >> $@
@echo "#ifndef APPLICATION_NAME" >> $@
@echo "#define APPLICATION_NAME \"$(APPLICATION_NAME)\"" >> $@
@echo "#endif" >> $@
@echo "#ifndef APPLICATION_PACKAGE_NAME" >> $@
@echo "#define APPLICATION_PACKAGE_NAME \"$(APPLICATION_PACKAGE_NAME)\"" >> $@
@echo "#endif" >> $@
@echo "#endif" >> $@
$(PROJECT_NAME): $(SRC_PATH)/BuildConfig.h $(O)
$(CC) -o $@ $(O) $(LD_STATIC_LIBS) $(LDFLAGS) $(LD_DYNAMIC_LIBS)
.SECONDARY: $(O)
%.o: %.cpp
$(CC) $(CFLAGS) -o $@ -c $<
json-parser.o: json-parser.c
$(CC) -o $@ -g -c $<
json-builder.o: json-builder.c
$(CC) -o $@ -g -c $<