forked from dropbox/djinni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 1.72 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
all: example_ios example_android
clean:
-rm GypAndroid.mk
-rm -rf libs/
-rm -rf obj/
-rm -rf build/
-rm -rf build_ios/
-ndk-build -C example/android/app/ clean
-xcodebuild -workspace example/objc/TextSort.xcworkspace -scheme TextSort -configuration 'Debug' -sdk iphonesimulator clean
# rule to lazily clone gyp
# freeze gyp at the last version with android support
./deps/gyp:
git clone https://chromium.googlesource.com/external/gyp.git ./deps/gyp
cd deps/gyp && git checkout -q 0bb67471bca068996e15b56738fa4824dfa19de0
# we specify a root target for android to prevent all of the targets from spidering out
GypAndroid.mk: ./deps/gyp example/libtextsort.gyp support-lib/support_lib.gyp example/example.djinni
./example/run_djinni.sh
ANDROID_BUILD_TOP=dirname $(which ndk-build) deps/gyp/gyp --depth=. -f android -DOS=android -Icommon.gypi example/libtextsort.gyp --root-target=libtextsort_jni
# we specify a root target for android to prevent all of the targets from spidering out
./build_ios/example/libtextsort.xcodeproj: ./deps/gyp example/libtextsort.gyp support-lib/support_lib.gyp example/example.djinni
./example/run_djinni.sh
deps/gyp/gyp --depth=. -f xcode -DOS=ios --generator-output ./build_ios -Icommon.gypi example/libtextsort.gyp
example_ios: ./build_ios/example/libtextsort.xcodeproj
xcodebuild -workspace example/objc/TextSort.xcworkspace \
-scheme TextSort \
-configuration 'Debug' \
-sdk iphonesimulator
# this target implicitly depends on GypAndroid.mk since gradle will try to make it
example_android: GypAndroid.mk
cd example/android/ && ./gradlew app:assembleDebug
@echo "Apks produced at:"
@python example/glob.py example/ '*.apk'
.PHONY: example_android example_ios clean all