-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
67 lines (53 loc) · 1.78 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
#
# Makefile
#
# Makefile for macchina.io REMOTE Gateway
#
POCO_BASE = $(shell dirname `pwd`)/sdk
PROJECT_BASE = $(shell dirname `pwd`)
include $(POCO_BASE)/build/rules/global
WEBTUNNEL_ENABLE_TLS = 1
# Where to find the PageCompiler executable
PAGECOMPILER = $(POCO_BASE)/PageCompiler/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/static/cpspc
FILE2PAGE = $(POCO_BASE)/PageCompiler/File2Page/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/static/f2cpsp
ifdef WEBTUNNEL_ENABLE_TLS
CXXFLAGS += -DWEBTUNNEL_ENABLE_TLS
tlslibs = PocoNetSSL PocoCrypto
SYSLIBS += -lssl -lcrypto -lz -ldl
endif
ifeq ($(OSNAME),Linux)
SYSLIBS += -lcrypt
endif
objects = GatewayServer WebTunnelAgent DeviceManager Utility PageController \
WebSession WebSessionManager \
LoginPage LoginPageController \
IndexPage IndexPageController \
DevicePage DevicePageController \
CreateDevicePage CreateDevicePageController \
StatusJSON StatusJSONController \
Stylesheet \
FavIcon \
HeaderLogo HeaderLogoX2 \
PlusIcon PlusIconX2 \
MinusIcon MinusIconX2 \
AjaxCore
target = rmgateway
target_version = 1
target_libs = PocoWebTunnel PocoNetSSL PocoNet PocoCrypto PocoUtil PocoXML PocoJSON PocoFoundation
include $(POCO_BASE)/build/rules/exec
# Rule for runnning PageCompiler
src/%.cpp: src/%.cpsp html/header.inc html/footer.inc html/template.inc
@echo "** Compiling Page" $<
$(PAGECOMPILER) $<
src/%.cpsp: res/%.js
@echo "** Compiling Resource" $<
$(FILE2PAGE) --namespace=MyDevices::Gateway $< -o$@
src/%.cpsp: res/%.css
@echo "** Compiling Resource" $<
$(FILE2PAGE) --namespace=MyDevices::Gateway $< -o$@
src/%.cpsp: res/%.png
@echo "** Compiling Resource" $<
$(FILE2PAGE) --namespace=MyDevices::Gateway $< -o$@
src/%.cpsp: res/%.ico
@echo "** Compiling Resource" $<
$(FILE2PAGE) --namespace=MyDevices::Gateway $< -o$@