box-o-sand/PracticingFlex/Makefile

68 lines
1.4 KiB
Makefile
Raw Normal View History

# Makefile for building flex apps associated with
# the Adobe Flex "Geting Started" tutorial at:
# http://learn.adobe.com/wiki/display/Flex/Getting+Started
# 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
ifdef DEBUG
2010-02-23 04:23:35 +00:00
MXMLC_FLAGS ?= -warnings -strict -debug -keep-generated-actionscript
else
2010-02-23 04:23:35 +00:00
MXMLC_FLAGS ?= -warnings -strict
endif
ifdef OLD
MXMLC_FLAGS += -target-player 9.0.0
endif
MXMLC_FLAGS += -l+=$(HOME)/.local/share/flexunit
# define all dependency mxml paths and their swf path targets
# (which don't yet exist if they've never been built)
MXML = $(wildcard ./*-*/*.mxml)
TEST_CLASSES = $(wildcard ./*-*/*/tests/Test*.as) \
$(wildcard ./*-*/tests/Test*.as) \
$(wildcard ./*-*/*/*/tests/Test*.as)
SWFS = $(patsubst %.mxml,%.swf,$(MXML)) $(patsubst %.as,%.swf,$(TEST_CLASSES))
# glob up all component files as well, since changes to them
# should also prompt rebuild
COMPONENTS = $(wildcard [0-9]*-*/*.as) $(wildcard custom-*/*.as)
export COMPONENTS
include rules.mk
all: $(SWFS)
include targets.mk
components:
@echo $(COMPONENTS)
mxml:
@echo $(MXML)
2010-02-18 18:41:29 +00:00
swfs:
@echo $(SWFS)
2010-02-18 19:18:41 +00:00
test_classes:
@echo $(TEST_CLASSES)
# remove all swf files in the tree
2010-02-18 19:18:41 +00:00
clean:
find -name \*.swf -exec rm {} \; ; \
find -name \*.swc -exec rm {} \;