File: Makefile

package info (click to toggle)
wings3d 2.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,008 kB
  • sloc: erlang: 108,230; lisp: 1,434; sh: 809; makefile: 732; ansic: 430; xml: 37
file content (67 lines) | stat: -rw-r--r-- 1,585 bytes parent folder | download | duplicates (3)
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 building icons for Wings 3D.
#
#  Copyright (c) 2001-2013 Bjorn Gustavsson
#
#  See the file "license.terms" for information on usage and redistribution
#  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#     $Id: Makefile,v 1.7 2006/08/23 02:56:49 antoneos Exp $
#

include ../erl.mk

.SUFFIXES: .erl .jam .beam .yrl .xrl .bin .mib .hrl .sgml .html .ps .3 .1 \
	.fig .dvi .tex .class .java .pdf .psframe .pscrop

ESRC=.
EBIN=../ebin

ICONSETS= \
	classic \
	bluecube \
	purpletube

ICONSIZE= \
	48x48 \
	256x256 \
	379x379

TARGET_FILES = $(ICONSETS:%=$(EBIN)/wings_icon_%.bundle) \
		$(ICONSIZE:%=$(EBIN)/wings_icon_%.png)

GEN_PS_ICONS=$(wildcard orig/bluecube-assests/*.png)
PS_ICONS=$(patsubst %,bluecube/%,$(notdir $(GEN_PS_ICONS)))

# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_FLAGS += -pa ../ebin
ERL_COMPILE_FLAGS += -I ../.. -Werror +debug_info

# ----------------------------------------------------
# Targets
# ----------------------------------------------------

opt debug: collect_bmp.beam $(TARGET_FILES)

bluecube/%.png: orig/bluecube-assests/%.png
	mv $? $@

$(EBIN)/wings_icon_%.bundle: %/*.bmp %/*.png collect_bmp.beam about_wings.bmp
	$(ERL) $(ERL_FLAGS) -noinput -run collect_bmp start . $(ESRC)/$* $@ -s erlang halt

clean:
	for ICONSET in $(ICONSETS); do \
		rm -f $(EBIN)/wings_icon_$$ICONSET.bundle; \
	done
	rm -f collect_bmp.beam
	@echo

$(EBIN)/%.png:
	install $*.png $@

%.beam: $(ESRC)/%.erl
	$(ERLC) $(ERL_COMPILE_FLAGS) -o. $<