-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
51 lines (40 loc) · 1.43 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
# Makefile to start Titanium Mobile project from the command line.
# More info at http://github.com/guilhermechapiewski/titanium-jasmine
PROJECT_NAME=SampleApp
PROJECT_ROOT=$(shell pwd)
run-iphone:
@DEVICE_TYPE=iphone make run
test-iphone:
@DEVICE_TYPE=iphone make test
run-ipad:
@DEVICE_TYPE=ipad make run
test-ipad:
@DEVICE_TYPE=ipad make test
run-android:
@DEVICE_TYPE=android make run
test-android:
@DEVICE_TYPE=android make test
run:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make run-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
test:
@if [ "${DEVICE_TYPE}" == "" ]; then\
echo "Please run \"make test-[iphone|ipad]\" instead.";\
exit 1;\
fi
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/
@echo "sampleapp.tests_enabled = true;" > ${PROJECT_ROOT}/${PROJECT_NAME}/Resources/test/enabled.js
@make launch-titanium
clean:
@rm -rf ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/*
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/
@echo "Deleted: ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/*"
launch-titanium:
@echo "Building with Titanium... (DEVICE_TYPE:${DEVICE_TYPE})"
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/
@PROJECT_NAME=${PROJECT_NAME} PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=${DEVICE_TYPE} bash ${PROJECT_ROOT}/bin/titanium.sh