reorg wrt make implicit rules and custom versions of <whatever>

cat-town
Dan Buch 15 years ago
parent 9489353930
commit 70b9977d4c

@ -2,6 +2,7 @@
# the Adobe Flex "Geting Started" tutorial at:
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
include rules.mk
# sets mxmlc and compc to their respective basenames
# 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
# they've never been built)
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,
# 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 $<))
# glob up all component files as well, since changes to them
# should also prompt rebuild
COMPONENTS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.as))
COMPONENTS += $(patsubst %.mxml,%.swf,$(wildcard custom-*/*.as))
# build all expected swf and swc files
all: $(SWFS)
all: $(SWFS) $(COMPONENTS)
# remove all swf files in the tree

@ -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…
Cancel
Save