comparison Makefile @ 0:b03c3ac205e9

Initial revision
author Guido Berhoerster <guido+gilouche-xfwm4-theme@berhoerster.name>
date Mon, 09 Mar 2015 12:29:07 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b03c3ac205e9
1 #
2 # Copyright (C) 2011 Guido Berhoerster <guido+gilouche-xfwm4-theme@berhoerster.name>
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 # USA.
18 #
19
20 NAME = gilouche-xfwm4-theme
21 THEME_NAME = Gilouche
22 VERSION = 1
23 DISTNAME = $(NAME)-$(VERSION)
24
25 CONVERT := gm convert
26 CONVERT.png := $(CONVERT) +dither -type TrueColorMatte
27 CONVERT.xpm := $(CONVERT) +dither -depth 8
28 PAX := pax
29 GZIP := gzip
30 INSTALL := install
31 INSTALL.data := $(INSTALL) -D -m 0644
32
33 DESTDIR ?=
34 prefix ?= /usr/local
35 themesdir ?= $(prefix)/share/themes
36
37 XFWM4_THEME_DIR = $(THEME_NAME)/xfwm4
38 XFWM4_DECORATION = \
39 $(XFWM4_THEME_DIR)/top-left-active.xpm \
40 $(XFWM4_THEME_DIR)/top-right-active.xpm \
41 $(XFWM4_THEME_DIR)/top-left-inactive.xpm \
42 $(XFWM4_THEME_DIR)/top-right-inactive.xpm \
43 $(XFWM4_THEME_DIR)/title-1-active.xpm \
44 $(XFWM4_THEME_DIR)/title-2-active.xpm \
45 $(XFWM4_THEME_DIR)/title-3-active.xpm \
46 $(XFWM4_THEME_DIR)/title-4-active.xpm \
47 $(XFWM4_THEME_DIR)/title-5-active.xpm \
48 $(XFWM4_THEME_DIR)/title-1-inactive.xpm \
49 $(XFWM4_THEME_DIR)/title-2-inactive.xpm \
50 $(XFWM4_THEME_DIR)/title-3-inactive.xpm \
51 $(XFWM4_THEME_DIR)/title-4-inactive.xpm \
52 $(XFWM4_THEME_DIR)/title-5-inactive.xpm \
53 $(XFWM4_THEME_DIR)/left-active.xpm \
54 $(XFWM4_THEME_DIR)/right-active.xpm \
55 $(XFWM4_THEME_DIR)/left-inactive.xpm \
56 $(XFWM4_THEME_DIR)/right-inactive.xpm \
57 $(XFWM4_THEME_DIR)/bottom-left-active.xpm \
58 $(XFWM4_THEME_DIR)/bottom-right-active.xpm \
59 $(XFWM4_THEME_DIR)/bottom-left-inactive.xpm \
60 $(XFWM4_THEME_DIR)/bottom-right-inactive.xpm \
61 $(XFWM4_THEME_DIR)/bottom-active.xpm \
62 $(XFWM4_THEME_DIR)/bottom-inactive.xpm \
63 $(NULL)
64 XFWM4_BUTTONS = \
65 $(XFWM4_THEME_DIR)/menu-active.xpm \
66 $(XFWM4_THEME_DIR)/menu-prelight.xpm \
67 $(XFWM4_THEME_DIR)/menu-pressed.xpm \
68 $(XFWM4_THEME_DIR)/menu-inactive.xpm \
69 $(XFWM4_THEME_DIR)/hide-active.png \
70 $(XFWM4_THEME_DIR)/hide-active.xpm \
71 $(XFWM4_THEME_DIR)/hide-inactive.png \
72 $(XFWM4_THEME_DIR)/hide-inactive.xpm \
73 $(XFWM4_THEME_DIR)/hide-prelight.png \
74 $(XFWM4_THEME_DIR)/hide-prelight.xpm \
75 $(XFWM4_THEME_DIR)/hide-pressed.png \
76 $(XFWM4_THEME_DIR)/hide-pressed.xpm \
77 $(XFWM4_THEME_DIR)/maximize-active.png \
78 $(XFWM4_THEME_DIR)/maximize-active.xpm \
79 $(XFWM4_THEME_DIR)/maximize-prelight.png \
80 $(XFWM4_THEME_DIR)/maximize-prelight.xpm \
81 $(XFWM4_THEME_DIR)/maximize-pressed.png \
82 $(XFWM4_THEME_DIR)/maximize-pressed.xpm \
83 $(XFWM4_THEME_DIR)/maximize-inactive.png \
84 $(XFWM4_THEME_DIR)/maximize-inactive.xpm \
85 $(XFWM4_THEME_DIR)/maximize-toggled-active.png \
86 $(XFWM4_THEME_DIR)/maximize-toggled-active.xpm \
87 $(XFWM4_THEME_DIR)/maximize-toggled-prelight.png \
88 $(XFWM4_THEME_DIR)/maximize-toggled-prelight.xpm \
89 $(XFWM4_THEME_DIR)/maximize-toggled-pressed.png \
90 $(XFWM4_THEME_DIR)/maximize-toggled-pressed.xpm \
91 $(XFWM4_THEME_DIR)/maximize-toggled-inactive.png \
92 $(XFWM4_THEME_DIR)/maximize-toggled-inactive.xpm \
93 $(XFWM4_THEME_DIR)/close-active.png \
94 $(XFWM4_THEME_DIR)/close-active.xpm \
95 $(XFWM4_THEME_DIR)/close-prelight.png \
96 $(XFWM4_THEME_DIR)/close-prelight.xpm \
97 $(XFWM4_THEME_DIR)/close-pressed.png \
98 $(XFWM4_THEME_DIR)/close-pressed.xpm \
99 $(XFWM4_THEME_DIR)/close-inactive.png \
100 $(XFWM4_THEME_DIR)/close-inactive.xpm \
101 $(NULL)
102
103 .DEFAULT_TARGET = all
104
105 .PHONY: all clean clobber dist install
106
107 all: $(XFWM4_DECORATION) $(XFWM4_BUTTONS)
108
109 $(XFWM4_THEME_DIR)/top-left-active.xpm: decoration-template.png
110 $(CONVERT.xpm) -crop 6x25+0+0 $< $@
111
112 $(XFWM4_THEME_DIR)/top-right-active.xpm: $(XFWM4_THEME_DIR)/top-left-active.xpm
113 $(CONVERT) -flop $< $@
114
115 $(XFWM4_THEME_DIR)/top-left-inactive.xpm: decoration-template.png
116 $(CONVERT.xpm) -crop 6x25+14+0 $< $@
117
118 $(XFWM4_THEME_DIR)/top-right-inactive.xpm: $(XFWM4_THEME_DIR)/top-left-inactive.xpm
119 $(CONVERT) -flop $< $@
120
121 $(XFWM4_THEME_DIR)/title-1-active.xpm: decoration-template.png
122 $(CONVERT.xpm) -crop 8x25+6+0 $< $@
123
124 $(XFWM4_THEME_DIR)/title-2-active.xpm: decoration-template.png
125 $(CONVERT.xpm) -crop 8x25+6+0 $< $@
126
127 $(XFWM4_THEME_DIR)/title-3-active.xpm: decoration-template.png
128 $(CONVERT.xpm) -crop 8x25+6+0 $< $@
129
130 $(XFWM4_THEME_DIR)/title-4-active.xpm: decoration-template.png
131 $(CONVERT.xpm) -crop 8x25+6+0 $< $@
132
133 $(XFWM4_THEME_DIR)/title-5-active.xpm: decoration-template.png
134 $(CONVERT.xpm) -crop 8x25+6+0 $< $@
135
136 $(XFWM4_THEME_DIR)/title-1-inactive.xpm: decoration-template.png
137 $(CONVERT.xpm) -crop 8x25+20+0 $< $@
138
139 $(XFWM4_THEME_DIR)/title-2-inactive.xpm: decoration-template.png
140 $(CONVERT.xpm) -crop 8x25+20+0 $< $@
141
142 $(XFWM4_THEME_DIR)/title-3-inactive.xpm: decoration-template.png
143 $(CONVERT.xpm) -crop 8x25+20+0 $< $@
144
145 $(XFWM4_THEME_DIR)/title-4-inactive.xpm: decoration-template.png
146 $(CONVERT.xpm) -crop 8x25+20+0 $< $@
147
148 $(XFWM4_THEME_DIR)/title-5-inactive.xpm: decoration-template.png
149 $(CONVERT.xpm) -crop 8x25+20+0 $< $@
150
151 $(XFWM4_THEME_DIR)/left-active.xpm: decoration-template.png
152 $(CONVERT.xpm) -crop 3x8+0+25 $< $@
153
154 $(XFWM4_THEME_DIR)/right-active.xpm: $(XFWM4_THEME_DIR)/left-active.xpm
155 $(CONVERT) -flop $< $@
156
157 $(XFWM4_THEME_DIR)/left-inactive.xpm: decoration-template.png
158 $(CONVERT.xpm) -crop 3x8+14+25 $< $@
159
160 $(XFWM4_THEME_DIR)/right-inactive.xpm: $(XFWM4_THEME_DIR)/left-inactive.xpm
161 $(CONVERT) -flop $< $@
162
163 $(XFWM4_THEME_DIR)/bottom-left-active.xpm: decoration-template.png
164 $(CONVERT.xpm) -crop 6x3+0+33 $< $@
165
166 $(XFWM4_THEME_DIR)/bottom-right-active.xpm: $(XFWM4_THEME_DIR)/bottom-left-active.xpm
167 $(CONVERT) -flop $< $@
168
169 $(XFWM4_THEME_DIR)/bottom-left-inactive.xpm: decoration-template.png
170 $(CONVERT.xpm) -crop 6x3+14+33 $< $@
171
172 $(XFWM4_THEME_DIR)/bottom-right-inactive.xpm: $(XFWM4_THEME_DIR)/bottom-left-inactive.xpm
173 $(CONVERT) -flop $< $@
174
175 $(XFWM4_THEME_DIR)/bottom-active.xpm: decoration-template.png
176 $(CONVERT.xpm) -crop 8x3+6+33 $< $@
177
178 $(XFWM4_THEME_DIR)/bottom-inactive.xpm: decoration-template.png
179 $(CONVERT.xpm) -crop 8x3+14+33 $< $@
180
181 $(XFWM4_THEME_DIR)/menu-active.xpm: buttons-template.png
182 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
183
184 $(XFWM4_THEME_DIR)/menu-prelight.xpm: buttons-template.png
185 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
186
187 $(XFWM4_THEME_DIR)/menu-pressed.xpm: buttons-template.png
188 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
189
190 $(XFWM4_THEME_DIR)/menu-inactive.xpm: buttons-template.png
191 $(CONVERT.xpm) -crop 18x18+0+90 $< $@
192
193 $(XFWM4_THEME_DIR)/hide-active.png: buttons-template.png
194 $(CONVERT.png) -crop 18x18+0+0 $< $@
195
196 $(XFWM4_THEME_DIR)/hide-active.xpm: buttons-template.png
197 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
198
199 $(XFWM4_THEME_DIR)/hide-inactive.png: buttons-template.png
200 $(CONVERT.png) -crop 18x18+0+36 $< $@
201
202 $(XFWM4_THEME_DIR)/hide-inactive.xpm: buttons-template.png
203 $(CONVERT.xpm) -crop 18x18+0+90 $< $@
204
205 $(XFWM4_THEME_DIR)/hide-prelight.png: buttons-template.png
206 $(CONVERT.png) -crop 18x18+0+18 $< $@
207
208 $(XFWM4_THEME_DIR)/hide-prelight.xpm: buttons-template.png
209 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
210
211 $(XFWM4_THEME_DIR)/hide-pressed.png: buttons-template.png
212 $(CONVERT.png) -crop 18x18+0+0 $< $@
213
214 $(XFWM4_THEME_DIR)/hide-pressed.xpm: buttons-template.png
215 $(CONVERT.xpm) -crop 18x18+0+72 $< $@
216
217 $(XFWM4_THEME_DIR)/maximize-active.png: buttons-template.png
218 $(CONVERT.png) -crop 18x18+18+0 $< $@
219
220 $(XFWM4_THEME_DIR)/maximize-active.xpm: buttons-template.png
221 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
222
223 $(XFWM4_THEME_DIR)/maximize-prelight.png: buttons-template.png
224 $(CONVERT.png) -crop 18x18+18+18 $< $@
225
226 $(XFWM4_THEME_DIR)/maximize-prelight.xpm: buttons-template.png
227 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
228
229 $(XFWM4_THEME_DIR)/maximize-pressed.png: buttons-template.png
230 $(CONVERT.png) -crop 18x18+18+0 $< $@
231
232 $(XFWM4_THEME_DIR)/maximize-pressed.xpm: buttons-template.png
233 $(CONVERT.xpm) -crop 18x18+0+72 $< $@
234
235 $(XFWM4_THEME_DIR)/maximize-inactive.png: buttons-template.png
236 $(CONVERT.png) -crop 18x18+18+36 $< $@
237
238 $(XFWM4_THEME_DIR)/maximize-inactive.xpm: buttons-template.png
239 $(CONVERT.xpm) -crop 18x18+0+90 $< $@
240
241 $(XFWM4_THEME_DIR)/maximize-toggled-active.png: buttons-template.png
242 $(CONVERT.png) -crop 18x18+36+0 $< $@
243
244 $(XFWM4_THEME_DIR)/maximize-toggled-active.xpm: buttons-template.png
245 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
246
247 $(XFWM4_THEME_DIR)/maximize-toggled-prelight.png: buttons-template.png
248 $(CONVERT.png) -crop 18x18+36+18 $< $@
249
250 $(XFWM4_THEME_DIR)/maximize-toggled-prelight.xpm: buttons-template.png
251 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
252
253 $(XFWM4_THEME_DIR)/maximize-toggled-pressed.png: buttons-template.png
254 $(CONVERT.png) -crop 18x18+36+0 $< $@
255
256 $(XFWM4_THEME_DIR)/maximize-toggled-pressed.xpm: buttons-template.png
257 $(CONVERT.xpm) -crop 18x18+0+72 $< $@
258
259 $(XFWM4_THEME_DIR)/maximize-toggled-inactive.png: buttons-template.png
260 $(CONVERT.png) -crop 18x18+36+36 $< $@
261
262 $(XFWM4_THEME_DIR)/maximize-toggled-inactive.xpm: buttons-template.png
263 $(CONVERT.xpm) -crop 18x18+0+90 $< $@
264
265 $(XFWM4_THEME_DIR)/close-active.png: buttons-template.png
266 $(CONVERT.png) -crop 18x18+54+0 $< $@
267
268 $(XFWM4_THEME_DIR)/close-active.xpm: buttons-template.png
269 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
270
271 $(XFWM4_THEME_DIR)/close-prelight.png: buttons-template.png
272 $(CONVERT.png) -crop 18x18+54+18 $< $@
273
274 $(XFWM4_THEME_DIR)/close-prelight.xpm: buttons-template.png
275 $(CONVERT.xpm) -crop 18x18+0+54 $< $@
276
277 $(XFWM4_THEME_DIR)/close-pressed.png: buttons-template.png
278 $(CONVERT.png) -crop 18x18+54+0 $< $@
279
280 $(XFWM4_THEME_DIR)/close-pressed.xpm: buttons-template.png
281 $(CONVERT.xpm) -crop 18x18+0+72 $< $@
282
283 $(XFWM4_THEME_DIR)/close-inactive.png: buttons-template.png
284 $(CONVERT.png) -crop 18x18+54+36 $< $@
285
286 $(XFWM4_THEME_DIR)/close-inactive.xpm: buttons-template.png
287 $(CONVERT.xpm) -crop 18x18+0+90 $< $@
288
289 install: all
290 for theme_file in $(XFWM4_THEME_DIR)/themerc $(XFWM4_DECORATION) \
291 $(XFWM4_BUTTONS); do \
292 $(INSTALL.data) $${theme_file} \
293 "$(DESTDIR)$(themesdir)/$${theme_file}"; \
294 done
295
296 clean:
297 rm -f $(XFWM4_DECORATION) $(XFWM4_BUTTONS)
298
299 clobber: clean
300
301 dist: all
302 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
303 -s ',\./,$(DISTNAME)/,' . | $(GZIP) > $(DISTNAME).tar.gz