Add android projects (eclipse)

This commit is contained in:
bossiel 2010-02-01 02:02:25 +00:00
parent f9b9725b94
commit 4627646bb1
4 changed files with 1219 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:\cygwin\bin\bash.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="--login -c &quot;make -f /cygdrive/c/Projects/Doubango/android-projects/tinySAK/makefile agdbserver &amp;&gt; output &amp;&quot;"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="C:\Projects\Doubango\android-projects\tinySAK"/>
</launchConfiguration>

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tinySAK</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value>DEBUG=&quot;-O0 -g -DDEBUG&quot; -j1</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>C:\Cygwin\bin\make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/Android Builder.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>src</name>
<type>2</type>
<location>C:/Projects/Doubango/tinySAK/src</location>
</link>
<link>
<name>test</name>
<type>2</type>
<location>C:/Projects/Doubango/tinySAK/test</location>
</link>
</linkedResources>
</projectDescription>

View File

@ -0,0 +1,53 @@
export ROOT = /cygdrive/c
export INSTALL_DIR = /data/tmp
export OUTPUT_DIR = $(shell pwd)/output
export NDK_PLATFORM_VER = 1.5
export ANDROID_NDK_ROOT:=$(ROOT)/android-ndk
export ANDROID_NDK_HOST:=windows
export ANDROID_SDK_ROOT:=$(ROOT)/android-sdk
export PREBUILD:=$(ANDROID_NDK_ROOT)/build/prebuilt/$(ANDROID_NDK_HOST)/arm-eabi-4.2.1
export BIN := $(PREBUILD)/bin
#export CPP = $(BIN)/arm-eabi-g++
export CPP = $(BIN)/arm-eabi-gcc
export CC = $(BIN)/arm-eabi-gcc
export CFLAGS = $(DEBUG) -I$(ANDROID_NDK_ROOT)/build/platforms/android-$(NDK_PLATFORM_VER)/arch-arm/usr/include \
-march=armv5te \
-mtune=xscale \
-msoft-float \
-fpic \
-mthumb-interwork \
-ffunction-sections \
-funwind-tables \
-fstack-protector \
-fno-short-enums \
-D__ARM_ARCH_5__ \
-D__ARM_ARCH_5T__ \
-D__ARM_ARCH_5E__ \
-D__ARM_ARCH_5TE__ \
-DANDROID \
-MMD \
-MP
export LDFLAGS = -Wl,--no-gc-sections,--entry=main,-rpath=/system/lib,-rpath-link=$(ANDROID_NDK_ROOT)/build/platforms/android-$(NDK_PLATFORM_VER)/arch-arm/usr/lib,-dynamic-linker=/system/bin/linker -L$(ANDROID_NDK_ROOT)/build/platforms/android-$(NDK_PLATFORM_VER)/arch-arm/usr/lib
export LDFLAGS += -Wl,-T,$(PREBUILD)/arm-eabi/lib/ldscripts/armelf.xsc,-z,nocopyreloc,--gc-sections,--no-undefined
export LDFLAGS += -nostdlib -lc -Wl,--no-whole-archive -lc
export LD_LIBRARY_PATH=/system/:$(INSTALL_DIR)
#-T,$(PREBUILD)/arm-eabi/lib/ldscripts/armelf.xsc
#-T,/cygdrive/c/tmp/armelf_linux_eabi.xsc
all:
(cd ../../tinySAK/src ; $(MAKE) all; $(MAKE) install; cp libtinySAK.so $(OUTPUT_DIR))
(cd ../../tinySAK/test; $(MAKE) all; $(MAKE) install; cp test $(OUTPUT_DIR))
clean:
(cd ../../tinySAK/src; $(MAKE) clean)
(cd ../../tinySAK/test; $(MAKE) clean)
agdbserver:
#$(ANDROID_SDK_ROOT)/tools/adb shell export LD_LIBRARY_PATH=/system/:$(INSTALL_DIR)
$(ANDROID_SDK_ROOT)/tools/adb forward tcp:1234: tcp:1234
$(ANDROID_SDK_ROOT)/tools/adb shell $(INSTALL_DIR)/gdbserver :1234 $(INSTALL_DIR)/test