-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
111 lines (88 loc) · 2.99 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
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
CC= g++
HEADERS_DIR= /usr/local/include/mmi
LIB_DIR= /usr/local/lib
INCLUDES= include/AccelerationEvent.h \
include/AccelerationFactory.h \
include/KeyEvent.h \
include/KeyEventFactory.h \
include/HoldOnEvent.h \
include/EventBuffer.h \
include/EventFactory.h \
include/EventParser.h \
include/IDeviceComm.h \
include/MMIEvent.h \
include/MMIEventListener.h \
include/MMIManager.h \
include/Parsable.h
# include/MMIService.h
SOURCES= src/AccelerationEvent.cpp \
src/AccelerationFactory.cpp \
src/KeyEvent.cpp \
src/HoldOnEvent.cpp \
src/KeyEventFactory.cpp \
src/EventBuffer.cpp \
src/EventParser.cpp \
src/MMIEvent.cpp \
src/MMIManager.cpp
# src/MMIService.cpp
LIBS= -lcpputil -lxerces-c -lmmiwii -lmmisocket -lmmizeroconf -ljson
INCLUDES_WII= \
include/wii/StateCircularBuffer.h \
include/wii/WiiButtonReport.h \
include/wii/WiiDriver.h \
include/wii/WiiEvent.h \
include/wii/WiiEventHandler.h \
include/wii/WiiEventPoster.h \
include/wii/WiiMote.h \
include/wii/WiiState.h
SOURCES_WII= \
src/wii/StateCircularBuffer.cpp \
src/wii/WiiButtonReport.cpp \
src/wii/WiiDriver.cpp \
src/wii/WiiEvent.cpp \
src/wii/WiiEventPoster.cpp \
src/wii/WiiMote.cpp \
src/wii/WiiState.cpp
LIBS_WII = -lcpputil -lcwiid -lpthread
INCLUDES_SOCKET= \
include/socketconn/ServerSocketTCP.h \
include/socketconn/SocketTCP.h \
include/socketconn/TCPCommServer.h \
include/socketconn/TCPDevice.h
SOURCES_SOCKET= \
src/socketconn/ServerSocketTCP.cpp \
src/socketconn/SocketTCP.cpp \
src/socketconn/TCPCommServer.cpp \
src/socketconn/TCPDevice.cpp
LIBS_SOCKET = -lcpputil -lpthread
INCLUDES_ZEROCONF= \
include/zeroconf/CommunicationManager.h
SOURCES_ZEROCONF= \
src/zeroconf/CommunicationManager.cpp
LIBS_ZEROCONF = -lcpputil -lpthread -lavahi-client
INSTALL_HEADERS = $(INCLUDES)
ALL: libmmi.so
libmmi.so: $(INCLUDES) $(SOURCES) libmmiwii.so libmmisocket.so libmmizeroconf.so
$(CC) $(SOURCES) $(LIBS)\
-shared -fPIC -L. -o libmmi.so
libmmiwii.so: $(INCLUDES_WII) $(SOURCES_WII)
$(CC) $(INCLUDES_WII) $(SOURCES_WII) $(LIBS_WII) \
-shared -fPIC -o libmmiwii.so
libmmisocket.so: $(INCLUDES_SOCKET) $(SOURCES_SOCKET)
$(CC) $(INCLUDES_SOCKET) $(SOURCES_SOCKET) $(LIBS_SOCKET) \
-shared -fPIC -o libmmisocket.so
libmmizeroconf.so: $(INCLUDES_ZEROCONF) $(SOURCES_ZEROCONF)
$(CC) $(INCLUDES_ZEROCONF) $(SOURCES_ZEROCONF) $(LIBS_ZEROCONF) \
-shared -fPIC -o libmmizeroconf.so
clean:
rm -f libmmi.so libmmiwii.so libmmisocket.so libmmizeroconf.so
uninstall:
rm -rf $(HEADERS_DIR)
install: libmmi.so
install -d $(HEADERS_DIR) $(HEADERS_DIR)/wii $(HEADERS_DIR)/socketconn \
$(HEADERS_DIR)/zeroconf
install -t $(HEADERS_DIR) $(INCLUDES)
install -t $(HEADERS_DIR)/wii $(INCLUDES_WII)
install -t $(HEADERS_DIR)/socketconn $(INCLUDES_SOCKET)
install -t $(HEADERS_DIR)/zeroconf $(INCLUDES_ZEROCONF)
install -t $(LIB_DIR) libmmi.so libmmiwii.so libmmisocket.so libmmizeroconf.so