summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/ibasso/android_ndk.make
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/ibasso/android_ndk.make')
-rw-r--r--firmware/target/hosted/ibasso/android_ndk.make49
1 files changed, 49 insertions, 0 deletions
diff --git a/firmware/target/hosted/ibasso/android_ndk.make b/firmware/target/hosted/ibasso/android_ndk.make
new file mode 100644
index 0000000000..e2f5c93db8
--- /dev/null
+++ b/firmware/target/hosted/ibasso/android_ndk.make
@@ -0,0 +1,49 @@
1# __________ __ ___
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7#
8# Copyright (C) 2014 by Ilia Sergachev: Initial Rockbox port to iBasso DX50
9# Copyright (C) 2014 by Mario Basister: iBasso DX90 port
10# Copyright (C) 2014 by Simon Rothen: Initial Rockbox repository submission, additional features
11# Copyright (C) 2014 by Udo Schläpfer: Code clean up, additional features
12#
13# This program is free software; you can redistribute it and/or
14# modify it under the terms of the GNU General Public License
15# as published by the Free Software Foundation; either version 2
16# of the License, or (at your option) any later version.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20
21
22# This is a glibc compatibility hack to provide a get_nprocs() replacement.
23# The NDK ships cpu-features.c which has a compatible function android_getCpuCount()
24CPUFEAT = $(ANDROID_NDK_PATH)/sources/android/cpufeatures
25CPUFEAT_BUILD = $(BUILDDIR)/android-ndk/sources/android/cpufeatures
26INCLUDES += -I$(CPUFEAT)
27OTHER_SRC += $(CPUFEAT)/cpu-features.c
28CLEANOBJS += $(CPUFEAT_BUILD)/cpu-features.o
29$(CPUFEAT_BUILD)/cpu-features.o: $(CPUFEAT)/cpu-features.c
30 $(SILENT)mkdir -p $(dir $@)
31 $(call PRINTS,CC $(subst $(CPUFEAT)/,,$<))$(CC) -o $@ -c $(CPUFEAT)/cpu-features.c $(GCCOPTS) -Wno-unused
32
33.SECONDEXPANSION:
34.PHONY: clean dirs
35
36DIRS += $(CPUFEAT_BUILD)
37
38.PHONY:
39$(BUILDDIR)/$(BINARY): $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $(CPUFEAT_BUILD)/cpu-features.o
40 $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map
41 $(call PRINTS,OC $(@F))$(call objcopy,$@,$@)
42
43$(DIRS):
44 $(SILENT)mkdir -p $@
45
46dirs: $(DIRS)
47
48clean::
49 $(SILENT)rm -rf $(BUILDDIR)/android-ndk