forked from appersonlabs/MakeTi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 2.24 KB
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Makefile to start Titanium Mobile project from the command line.
# This is the ONLY option you should / need to configure
ANDROID_SDK_PATH='~/Android'
# Please dont change settings below here
PROJECT_ROOT=$(shell pwd)
iphone=$(iphone)
android=$(android)
BUILD_TYPE=$(build_type)
DEVICE_TYPE=$(platform)
MAKETI_DIR=$(dir $(lastword $(MAKEFILE_LIST)))
help:
@echo ""
@echo "**************************************************************"
@echo "* Welcome to MakeTi, the make system for Titanium! *"
@echo "**************************************************************"
@echo "The commands avaliable to you are as follows:"
@echo ""
@echo " $ make run - (will run as iphone for default, use the platform flag to set the platform)"
@echo " $ make clean - (will clean your build directory)"
@echo ""
@echo "The options for the build command are:"
@echo ""
@echo " $ make run platform=ipad - (Other platforms are iphone, ipad, or android)"
@echo " $ make run iphone=4.3 - (Where 4.3 is, put whatever iOS SDK you want to use)"
@echo " $ make run android=10 - (Where 10 is, put the Android API level you wish to use)"
@echo ""
@echo "**************************************************************"
@echo ""
run:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "No platform selected... running as iphone.";\
fi
@echo "Building with Titanium... as ${BUILD_TYPE}"
@mkdir -p '${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/'
@mkdir -p '${PROJECT_ROOT}/${PROJECT_NAME}/build/android/'
PROJECT_ROOT='${PROJECT_ROOT}' DEVICE_TYPE=${DEVICE_TYPE} bash '${MAKETI_DIR}/bin/titanium.sh'
deploy:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "No platform selected... building for iphone.";\
fi
@echo "Building with Titanium... as ${BUILD_TYPE}"
@mkdir -p '${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/'
@mkdir -p '${PROJECT_ROOT}/${PROJECT_NAME}/build/android/'
PROJECT_ROOT='${PROJECT_ROOT}' DEVICE_TYPE=${DEVICE_TYPE} BUILD_TYPE='device' bash '${MAKETI_DIR}/bin/titanium.sh'
clean:
@rm -rf '${PROJECT_ROOT}/build/iphone/'
@mkdir -p '${PROJECT_ROOT}/build/iphone/'
@echo "Deleted: ${PROJECT_ROOT}/build/iphone/*"
@rm -rf '${PROJECT_ROOT}/build/android/'
@mkdir -p '${PROJECT_ROOT}/build/android/'
@echo "Deleted: ${PROJECT_ROOT}/build/android/*"