reorg wrt make implicit rules and custom versions of <whatever>
This commit is contained in:
parent
9489353930
commit
70b9977d4c
19
Makefile
19
Makefile
@ -2,6 +2,7 @@
|
|||||||
# the Adobe Flex "Geting Started" tutorial at:
|
# the Adobe Flex "Geting Started" tutorial at:
|
||||||
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
|
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
|
||||||
|
|
||||||
|
include rules.mk
|
||||||
|
|
||||||
# sets mxmlc and compc to their respective basenames
|
# sets mxmlc and compc to their respective basenames
|
||||||
# if not overridden in command line like so:
|
# if not overridden in command line like so:
|
||||||
@ -13,23 +14,17 @@ COMPC ?= compc
|
|||||||
# define all target swf paths (which don't yet exist if
|
# define all target swf paths (which don't yet exist if
|
||||||
# they've never been built)
|
# they've never been built)
|
||||||
SWFS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.mxml))
|
SWFS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.mxml))
|
||||||
|
SWFS += $(patsubst %.mxml,%.swf,$(wildcard custom-*/*.mxml))
|
||||||
|
|
||||||
|
|
||||||
# define an implicit build rule for any file matching %.swf,
|
# glob up all component files as well, since changes to them
|
||||||
# using the $< (input) and $@ (output) automatic variables
|
# should also prompt rebuild
|
||||||
%.swf : %.mxml
|
COMPONENTS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.as))
|
||||||
$(MXMLC) $< -warnings -l+=$(dir $<) -output $@
|
COMPONENTS += $(patsubst %.mxml,%.swf,$(wildcard custom-*/*.as))
|
||||||
|
|
||||||
|
|
||||||
# define an implicit build rule for any file matching %.swc,
|
|
||||||
# using the $< (input) and $@ (output) automatic variables
|
|
||||||
# just like with the %.swf implicit rule above
|
|
||||||
%.swc : %.as
|
|
||||||
$(COMPC) -sp+=./ -output $@ -include-classes $(subst /,.,$(basename $<))
|
|
||||||
|
|
||||||
|
|
||||||
# build all expected swf and swc files
|
# build all expected swf and swc files
|
||||||
all: $(SWFS)
|
all: $(SWFS) $(COMPONENTS)
|
||||||
|
|
||||||
|
|
||||||
# remove all swf files in the tree
|
# remove all swf files in the tree
|
||||||
|
11
rules.mk
Normal file
11
rules.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# define an implicit build rule for any file matching %.swf,
|
||||||
|
# using the $< (input) and $@ (output) automatic variables
|
||||||
|
%.swf : %.mxml
|
||||||
|
$(MXMLC) $< -warnings -l+=$(dir $<) -output $@
|
||||||
|
|
||||||
|
|
||||||
|
# define an implicit build rule for any file matching %.swc,
|
||||||
|
# using the $< (input) and $@ (output) automatic variables
|
||||||
|
# just like with the %.swf implicit rule above
|
||||||
|
%.swc : %.as
|
||||||
|
$(COMPC) -sp+=./ -output $@ -include-classes $(subst /,.,$(basename $<))
|
Loading…
Reference in New Issue
Block a user