forked from rdkcmf/westeros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.ubuntu
171 lines (142 loc) · 4.7 KB
/
Makefile.ubuntu
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
#
# If not stated otherwise in this file or this component's Licenses.txt file the
# following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
WID=$(shell pwd)/external/install
XDGOPT ?= xdgv5
all: externals westeros-protocols westeros-simpleshell westeros-core
clean: init
cleanall: initall
setenv= \
export PKG_CONFIG_PATH=$(WID)/lib/pkgconfig:$(WID)/share/pkgconfig && \
export ACLOCAL_PATH=$(WID)/share/aclocal && \
export ACLOCAL="aclocal -I $ACLOCAL_PATH"
initall: init
rm -rf external
init:
cd protocol/version4 && rm -f *.h && rm -f *.c
cd protocol/version5 && rm -f *.h && rm -f *.c
cd simpleshell/protocol && rm -f *.h && rm -f *.c
cd simpleshell && rm -f *.o && rm -f *.lo && rm -rf .libs/*
rm -f *.o && rm -f *.lo && rm -f .libs/*
externals: external \
external/.proto \
external/.macros \
external/.libxcd \
external/.libxkbcommon \
external/.wayland
external:
mkdir -p external
mkdir -p external/install
external/.proto:
$(call setenv) && \
cd external && \
git clone git://anongit.freedesktop.org/xcb/proto && \
cd proto && \
./autogen.sh --prefix $(WID) && \
make && make install && \
cd .. && \
touch .proto
external/.macros:
$(call setenv) && \
cd external && \
git clone git://anongit.freedesktop.org/xorg/util/macros && \
cd macros && \
./autogen.sh --prefix $(WID) && \
make && make install && \
cd .. && \
touch .macros
external/.libxcd:
$(call setenv) && \
cd external && \
git clone git://anongit.freedesktop.org/xcb/libxcb && \
cd libxcb && \
./autogen.sh --prefix $(WID) && \
make && make install && \
cd .. && \
touch .libxcd
external/.libxkbcommon:
$(call setenv) && \
cd external && \
git clone git://github.com/xkbcommon/libxkbcommon && \
cd libxkbcommon && \
./autogen.sh --prefix $(WID) && \
make && make install && \
cd .. && \
touch .libxkbcommon
external/.wayland:
$(call setenv) && \
cd external && \
mkdir wayland && \
cd wayland && \
wget http://wayland.freedesktop.org/releases/wayland-1.6.0.tar.xz && \
tar xf wayland-1.6.0.tar.xz && \
cd wayland-1.6.0 && \
./configure --prefix $(WID) && \
make && make install && \
cd ../.. && \
touch .wayland
westeros-protocols: xdg-shell-v4 xdg-shell-v5 simpleshell
xdg-shell-v4: protocol/version4/xdg-shell-server-protocol.h \
protocol/version4/xdg-shell-protocol.c
protocol/version4/xdg-shell-server-protocol.h: protocol/version4/xdg-shell.xml
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C protocol
protocol/version4/xdg-shell-protocol.c: protocol/version4/xdg-shell.xml
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C protocol
xdg-shell-v5: protocol/version5/xdg-shell-server-protocol.h \
protocol/version5/xdg-shell-protocol.c
protocol/version5/xdg-shell-server-protocol.h: protocol/version5/xdg-shell.xml
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C protocol
protocol/version5/xdg-shell-protocol.c: protocol/version5/xdg-shell.xml
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C protocol
simpleshell: simpleshell/protocol/simpleshell-client-protocol.h \
simpleshell/protocol/simpleshell-server-protocol.h \
simpleshell/protocol/simpleshell-protocol.c
simpleshell/protocol/simpleshell-client-protocol.h:
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C simpleshell/protocol
simpleshell/protocol/simpleshell-server-protocol.h:
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C simpleshell/protocol
simpleshell/protocol/simpleshell-protocol.c:
export SCANNER_TOOL=${WID}/bin/wayland-scanner && \
make -C simpleshell/protocol
westeros-simpleshell:
$(call setenv) && \
cd simpleshell && \
aclocal -I cfg && \
libtoolize --automake && \
autoheader && \
automake --foreign --add-missing && \
rm -f configure && \
autoconf && \
./configure --prefix $(WID) && \
make && make install
westeros-core:
$(call setenv) && \
aclocal -I cfg && \
libtoolize --automake && \
autoheader && \
automake --foreign --add-missing && \
rm -f configure && \
autoconf && \
./configure --prefix $(WID) --enable-${XDGOPT} --enable-rendergl --enable-app --enable-test && \
make && make install