forked from corecodec/coremake
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathandroid.inc
747 lines (697 loc) · 25.2 KB
/
android.inc
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
#define TARGET_ANDROID
#define COMPILER_GCC
#define NO_MAKE_EXE
#define NO_MAKE_EXE_JAVA
#define OUTPUT_EXE %(NAME)
#define OUTPUT_ANDROID %(NAME).apk
#define OUTPUT_ANDROID_LIB %(NAME).jar
#define OUTPUT_CON %(NAME)
#define OUTPUT_DLL lib%(NAME).so
#define OUTPUT_DLL_LIB lib%(NAME).so
#define OUTPUT_LIB lib%(NAME).a
CONFIG
ANDROID_LIBC_DIR = %(§CONFIG_ANDROID_NDK)/platforms/android-%(CONFIG_ANDROID_VERSION)/%(ANDROID_ARCH)/usr
ANDROID_GCC_DIR = %(§CONFIG_ANDROID_NDK)/toolchains/%(ANDROID_TOOL_DIR)/prebuilt/%(CONFIG_ANDROID_PLATFORM)/bin
IFNDEF CONFIG_ANDROID_NDK
ECHO Android NDK path not defined ! (CONFIG_ANDROID_NDK)
ENDIF
IFNDEF CONFIG_ANDROID_VERSION
ECHO Android target version not defined ! (CONFIG_ANDROID_VERSION)
CONFIG_ANDROID_VERSION = 15
ENDIF
IFNDEF CONFIG_ANDROID_SDK
ECHO Android target SDK not defined, using CONFIG_ANDROID_SDK = %(CONFIG_ANDROID_VERSION)
CONFIG_ANDROID_SDK = %(CONFIG_ANDROID_VERSION)
ENDIF
IFNDEF CONFIG_ANDROID_PLATFORM
ECHO Android NDK build platform not defined ! (CONFIG_ANDROID_PLATFORM)
ENDIF
FILE %(¯PATH)settings.gradle
FOR EACH EXE_ANDROID,DLL_ANDROID
PRINTNL include '%(PROJECT_NAME)'
PRINTNL project(':%(PROJECT_NAME)').projectDir = new File('%(¯BUILDPATH)%(NAME)')
ENDFOR
FILE %(¯PATH)build.gradle
PRINTNL task wrapper(type: Wrapper) {
PRINTNL gradleVersion = '2.2.1'
PRINTNL }
PRINTNL
PRINTNL buildscript {
PRINTNL repositories {
PRINTNL mavenCentral()
PRINTNL }
PRINTNL dependencies {
PRINTNL classpath 'com.android.tools.build:gradle:1.0.0'
PRINTNL }
PRINTNL }
FILE %(¯PATH)gradle/wrapper/gradle-wrapper.properties
PRINTNL distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
FOR EACH WORKSPACE
FOR EACH USE
IF %(TYPE)==EXE_ANDROID
IF %(PROJECT_VENDOR)==""
PROJECT_VENDOR = CoreCodec
ENDIF
IF %(PROJECT_NAME)==""
PROJECT_NAME = %(NAME)
ENDIF
MODULES =
// LIBs first
FOR EACH USE
IF %(TYPE)==LIB
../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
FOR EACH USE
IF %(TYPE)==LIB
../../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
ENDFOR
ENDFOR
// DLLs next
FOR EACH USE
IF %(TYPE)==DLL
../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
FOR EACH USE
IF %(TYPE)==LIB
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
IF %(TYPE)==DLL
../../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
ENDFOR
ENDFOR
IF %(MODULES)!=""
FILE %(¯BUILDPATH)%(NAME)/jni/Application.mk
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL APP_PROJECT_PATH := $(call my-dir)/%(!§OUTPUTPATH)
PRINTNL APP_OPTIM := %(TARGOPTIM)
PRINTNL APP_PLATFORM := android-%(CONFIG_ANDROID_VERSION)
IF %(ANDROID_ABI)!=""
PRINTNL APP_ABI := %(ANDROID_ABI)
ENDIF
PRINTNL APP_MODULES := %(MODULES)
PRINTNL APP_BUILD_SCRIPT := $(call my-dir)/Android.mk
FILE %(¯BUILDPATH)%(NAME)/jni/Android.mk
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL LOCAL_PATH := $(call my-dir)
PRINTNL TARGET_ARCH := %(TARGARCH)
PRINTNL TARGET_ARCH_ABI := %(ANDROID_ABI)
PRINTNL TARGET_arm_release_CFLAGS += -fvisibility=hidden -D_HIDDEN
PRINTNL TARGET_arm_release_CPPFLAGS += -fvisibility=hidden -D_HIDDEN
FOR EACH USE
// LIBs first
IF %(TYPE)==LIB
#include "android_mk.inc"
ENDIF
FOR EACH USE
IF %(TYPE)==LIB
#include "android_mk.inc"
ENDIF
ENDFOR
// DLLs next
IF %(TYPE)==DLL
#include "android_mk.inc"
ENDIF
FOR EACH USE
IF %(TYPE)==DLL
#include "android_mk.inc"
ENDIF
ENDFOR
ENDFOR
ENDIF
// FILEBIN %(¯BUILDPATH)%(NAME)/build_ndk.sh
// SCRIPT
// PRINTNL #!/bin/sh
// PRINTNL
// PRINTNL # you can use V=1 for more traces and -B to force a rebuild
// PRINTNL
// PRINTNL (cd %(CONFIG_ANDROID_NDK); make APP=%(:``|§BUILDDIR) $1 $2 $3 $4 $5 $6)
MKDIR %(¯BUILDPATH)%(NAME)/gen/
MKDIR %(¯BUILDPATH)%(NAME)/res/
FOR EACH INSTALL
COPY %(|NAME) %(¯BUILDPATH)%(../NAME)/res/raw/%(<NAME).%(>NAME)
ENDFOR
FOR EACH USE
FOR EACH INSTALL
COPY %(|NAME) %(¯BUILDPATH)%(../../NAME)/res/raw/%(<NAME).%(>NAME)
ENDFOR
ENDFOR
IF %(ANDROID_VALUE)!=""
FOR EACH ANDROID_VALUE
COPY %(|NAME) %(¯BUILDPATH)%(../NAME)/res/values/%(<NAME).%(>NAME)
ENDFOR
ENDIF
IF %(ICON)!=""
COPY %(|ICON)_64x64.png %(¯BUILDPATH)%(NAME)/res/drawable/%(<ICON)_64x64.png
ENDIF
FILE %(¯BUILDPATH)%(NAME)/.classpath
PRINTNL <?xml version="1.0" encoding="UTF-8"?>
PRINTNL <classpath>
PRINTNL <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
PRINTNL <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
PRINTNL <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
PRINTNL <classpathentry kind="src" path="gen"/>
FOR EACH SOURCEDIR
PRINTNL <classpathentry kind="src" path="%(NAME)"/>
ENDFOR
PRINTNL <classpathentry kind="output" path="bin/classes"/>
PRINTNL </classpath>
MKDIR %(OUTPUTPATH)
FILE %(¯BUILDPATH)%(NAME)/.project
PRINTNL <?xml version="1.0" encoding="UTF-8"?>
PRINTNL <projectDescription>
PRINTNL <name>%(PROJECT_NAME)</name>
PRINTNL <comment></comment>
PRINTNL <projects>
PRINTNL </projects>
PRINTNL <buildSpec>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>org.eclipse.jdt.core.javabuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.ApkBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL </buildSpec>
PRINTNL <natures>
PRINTNL <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
PRINTNL <nature>org.eclipse.jdt.core.javanature</nature>
PRINTNL </natures>
PRINTNL <linkedResources>
FOR EACH SOURCEDIR
PRINTNL <link>
PRINTNL <name>%(NAME)</name>
PRINTNL <type>2</type>
PRINTNL <location>%(|PATH)%(<NAME)</location>
PRINTNL </link>
ENDFOR
PRINTNL </linkedResources>
PRINTNL </projectDescription>
FILE %(¯BUILDPATH)%(NAME)/project.properties
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL
PRINTNL # Project target.
PRINTNL target=android-%(CONFIG_ANDROID_SDK)
LIB_INC_NUM = 0
FOR EACH USE
IF (%(TYPE)==DLL_ANDROID)
INC ../LIB_INC_NUM
PRINTNL android.library.reference.%(../LIB_INC_NUM)=../%(NAME)
ENDIF
ENDFOR
FILE %(¯BUILDPATH)%(NAME)/.settings/org.eclipse.jdt.core.prefs
PRINTNL eclipse.preferences.version=1
PRINTNL org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
PRINTNL org.eclipse.jdt.core.compiler.compliance=1.6
PRINTNL org.eclipse.jdt.core.compiler.source=1.6
FILE %(¯BUILDPATH)%(NAME)/AndroidManifest.xml
PRINTNL <?xml version="1.0" encoding="utf-8"?>
PRINTNL <manifest xmlns:android="http://schemas.android.com/apk/res/android"
IF %(PROJECT_PACKAGE)!=""
PRINTNL package="%(PROJECT_PACKAGE)"
ELSE
PRINTNL package="com.%(PROJECT_VENDOR).%(`PROJECT_NAME)"
ENDIF
IF %(ANDROID_UID)!=""
PRINTNL android:sharedUserId="%(ANDROID_UID)"
IF %(ANDROID_UID_NAME)!=""
PRINTNL android:sharedUserLabel="%(ANDROID_UID_NAME)"
ENDIF
ENDIF
IF %(PROJECT_BUILD)!=""
PRINTNL android:versionCode="%(PROJECT_BUILD)"
IF %(PROJECT_VERSION)!=""
PRINTNL android:versionName="%(PROJECT_VERSION).%(PROJECT_BUILD)"
ENDIF
ELIF %(PROJECT_VERSION)!=""
PRINTNL android:versionName="%(PROJECT_VERSION)"
ENDIF
PRINTNL >
PRINTNL <uses-sdk
PRINTNL android:minSdkVersion="%(CONFIG_ANDROID_VERSION)"
PRINTNL android:targetSdkVersion="%(CONFIG_ANDROID_SDK)" />
FOR EACH ANDROID_PERMISSION
PRINTNL <uses-permission android:name="%(NAME)"/>
ENDFOR
PRINTNL <application
IF %(ICON)!=""
PRINTNL android:icon="@drawable/%(<ICON)_64x64"
ENDIF
IF %(ANDROID_THEME)!=""
PRINTNL android:theme="@style/%(ANDROID_THEME)"
ENDIF
PRINTNL android:label="%(PROJECT_NAME)" >
FOR EACH SOURCEDIR
FOR EACH LAUNCHER
PRINTNL <activity android:name="%(```/§NAME).%(<NAME)"
PRINTNL android:configChanges="mcc|mnc|keyboardHidden|orientation|fontScale|screenSize|screenLayout"
if %(ANDROID_MODE)!=""
PRINTNL android:launchMode="%(ANDROID_MODE)"
ENDIF
PRINTNL android:windowSoftInputMode="stateHidden"
IF %(../../MIME_TYPES)!=""
PRINTNL android:exported="true"
ENDIF
PRINTNL >
PRINTNL <intent-filter>
PRINTNL <action android:name="android.intent.action.MAIN"/>
PRINTNL <category android:name="android.intent.category.LAUNCHER"/>
PRINTNL </intent-filter>
IF %(../../MIME_TYPES)!=""
FOR EACH ../../MIME_TYPES
PRINTNL <intent-filter>
PRINTNL <data android:mimeType="%(NAME)"/>
PRINTNL <action android:name="android.intent.action.VIEW"/>
PRINTNL <category android:name="android.intent.category.DEFAULT"/>
PRINTNL </intent-filter>
ENDFOR
ENDIF
PRINTNL </activity>
ENDFOR
FOR EACH ACTIVITY
DIRPUSH %(!PATH)
PRINTNL <activity android:name="%(```/§NAME).%(<NAME)"
PRINTNL android:configChanges="mcc|mnc|keyboardHidden|orientation|fontScale|screenSize|screenLayout" />
DIRPOP
ENDFOR
FOR EACH SERVICE
DIRPUSH %(!PATH)
PRINTNL <service android:name="%(```/§NAME).%(<NAME)" />
DIRPOP
ENDFOR
ENDFOR
PRINTNL </application>
PRINTNL
PRINTNL </manifest>
FILE %(¯BUILDPATH)%(NAME)/build.gradle
IF %(MODULES)!=""
PRINTNL import org.apache.tools.ant.taskdefs.condition.Os
ENDIF
PRINTNL apply plugin: 'com.android.application'
PRINTNL android {
PRINTNL compileSdkVersion %(CONFIG_ANDROID_SDK)
PRINTNL buildToolsVersion '20.0.0'
PRINTNL defaultConfig {
PRINTNL minSdkVersion %(CONFIG_ANDROID_VERSION)
PRINTNL targetSdkVersion %(CONFIG_ANDROID_SDK)
PRINTNL }
PRINTNL
PRINTNL sourceSets {
PRINTNL main {
PRINTNL manifest.srcFile 'AndroidManifest.xml'
PRINTNL java.srcDirs = [
FOR EACH SOURCEDIR
PRINTNL '%(!NAME)',
ENDFOR
PRINTNL ]
PRINTNL jniLibs.srcDirs = ['libs']
PRINTNL res.srcDirs = ['res']
PRINTNL assets.srcDirs = ['assets']
PRINTNL }
PRINTNL }
IF %(MODULES)!=""
PRINTNL // call regular ndk-build(.cmd) script from app directory
PRINTNL task ndkBuild(type: Exec) {
PRINTNL if (Os.isFamily(Os.FAMILY_WINDOWS)) {
PRINTNL commandLine '%(~`+CONFIG_ANDROID_NDK)ndk-build.cmd'
PRINTNL } else {
PRINTNL commandLine '%(+CONFIG_ANDROID_NDK)ndk-build'
PRINTNL }
PRINTNL }
PRINTNL
PRINTNL tasks.withType(JavaCompile) {
PRINTNL compileTask -> compileTask.dependsOn ndkBuild
PRINTNL }
ENDIF
PRINTNL }
PRINTNL
PRINTNL dependencies {
FOR EACH USE
IF %(TYPE)==DLL_ANDROID
PRINTNL compile project(':%(PROJECT_NAME)')
ENDIF
FOR EACH USE
IF %(TYPE)==DLL_ANDROID
PRINTNL compile project(':%(PROJECT_NAME)')
ENDIF
ENDFOR
ENDFOR
PRINTNL }
ELIF %(TYPE)==DLL_ANDROID)
IF %(PROJECT_VENDOR)==""
PROJECT_VENDOR = CoreCodec
ENDIF
IF %(PROJECT_NAME)==""
PROJECT_NAME = %(NAME)
ENDIF
MODULES =
// LIBs first
FOR EACH USE
IF %(TYPE)==LIB
../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
FOR EACH USE
IF %(TYPE)==LIB
../../MODULES += %(NAME)
ENDIF
ENDFOR
ENDFOR
// DLLs next
FOR EACH USE
IF %(TYPE)==DLL
../MODULES += %(NAME)
FOR EACH SOURCE
FOR EACH MIME_TYPE
../../../MIME_TYPES += %(NAME)
ENDFOR
ENDFOR
ENDIF
FOR EACH USE
IF %(TYPE)==DLL
../../MODULES += %(NAME)
ENDIF
ENDFOR
ENDFOR
IF %(MODULES)!=""
FILE %(¯BUILDPATH)%(NAME)/jni/Application.mk
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL APP_PROJECT_PATH := $(call my-dir)/%(!§OUTPUTPATH)
PRINTNL APP_OPTIM := %(TARGOPTIM)
PRINTNL APP_PLATFORM := android-%(CONFIG_ANDROID_VERSION)
IF %(ANDROID_ABI)!=""
PRINTNL APP_ABI := %(ANDROID_ABI)
ENDIF
PRINTNL APP_MODULES := %(MODULES)
PRINTNL APP_BUILD_SCRIPT := $(call my-dir)/Android.mk
FILE %(¯BUILDPATH)%(NAME)/jni/Android.mk
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL LOCAL_PATH := $(call my-dir)
FOR EACH USE
// LIBs first
IF %(TYPE)==LIB
#include "android_mk.inc"
ENDIF
FOR EACH USE
IF %(TYPE)==LIB
#include "android_mk.inc"
ENDIF
ENDFOR
// DLLs next
IF %(TYPE)==DLL
#include "android_mk.inc"
ENDIF
FOR EACH USE
IF %(TYPE)==DLL
#include "android_mk.inc"
ENDIF
ENDFOR
ENDFOR
ENDIF
MKDIR %(¯BUILDPATH)%(NAME)/gen/
MKDIR %(¯BUILDPATH)%(NAME)/res/
FOR EACH INSTALL
COPY %(|NAME) %(¯BUILDPATH)%(../NAME)/res/raw/%(<NAME).%(>NAME)
ENDFOR
FOR EACH USE
FOR EACH INSTALL
COPY %(|NAME) %(¯BUILDPATH)%(../../NAME)/res/raw/%(<NAME).%(>NAME)
ENDFOR
ENDFOR
IF %(ANDROID_VALUE)!=""
FOR EACH ANDROID_VALUE
COPY %(|NAME) %(¯BUILDPATH)%(../NAME)/res/values/%(<NAME).%(>NAME)
ENDFOR
ENDIF
IF %(ICON)!=""
COPY %(|ICON)_64x64.png %(¯BUILDPATH)%(NAME)/res/drawable/%(<ICON)_64x64.png
ENDIF
FILE %(¯BUILDPATH)%(NAME)/.classpath
PRINTNL <?xml version="1.0" encoding="UTF-8"?>
PRINTNL <classpath>
PRINTNL <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
PRINTNL <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
PRINTNL <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
PRINTNL <classpathentry kind="src" path="gen"/>
FOR EACH SOURCEDIR
PRINTNL <classpathentry kind="src" path="%(NAME)"/>
ENDFOR
PRINTNL <classpathentry kind="output" path="bin/classes"/>
PRINTNL </classpath>
MKDIR %(OUTPUTPATH)
FILE %(¯BUILDPATH)%(NAME)/.project
PRINTNL <?xml version="1.0" encoding="UTF-8"?>
PRINTNL <projectDescription>
PRINTNL <name>%(PROJECT_NAME)</name>
PRINTNL <comment></comment>
PRINTNL <projects>
PRINTNL </projects>
PRINTNL <buildSpec>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>org.eclipse.jdt.core.javabuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL <buildCommand>
PRINTNL <name>com.android.ide.eclipse.adt.ApkBuilder</name>
PRINTNL <arguments>
PRINTNL </arguments>
PRINTNL </buildCommand>
PRINTNL </buildSpec>
PRINTNL <natures>
PRINTNL <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
PRINTNL <nature>org.eclipse.jdt.core.javanature</nature>
PRINTNL </natures>
PRINTNL <linkedResources>
FOR EACH SOURCEDIR
PRINTNL <link>
PRINTNL <name>%(NAME)</name>
PRINTNL <type>2</type>
PRINTNL <location>%(|PATH)%(<NAME)</location>
PRINTNL </link>
ENDFOR
PRINTNL </linkedResources>
PRINTNL </projectDescription>
FILE %(¯BUILDPATH)%(NAME)/project.properties
PRINTNL # DO NOT EDIT, FILE GENERATED BY COREMAKE
PRINTNL
PRINTNL # Project target.
PRINTNL target=android-%(CONFIG_ANDROID_SDK)
PRINTNL android.library=true
LIB_INC_NUM = 0
FOR EACH USE
IF (%(TYPE)==DLL_ANDROID)
INC ../LIB_INC_NUM
PRINTNL android.library.reference.%(../LIB_INC_NUM)=../%(NAME)
ENDIF
ENDFOR
FILE %(¯BUILDPATH)%(NAME)/.settings/org.eclipse.jdt.core.prefs
PRINTNL eclipse.preferences.version=1
PRINTNL org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
PRINTNL org.eclipse.jdt.core.compiler.compliance=1.6
PRINTNL org.eclipse.jdt.core.compiler.source=1.6
FILE %(¯BUILDPATH)%(NAME)/AndroidManifest.xml
PRINTNL <?xml version="1.0" encoding="utf-8"?>
PRINTNL <manifest xmlns:android="http://schemas.android.com/apk/res/android"
IF %(PROJECT_PACKAGE)!=""
PRINTNL package="%(PROJECT_PACKAGE)"
ELSE
PRINTNL package="com.%(PROJECT_VENDOR).%(`PROJECT_NAME)"
ENDIF
IF %(ANDROID_UID)!=""
PRINTNL android:sharedUserId="%(ANDROID_UID)"
IF %(ANDROID_UID_NAME)!=""
PRINTNL android:sharedUserLabel="%(ANDROID_UID_NAME)"
ENDIF
ENDIF
IF %(PROJECT_BUILD)!=""
PRINTNL android:versionCode="%(PROJECT_BUILD)"
IF %(PROJECT_VERSION)!=""
PRINTNL android:versionName="%(PROJECT_VERSION).%(PROJECT_BUILD)"
ENDIF
ELIF %(PROJECT_VERSION)!=""
PRINTNL android:versionName="%(PROJECT_VERSION)"
ENDIF
PRINTNL >
PRINTNL <uses-sdk
PRINTNL android:minSdkVersion="%(CONFIG_ANDROID_VERSION)"
PRINTNL android:targetSdkVersion="%(CONFIG_ANDROID_SDK)" />
FOR EACH ANDROID_PERMISSION
PRINTNL <uses-permission android:name="%(NAME)"/>
ENDFOR
PRINTNL <application
IF %(ICON)!=""
PRINTNL android:icon="@drawable/%(<ICON)_64x64"
ENDIF
IF %(ANDROID_THEME)!=""
PRINTNL android:theme="@style/%(ANDROID_THEME)"
ENDIF
PRINTNL >
FOR EACH SOURCEDIR
FOR EACH LAUNCHER
PRINTNL <activity android:name="%(```/§NAME).%(<NAME)"
PRINTNL android:configChanges="mcc|mnc|keyboardHidden|orientation|fontScale|screenSize|screenLayout"
if %(ANDROID_MODE)!=""
PRINTNL android:launchMode="%(ANDROID_MODE)"
ENDIF
PRINTNL android:windowSoftInputMode="stateHidden"
IF %(../../MIME_TYPES)!=""
PRINTNL android:exported="true"
ENDIF
PRINTNL >
PRINTNL <intent-filter>
PRINTNL <action android:name="android.intent.action.MAIN"/>
PRINTNL <category android:name="android.intent.category.LAUNCHER"/>
PRINTNL </intent-filter>
IF %(../../MIME_TYPES)!=""
FOR EACH ../../MIME_TYPES
PRINTNL <intent-filter>
PRINTNL <data android:mimeType="%(NAME)"/>
PRINTNL <action android:name="android.intent.action.VIEW"/>
PRINTNL <category android:name="android.intent.category.DEFAULT"/>
PRINTNL </intent-filter>
ENDFOR
ENDIF
PRINTNL </activity>
ENDFOR
FOR EACH ACTIVITY
DIRPUSH %(!PATH)
PRINTNL <activity android:name="%(```/§NAME).%(<NAME)"
PRINTNL android:configChanges="mcc|mnc|keyboardHidden|orientation|fontScale|screenSize|screenLayout" />
DIRPOP
ENDFOR
FOR EACH SERVICE
DIRPUSH %(!PATH)
PRINTNL <service android:name="%(```/§NAME).%(<NAME)" />
DIRPOP
ENDFOR
ENDFOR
PRINTNL </application>
PRINTNL
PRINTNL </manifest>
FILE %(¯BUILDPATH)%(NAME)/build.gradle
IF %(MODULES)!=""
PRINTNL import org.apache.tools.ant.taskdefs.condition.Os
ENDIF
PRINTNL apply plugin: 'com.android.library'
PRINTNL android {
PRINTNL compileSdkVersion %(CONFIG_ANDROID_SDK)
PRINTNL buildToolsVersion '20.0.0'
PRINTNL defaultConfig {
PRINTNL minSdkVersion %(CONFIG_ANDROID_VERSION)
PRINTNL targetSdkVersion %(CONFIG_ANDROID_SDK)
PRINTNL }
PRINTNL
PRINTNL sourceSets {
PRINTNL main {
PRINTNL manifest.srcFile 'AndroidManifest.xml'
PRINTNL java.srcDirs = [
FOR EACH SOURCEDIR
PRINTNL '%(!NAME)',
ENDFOR
PRINTNL ]
PRINTNL jniLibs.srcDir 'src/main/libs'
PRINTNL res.srcDirs = ['res']
PRINTNL assets.srcDirs = ['assets']
PRINTNL }
PRINTNL }
IF %(MODULES)!=""
PRINTNL // call regular ndk-build(.cmd) script from app directory
PRINTNL task ndkBuild(type: Exec) {
PRINTNL if (Os.isFamily(Os.FAMILY_WINDOWS)) {
PRINTNL commandLine '%(~`+CONFIG_ANDROID_NDK)ndk-build.cmd'
PRINTNL } else {
PRINTNL commandLine '%(+CONFIG_ANDROID_NDK)ndk-build'
PRINTNL }
PRINTNL }
PRINTNL
PRINTNL tasks.withType(JavaCompile) {
PRINTNL compileTask -> compileTask.dependsOn ndkBuild
PRINTNL }
ENDIF
PRINTNL }
PRINTNL
PRINTNL dependencies {
FOR EACH USE
IF %(TYPE)==DLL_ANDROID
PRINTNL compile project(':%(PROJECT_NAME)')
ENDIF
FOR EACH USE
IF %(TYPE)==DLL_ANDROID
PRINTNL compile project(':%(PROJECT_NAME)')
ENDIF
ENDFOR
ENDFOR
PRINTNL }
ENDIF
ENDFOR
ENDFOR
CC = %(ANDROID_GCC_DIR)/%(ANDROID_GCC_PREFIX)-gcc
AR = %(ANDROID_GCC_DIR)/%(ANDROID_GCC_PREFIX)-ar
STRIP = %(ANDROID_GCC_DIR)/%(ANDROID_GCC_PREFIX)-strip
STRIPFLAGS = -s -x
OS_INCLUDE += %(ANDROID_LIBC_DIR)/include
CCFLAGS += -DANDROID
SHFLAGS += %(ANDROID_LIBC_DIR)/lib/libc.so %(ANDROID_LIBC_DIR)/lib/libstdc++.so
IF %(ANDROID_ABI)=="armeabi-v7a-hard"
SHFLAGS += %(ANDROID_LIBC_DIR)/lib/libm_hard.a -Wl,--no-warn-mismatch
ELSE
SHFLAGS += %(ANDROID_LIBC_DIR)/lib/libm.so
ENDIF
SHFLAGS += -Wl,--no-undefined -Wl,-rpath-link=%(ANDROID_LIBC_DIR)/lib -L%(ANDROID_LIBC_DIR)/lib
IF %(ANDROID_GCC_LIB)!=""
SHFLAGS1 += %(ANDROID_GCC_DIR)/../lib/%(ANDROID_GCC_LIB)
ENDIF
#include "gcc_conf.inc"