forked from qmachine/qmachine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
631 lines (527 loc) · 30.3 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
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
#- GNU Makefile
#- Makefile ~~
#
# This contains a live development workflow for QMachine (QM). To get started
# on Mac OS X 10.9 with your own local sandbox, you will need to install ...
#
# ... Homebrew using directions from http://brew.sh.
#
# ... a minimal set of native dependencies by typing
# $ brew install imagemagick node
#
# To run QM on localhost, run
#
# $ make local-sandbox
#
# QM uses the SQLite bindings by default for convenience because you don't
# have to turn on any other programs, configure internal ports, etc. If you
# can't get SQLite to work on your platform, or if you just prefer another
# database, the current choices are Apache CouchDB, MongoDB, PostgreSQL, and
# Redis. Then, you can run one of the following:
#
# $ make local-sandbox db=couch
# $ make local-sandbox db=mongo
# $ make local-sandbox db=postgres
# $ make local-sandbox db=redis
#
# I prefer the standalone "Apache CouchDB.app" available from the CouchDB
# website (http://couchdb.apache.org/) over the Homebrew-installed version
# because it's more convenient. I like the convenience of "Postgres.app"
# (http://postgresapp.com), but its default configuration is *not* a
# high-performance one -- in my testing, SQLite is almost as fast. I don't
# know of any nice launchers for MongoDB or Redis, but Homebrew can install
# them for you, and it includes directions for launching them.
#
# Some optional targets may require extra packages to be installed by
# Homebrew, including
#
# $ brew install closure-compiler jsmin mongodb qrencode \
# phantomjs redis yuicompressor
#
# For a long time, icon generation from LaTeX source code was included as an
# extra touch, but folks complained too much about the extra dependency on
# MacTeX 2012. Consequently, the workflow now generates a green placeholder
# directly from ImageMagick which can be overridden by your own image file
# if you create an "icons/logo.pdf" file beforehand.
#
# Thanks for stopping by :-)
#
# ~~ (c) SRW, 06 Feb 2012
# ~~ last updated 29 May 2014
PROJ_ROOT := $(realpath $(dir $(firstword $(MAKEFILE_LIST))))
include $(PROJ_ROOT)/share/macros.make
BUILD_DIR := $(PROJ_ROOT)/build
CACHE_DIR := $(PROJ_ROOT)/cache
ICONS_DIR := $(PROJ_ROOT)/icons
SHARE_DIR := $(PROJ_ROOT)/share
SRC_DIR := $(PROJ_ROOT)/src
TEST_DIR := $(PROJ_ROOT)/tests
LOCAL_ADDR := http://localhost:8177
QM_API_LOC := '{"sqlite":"qm.db"}'
QM_API_URL := https://api.qmachine.org
QM_WWW_URL := https://www.qmachine.org
ifeq ("$(strip $(db))", "couch")
QM_API_LOC := '{"couch":"http://127.0.0.1:5984/db"}'
endif
ifeq ("$(strip $(db))", "mongo")
QM_API_LOC := '{"mongo":"mongodb://localhost:27017/test"}'
endif
ifeq ("$(strip $(db))", "postgres")
QM_API_LOC := '{"postgres":"postgres://localhost:5432/$(USER)"}'
endif
ifeq ("$(strip $(db))", "redis")
QM_API_LOC := '{"redis":"redis://:@127.0.0.1:6379"}'
endif
.PHONY: all check check-versions clean clobber distclean help reset update
.SILENT: ;
'': help;
all: $(shell $(LS) $(SRC_DIR))
check: $(CACHE_DIR)/quanah.js | check-versions
@ $(PHANTOMJS) --config=$(TEST_DIR)/config.json \
$(TEST_DIR)/tests.js '$(LOCAL_ADDR)'
check-versions:
@ $(NODEJS) $(SHARE_DIR)/check-versions.js
clean: reset
@ $(RM) $(BUILD_DIR)/browser-client/ ; \
$(RM) $(BUILD_DIR)/chrome-hosted-app/ ; \
$(RM) $(BUILD_DIR)/local-sandbox/ ; \
$(RM) $(BUILD_DIR)/rack-app/ ; \
$(RM) $(BUILD_DIR)/ruby-gem/ ; \
$(RM) $(BUILD_DIR)/web-service/ ; \
if [ ! "$$($(LS) -A $(BUILD_DIR))" ]; then \
$(RM) $(BUILD_DIR) ; \
fi
clobber: clean
@ $(RM) $(CACHE_DIR)
distclean: clobber
@ $(RM) $(BUILD_DIR) $(PROJ_ROOT)/.*_history ; \
if [ -f "$(ICONS_DIR)/logo.pdf" ]; then \
$(CP) $(ICONS_DIR)/logo.pdf $(PROJ_ROOT)/logo.pdf ; \
$(RM) $(ICONS_DIR) ; \
$(call make-directory, $(ICONS_DIR)) ; \
$(CP) $(PROJ_ROOT)/logo.pdf $(ICONS_DIR) ; \
$(RM) $(PROJ_ROOT)/logo.pdf ; \
else \
$(RM) $(ICONS_DIR) ; \
fi
help:
@ $(call show-usage-info)
reset:
@ $(call contingent, clear)
update:
@ $(GIT) submodule init ; \
$(GIT) submodule update
###
.PHONY: browser-client chrome-hosted-app npm-module ruby-gem web-service
browser-client: \
$(addprefix $(BUILD_DIR)/browser-client/, \
apple-touch-icon-57x57.png \
apple-touch-icon-72x72.png \
apple-touch-icon-76x76.png \
apple-touch-icon-114x114.png \
apple-touch-icon-120x120.png \
apple-touch-icon-144x144.png \
apple-touch-icon-152x152.png \
browserconfig.xml \
cache.manifest \
coffeescript.js \
favicon.ico \
fluidicon.png \
giant-favicon.ico \
hits-by-country.json \
homepage.js \
html5shiv.js \
icon-128.png \
index.html \
manifest.webapp \
q.js \
respond.js \
robots.txt \
square150x150logo.png \
sitemap.xml \
style-min.css \
wiki.png \
)
@ $(call hilite, 'Created $@.')
chrome-hosted-app: \
$(addprefix $(BUILD_DIR)/chrome-hosted-app/, \
qmachine.zip \
snapshot-1280x800.png \
snapshot-440x280.png \
)
@ $(call hilite, 'Created $@.')
npm-module: | $(BUILD_DIR)/npm-module/
@ $(CD) $(BUILD_DIR)/npm-module/ ; \
$(NPM) install ; \
$(NPM) shrinkwrap ; \
$(call hilite, 'Created $@.')
ruby-gem: | $(BUILD_DIR)/ruby-gem/
@ $(CD) $(BUILD_DIR)/ruby-gem/ ; \
$(GEM) build qm.gemspec
web-service: \
$(addprefix $(BUILD_DIR)/web-service/, \
.gitignore \
custom.js \
katamari.json \
package.json \
Procfile \
server.js \
.slugignore \
)
@ $(call hilite, 'Created $@.')
###
.PHONY: local-sandbox rack-app
local-sandbox:
@ $(MAKE) \
QM_API_STRING=$(strip $(QM_API_LOC)) \
QM_API_URL='$(strip $(LOCAL_ADDR))' \
QM_WWW_URL='$(strip $(LOCAL_ADDR))' \
web-service ; \
$(CD) $(BUILD_DIR) ; \
if [ ! -d $@/ ]; then \
$(CP) web-service $@ ; \
fi ; \
if [ ! -d $@/node_modules/ ]; then \
$(call make-directory, $@/node_modules/) ; \
fi ; \
if [ ! -d $@/node_modules/qm ]; then \
$(CP) npm-module $@/node_modules/qm ; \
fi ; \
$(CD) $@/ ; \
$(NPM) install ; \
QM_API_STRING=$(QM_API_LOC) \
QM_WWW_STRING='"$(BUILD_DIR)/$@/katamari.json"' $(NPM) start
rack-app: | $(BUILD_DIR)/rack-app/
@ $(MAKE) \
QM_API_URL='$(strip $(LOCAL_ADDR))' \
QM_WWW_URL='$(strip $(LOCAL_ADDR))' \
browser-client ; \
$(CD) $(BUILD_DIR) ; \
if [ ! -d $@/public/ ]; then \
$(CP) browser-client $@/public ; \
fi ; \
$(CD) $@/ ; \
$(BUNDLE) package ; \
$(BUNDLE) exec rackup
###
$(BUILD_DIR):
@ $(call make-directory, $@)
$(BUILD_DIR)/browser-client: | $(BUILD_DIR)
@ $(call make-directory, $@)
$(BUILD_DIR)/browser-client/cache.manifest: \
$(SRC_DIR)/homepage/cache.manifest \
| $(BUILD_DIR)/browser-client
@ $(call timestamp, $<, $@)
$(BUILD_DIR)/browser-client/manifest.webapp: \
$(SRC_DIR)/homepage/manifest.webapp \
| $(BUILD_DIR)/browser-client
@ $(CP) $< $@
$(BUILD_DIR)/browser-client/%.js: \
$(CACHE_DIR)/%.js \
| $(BUILD_DIR)/browser-client
@ $(call minify-js, $<, $@)
$(BUILD_DIR)/browser-client/%: $(CACHE_DIR)/% | $(BUILD_DIR)/browser-client
@ $(CP) $< $@
$(BUILD_DIR)/browser-client/%: $(ICONS_DIR)/% | $(BUILD_DIR)/browser-client
@ $(CP) $< $@
$(BUILD_DIR)/chrome-hosted-app: | $(BUILD_DIR)
@ $(call make-directory, $@)
$(BUILD_DIR)/chrome-hosted-app/qmachine: | $(BUILD_DIR)/chrome-hosted-app
@ $(call make-directory, $@)
$(BUILD_DIR)/chrome-hosted-app/qmachine/manifest.json: \
$(SRC_DIR)/chrome-hosted-app/manifest.json \
| $(BUILD_DIR)/chrome-hosted-app/qmachine
@ $(CP) $< $@
$(BUILD_DIR)/chrome-hosted-app/qmachine.zip: \
$(BUILD_DIR)/chrome-hosted-app/qmachine/favicon.ico \
$(BUILD_DIR)/chrome-hosted-app/qmachine/icon-128.png \
$(BUILD_DIR)/chrome-hosted-app/qmachine/manifest.json \
| $(BUILD_DIR)/chrome-hosted-app/qmachine
@ $(CD) $(dir $@) ; \
$(ZIP) -r $@ qmachine
$(BUILD_DIR)/chrome-hosted-app/qmachine/%: \
$(ICONS_DIR)/% \
| $(BUILD_DIR)/chrome-hosted-app/qmachine
@ $(CP) $< $@
$(BUILD_DIR)/chrome-hosted-app/snapshot-%.png: \
$(SHARE_DIR)/snapshot.js \
$(SRC_DIR)/chrome-hosted-app/phantomjs-config.json \
| $(BUILD_DIR)/chrome-hosted-app
@ $(PHANTOMJS) \
--config=$(SRC_DIR)/chrome-hosted-app/phantomjs-config.json \
$(SHARE_DIR)/snapshot.js $(QM_WWW_URL) $* $@ ; \
$(CONVERT) -crop $* $@ $@ ; \
if [ -f $(@:%.png=%-0.png) ]; then \
$(CP) $(@:%.png=%-0.png) $@ ; \
$(RM) $(@:%.png=%)-*.png ; \
fi
$(BUILD_DIR)/npm-module: $(SRC_DIR)/npm-module | $(BUILD_DIR)
@ $(CP) $< $@
$(BUILD_DIR)/npm-module/%: $(PROJ_ROOT)/% | $(BUILD_DIR)/npm-module
@ $(CP) $< $@
$(BUILD_DIR)/rack-app/: $(SRC_DIR)/rack-app/ | $(BUILD_DIR)
@ $(CP) $< $@
$(BUILD_DIR)/rack-app/public/: | $(BUILD_DIR)/rack-app/
@ $(call make-directory, $@)
$(BUILD_DIR)/ruby-gem: | $(BUILD_DIR)
@ $(CP) $(SRC_DIR)/ruby-gem/ $@
$(BUILD_DIR)/ruby-gem/README.md: | $(BUILD_DIR)/ruby-gem/
@ $(CP) $(PROJ_ROOT)/README.md $@
$(BUILD_DIR)/web-service: | $(BUILD_DIR)
@ $(call make-directory, $@)
$(BUILD_DIR)/web-service/.gitignore: \
$(PROJ_ROOT)/.gitignore \
| $(BUILD_DIR)/web-service
@ $(CP) $< $@
$(BUILD_DIR)/web-service/katamari.json: \
browser-client \
npm-module \
| $(BUILD_DIR)/web-service
@ $(NODEJS) $(BUILD_DIR)/npm-module/examples/roll-up.js \
$(BUILD_DIR)/browser-client $@
$(BUILD_DIR)/web-service/%: $(SHARE_DIR)/% | $(BUILD_DIR)/web-service
@ $(CP) $< $@
$(BUILD_DIR)/web-service/%: $(SRC_DIR)/web-service/% | $(BUILD_DIR)/web-service
@ $(CP) $< $@
$(CACHE_DIR):
@ $(call make-directory, $@)
$(CACHE_DIR)/bootstrap.css: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/N5U0wB")
$(CACHE_DIR)/bootstrap.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/MfuMZu")
$(CACHE_DIR)/bootstrap-theme.css: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/qPqsDk")
$(CACHE_DIR)/browserconfig.xml: \
$(SRC_DIR)/homepage/browserconfig.xml \
| $(CACHE_DIR)
@ $(CP) $< $@
$(CACHE_DIR)/coffeescript.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/a6ZyGk")
$(CACHE_DIR)/hits-by-country.json: \
$(SRC_DIR)/homepage/hits-by-country.json \
| $(CACHE_DIR)
@ $(CP) $< $@
$(CACHE_DIR)/homepage.js: \
$(CACHE_DIR)/jquery-git1.js \
$(CACHE_DIR)/bootstrap.js \
$(CACHE_DIR)/main.js \
| $(CACHE_DIR)
@ $(call replace-url-macros, $^, $@) ; \
$(call remove-source-maps, $@)
$(CACHE_DIR)/html5shiv.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/8Ah9dC")
$(CACHE_DIR)/index.html: $(SRC_DIR)/homepage/index.html | $(CACHE_DIR)
@ $(call replace-url-macros, $<, $@)
$(CACHE_DIR)/jquery-191.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/tiSzW")
$(CACHE_DIR)/jquery-git1.js: | $(CACHE_DIR)
@ $(call download-url, "https://code.jquery.com/jquery-git1.min.js")
$(CACHE_DIR)/jslint.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/9XuoRL")
$(CACHE_DIR)/json2.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/1MnPH")
$(CACHE_DIR)/main.js: $(SRC_DIR)/homepage/main.js | $(CACHE_DIR)
@ $(call replace-url-macros, $<, $@)
$(CACHE_DIR)/q.js: \
$(CACHE_DIR)/quanah.js \
$(CACHE_DIR)/qmachine.js \
$(CACHE_DIR)/jslint.js \
$(CACHE_DIR)/json2.js \
| $(CACHE_DIR)
@ $(call replace-url-macros, $^, $@)
$(CACHE_DIR)/qmachine.js: $(SRC_DIR)/browser-client/qmachine.js | $(CACHE_DIR)
@ $(call replace-url-macros, $<, $@)
$(CACHE_DIR)/quanah.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/0C6XzA")
$(CACHE_DIR)/respond.js: | $(CACHE_DIR)
@ $(call download-url, "http://goo.gl/xZRyTq")
$(CACHE_DIR)/robots.txt: $(SRC_DIR)/homepage/robots.txt | $(CACHE_DIR)
@ $(call replace-url-macros, $<, $@)
$(CACHE_DIR)/sitemap.xml: $(SRC_DIR)/homepage/sitemap.xml | $(CACHE_DIR)
@ $(call replace-iso-date, $<, $@-temp) ; \
$(call replace-url-macros, $@-temp, $@) ; \
$(RM) $@-temp
$(CACHE_DIR)/style.css: $(SRC_DIR)/homepage/style.css | $(CACHE_DIR)
@ $(CP) $< $@
$(CACHE_DIR)/style-min.css: \
$(CACHE_DIR)/bootstrap.css \
$(CACHE_DIR)/bootstrap-theme.css \
$(CACHE_DIR)/style.css \
| $(CACHE_DIR)
@ $(call minify-css, $^, $@)
$(ICONS_DIR):
@ $(call make-directory, $@)
.SECONDARY: \
$(addprefix $(ICONS_DIR)/, \
amazon-logo.png \
apple-touch-icon-57x57.png \
apple-touch-icon-72x72.png \
apple-touch-icon-76x76.png \
apple-touch-icon-114x114.png \
apple-touch-icon-120x120.png \
apple-touch-icon-144x144.png \
apple-touch-icon-152x152.png \
apple-touch-startup-image-320x460.png \
apple-touch-startup-image-320x460.png \
apple-touch-startup-image-640x920.png \
apple-touch-startup-image-640x1096.png \
apple-touch-startup-image-768x1004.png \
apple-touch-startup-image-748x1024.png \
apple-touch-startup-image-1536x2008.png \
apple-touch-startup-image-1496x2048.png \
bitbucket.jpg \
dropbox-16.png \
dropbox-64.png \
dropbox-128.png \
facebook-16x16.png \
facebook-75x75.png \
favicon.ico \
fluidicon.png \
giant-favicon.ico \
google-apps-header.png \
google-code.png \
google-plus.png \
icon-128.png \
large-app-icon.png \
programmable-web.png \
qr.png \
stashboard-logo.png \
wiki.png \
)
$(ICONS_DIR)/amazon-logo.png: $(ICONS_DIR)/icon-150.png | $(ICONS_DIR)
@ $(CP) $< $@
$(ICONS_DIR)/apple-touch-icon-%.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
\( +clone \
-channel A -morphology EdgeOut Diamond:10 +channel \
+level-colors white \
\) -compose DstOver -composite \
canvas:'#929292' \
-background none \
-density 96 \
-resize "$*" \
-quality 100 \
-composite \
-background '#929292' \
-alpha off \
)
$(ICONS_DIR)/apple-touch-startup-image-%.png: | $(ICONS_DIR)
@ $(call generate-image-from, , -size "$*" canvas:'#EEEEEE')
$(ICONS_DIR)/bitbucket.jpg: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, $<, \
-background white \
-alpha off \
-density 96 \
-resize 112x112 \
-quality 100 \
-gravity center \
-extent 128x128 \
-background white \
-alpha off \
)
$(ICONS_DIR)/dropbox-%.png: $(ICONS_DIR)/icon-%.png | $(ICONS_DIR)
@ $(CP) $< $@
$(ICONS_DIR)/facebook-%.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, $<, \
-background white \
-alpha off \
-density 96 \
-resize "$*" \
-quality 100 \
)
$(ICONS_DIR)/favicon.ico: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, $<, -compress Zip -resize 16x16)
$(ICONS_DIR)/fluidicon.png: $(ICONS_DIR)/icon-512.png | $(ICONS_DIR)
@ $(CP) $< $@
$(ICONS_DIR)/giant-favicon.ico: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 24x24 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
\( -clone 0 -resize 64x64 \) \
-delete 0 \
)
$(ICONS_DIR)/google-apps-header.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
-density 96 \
-background none \
-resize 51x51 \
-quality 100 \
-gravity center \
-extent 143x59 \
-background white \
-flatten \
-alpha off \
)
$(ICONS_DIR)/google-code.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, $<, \
-background none \
-density 96 \
-resize 55x55 \
-quality 100 \
)
$(ICONS_DIR)/google-plus.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
-density 96 \
-background none \
-resize 320x320 \
-quality 100 \
-gravity center \
-extent 512x512 \
-background white \
-flatten \
-alpha off \
)
$(ICONS_DIR)/icon-%.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, $<, \
-background none \
-density 96 \
-resize "$*x$*" \
-quality 100 \
)
$(ICONS_DIR)/large-app-icon.png: $(ICONS_DIR)/icon-1024.png | $(ICONS_DIR)
@ $(CP) $< $@
$(ICONS_DIR)/logo.png: | $(ICONS_DIR)
@ if [ -f "$(ICONS_DIR)/logo.pdf" ]; then \
SOURCE_FILE="$(ICONS_DIR)/logo.pdf" ; \
else \
SOURCE_FILE='xc:#00704A' ; \
fi ; \
$(call generate-image-from, $${SOURCE_FILE}, \
-density 600 \
-resize 1024x1024 \
-gravity center \
-extent 1170x1170 \
-transparent white \
-transparent-color '#929292' \
-quality 100 \
)
$(ICONS_DIR)/programmable-web.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
-density 96 \
-background none \
-resize 250x250 \
-quality 100 \
-gravity center \
-extent 300x250 \
)
$(ICONS_DIR)/qr.png: | $(ICONS_DIR)
@ $(QRENCODE) --margin=1 --size=10 --output=$@ $(QM_WWW_URL)
$(ICONS_DIR)/square150x150logo.png: $(ICONS_DIR)/icon-150.png | $(ICONS_DIR)
@ $(CP) $< $@
$(ICONS_DIR)/stashboard-logo.png: $(ICONS_DIR)/logo.png | $(ICONS_DIR)
@ $(call generate-image-from, , $<, \
-density 96 \
-background none \
-resize 182x182 \
-quality 100 \
-gravity center \
-extent 246x182 \
)
$(ICONS_DIR)/wiki.png: $(ICONS_DIR)/icon-135.png | $(ICONS_DIR)
@ $(CP) $< $@
###
%:
@ $(call alert, 'No target "$@" found.')
#- vim:set syntax=make: