project_files/Android-build/Templates/Makefile.android
author Xeli
Mon, 06 Feb 2012 22:52:15 +0100
changeset 6641 eb0cdccf9ccf
parent 6621 cc94940fe438
child 6668 f2091a9a77fa
permissions -rw-r--r--
wops, must use tabs not spaces..
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     1
SDL_ANDROID_DIR=./SDL-android-project
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     2
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     3
PPCROSSARM=${FPC_DIR}/compiler/ppcrossarm
6621
cc94940fe438 Android makefile: compile with debug symbols and ant clean, otherwise it wont update the apk if you have only changed a lib
Xeli
parents: 6589
diff changeset
     4
PPCROSSARM_FLAGS= -Xd -O2 -g -Tlinux -XParm-linux-androideabi- -vwnh
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     5
PPCROSSARM_INCLUDES= \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     6
	-FD${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     7
	-Fu${FPC_DIR}/rtl/units/arm-linux \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     8
	-Fl${ANDROID_NDK}/platforms/android-${ANDROID_NDK_API_LVL}/arch-arm/usr/lib \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     9
	-Fl$(SDL_ANDROID_DIR)/libs/armeabi \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    10
	-Fl${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linux/arm-linux-androideabi/4.4.3/ \
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    11
#LINKERFLAGS= -k"--static"
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    12
FPC_DEFINES=-dandroid -darm
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    13
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    14
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    15
all:
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    16
	-${CMAKE_COMMAND} -E make_directory out
6230
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    17
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    18
	${ANDROID_NDK}/ndk-build -C $(SDL_ANDROID_DIR) -j 8
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    19
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    20
	$(PPCROSSARM) $(LINKERFLAGS) $(PPCROSSARM_FLAGS) $(PPCROSSARM_INCLUDES) $(FPC_DEFINES) -oout/libhwengine.so ../../hedgewars/hwLibrary.pas
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    21
	${CMAKE_COMMAND} -E copy out/libhwengine.so SDL-android-project/libs/armeabi/
6621
cc94940fe438 Android makefile: compile with debug symbols and ant clean, otherwise it wont update the apk if you have only changed a lib
Xeli
parents: 6589
diff changeset
    22
        
6641
eb0cdccf9ccf wops, must use tabs not spaces..
Xeli
parents: 6621
diff changeset
    23
	${ANT} clean -f $(SDL_ANDROID_DIR)/build.xml
6589
2fa0a274a1e3 some tweaks to the build process, cmake now generates some vital files, fpc only compiles those files which have been changed since the last time, SDL still does not work
Xeli
parents: 6230
diff changeset
    24
	${ANT} debug install -f $(SDL_ANDROID_DIR)/build.xml
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    25
clean:  
6230
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    26
	${CMAKE_COMMAND} -E remove_directory out
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    27
	${ANDROID_NDK}/ndk-build -C $(SDL_ANDROID_DIR) -j 8 clean
de1e43054017 automated the build process some more, users must add the android ndk, sdk and fpc dir to their $PATH and cmake will do the rest, I still need a solution for the sdl dir. Subrepo's perhaps?
Xeli
parents: 6033
diff changeset
    28
	${ANT} clean -f $(SDL_ANDROID_DIR)/build.xml