getting crap figured out wrt compiling components, including with mxmlc

This commit is contained in:
Dan Buch
2010-02-18 22:02:35 -05:00
parent cd79dbdbec
commit 64f116a83d
4 changed files with 31 additions and 6 deletions

View File

@@ -3,10 +3,11 @@
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
# sets mxmlc to just the basename "mxmlc"
# sets mxmlc and compc to their respective basenames
# if not overridden in command line like so:
# make MXMLC=/path/to/my/mxmlc
MXMLC ?= mxmlc
COMPC ?= compc
# define all target swf paths (which don't yet exist if
@@ -14,16 +15,29 @@ MXMLC ?= mxmlc
SWFS = $(patsubst %.mxml,%.swf,$(wildcard [0-9]*-*/*.mxml))
# define all target swc paths (same as with swf paths above)
SWCS = $(patsubst %.as,%.swc,$(wildcard comps/*.as))
# define an implicit build rule for any file matching %.swf,
# using the $< (input) and $@ (output) automatic variables
%.swf : %.mxml
$(MXMLC) $< -warnings -output $@
$(MXMLC) $< -warnings -l+=./comps -output $@
# build all expected swf files
all: $(SWFS)
# 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
_CLS=$$(echo $< | sed 's@.*/\(.*\)\..*$$@\1@') && \
$(COMPC) -sp ./comps -output $@ -include-classes $$_CLS
# build all expected swf and swc files
all: $(SWCS) $(SWFS)
# remove all swf files in the tree
clean:
find -name \*.swf -exec rm {} \;
find -name \*.swf -exec rm {} \; ; \
find -name \*.swc -exec rm {} \;