project_files/Android-build/Templates/Makefile.android
author Wuzzy <Wuzzy2@mail.ru>
Fri, 20 Jul 2018 02:22:12 +0200
changeset 13515 c5365f05d4de
parent 7116 547b5be3a8e5
permissions -rw-r--r--
Refactor storage of joystick SDL key names
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
     1
SDL_ANDROID_DIR=${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     2
6807
f4816282ba01 Improved cmake build script for Android:
simmax@googlemail.com
parents: 6686
diff changeset
     3
PPCROSSARM=${FPC_DIR}/ppcrossarm
7100
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
     4
PPCROSSARM_FLAGS= -Xd -O2 -g -Tlinux -XParm-linux-androideabi- -B -vwnh -n
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= \
6807
f4816282ba01 Improved cmake build script for Android:
simmax@googlemail.com
parents: 6686
diff changeset
     6
	-FD${ANDROID_NDK_TOOLCHAINDIR}/bin \
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
     7
	-Fu${FPC_DIR}/../rtl/units/arm-linux \
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
     8
        -Fu${CMAKE_CURRENT_SOURCE_DIR} \
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
     9
        -Fi../../hedgewars \
5381
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}/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
    11
	-Fl$(SDL_ANDROID_DIR)/libs/armeabi \
6807
f4816282ba01 Improved cmake build script for Android:
simmax@googlemail.com
parents: 6686
diff changeset
    12
	-Fl${ANDROID_NDK_TOOLCHAINDIR}/lib/gcc/arm-linux/arm-linux-androideabi/4.4.3/ \
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
    13
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    14
#LINKERFLAGS= -k"--static"
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    15
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
    16
7116
547b5be3a8e5 android: fix the default make target
Xeli
parents: 7100
diff changeset
    17
all: install/debug
6668
f2091a9a77fa split the installing and building in the android Makefile
Xeli
parents: 6641
diff changeset
    18
build:
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
    19
	-${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/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
    20
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
    21
	${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
    22
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
    23
	$(PPCROSSARM) $(LINKERFLAGS) $(PPCROSSARM_FLAGS) $(PPCROSSARM_INCLUDES) $(FPC_DEFINES) -o${CMAKE_CURRENT_SOURCE_DIR}/out/libhwengine.so ${CMAKE_CURRENT_SOURCE_DIR}/../../hedgewars/hwLibrary.pas
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
    24
	${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/out/libhwengine.so $(SDL_ANDROID_DIR)/libs/armeabi/
7100
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    25
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    26
debug: build
6641
eb0cdccf9ccf wops, must use tabs not spaces..
Xeli
parents: 6621
diff changeset
    27
	${ANT} clean -f $(SDL_ANDROID_DIR)/build.xml
6668
f2091a9a77fa split the installing and building in the android Makefile
Xeli
parents: 6641
diff changeset
    28
	${ANT} debug -f $(SDL_ANDROID_DIR)/build.xml
7100
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    29
unsigned: build 
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    30
	${ANT} clean -f $(SDL_ANDROID_DIR)/build.xml
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    31
	${ANT} release -f $(SDL_ANDROID_DIR)/build.xml
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    32
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    33
install/debug: debug
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    34
	${ANT} installd -f $(SDL_ANDROID_DIR)/build.xml
8a2b23efed11 android: added an unsigned target to the makefile, to help automate signing
Xeli
parents: 6812
diff changeset
    35
install/release: release
6668
f2091a9a77fa split the installing and building in the android Makefile
Xeli
parents: 6641
diff changeset
    36
	${ANT} installd -f $(SDL_ANDROID_DIR)/build.xml
f2091a9a77fa split the installing and building in the android Makefile
Xeli
parents: 6641
diff changeset
    37
       
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    38
clean:  
6812
929b467c7277 fixed some typo's. LUA_LIBRARY now points to the right name, regardless of the host machine. Running cmake after a bad attempt (ie forgot to add paths to PATH) now works rather than having to clean the cache
Xeli
parents: 6807
diff changeset
    39
	${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_SOURCE_DIR}/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
    40
	${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
    41
	${ANT} clean -f $(SDL_ANDROID_DIR)/build.xml