-
Notifications
You must be signed in to change notification settings - Fork 3
/
tools.mk
35 lines (26 loc) · 1.28 KB
/
tools.mk
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
WORK_DIR ?= .work
JAVAC = javac
JAR = jar
MXMLC_PATH := $(shell which mxmlc)
$(if $(MXMLC_PATH),,$(error Flex SDK not found in the PATH))
FLEX_SDK := $(abspath $(MXMLC_PATH)/../..)
$(if $(wildcard $(FLEX_SDK)/include/FlashRuntimeExtensions.h),,$(error Invalid Flex SDK at $(FLEX_SDK)))
XML = $(shell which xml)
$(if $(wildcard $(XML)),,$(error xml-starlet dependency missing))
ADT = $(FLEX_SDK)/bin/adt
MXMLC = $(FLEX_SDK)/bin/mxmlc
AS_SWF_VERSION = 13
ASCFLAGS = +configname=airmobile -swf-version=$(AS_SWF_VERSION) -debug=$(if $(DEBUG),true,false)
CLASSPATH += $(FLEX_SDK)/lib/android/FlashRuntimeExtensions.jar
CLASSPATH += $(ANDROID_SDK)/tools/support/annotations.jar
CLASSPATH += $(FLEX_SDK)/lib/android/lib/runtimeClasses.jar
CFLAGS += -I$(FLEX_SDK)/include
CXXFLAGS += -I$(FLEX_SDK)/include
OBJCFLAGS += -I$(FLEX_SDK)/include
OBJCXXFLAGS += -I$(FLEX_SDK)/include
GIT_DIR = $(ROOT)/$(shell grep -o '[^ ]*$$' $(ROOT)/.git 2>/dev/null || echo .git)
GIT_HEAD = $(GIT_DIR)/HEAD $(wildcard $(GIT_DIR)/.git/refs/*)
REVISION := $(strip $(shell git log --format=oneline |wc -l))
DIRTY := $(if $(shell git status --porcelain),*)
COMMIT := $(if $(DEBUG),D_)$(shell git log -n1 --format=format:%h)$(DIRTY)
NOTES = "Build $(VERSION).$(REVISION) ($(COMMIT)) by `id -un`@`hostname` `date +'%Y/%m/%d %H:%M:%S'`"