Last active
October 4, 2015 13:22
-
-
Save mmatyas/42361e0db94320023b6f to your computer and use it in GitHub Desktop.
SMW Android build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUPPORT_JPG := false | |
SUPPORT_PNG := true | |
SUPPORT_WEBP := false | |
SUPPORT_MOD_MODPLUG := false | |
SUPPORT_MOD_MIKMOD := false | |
SUPPORT_MP3_SMPEG := false | |
SUPPORT_OGG := true | |
SUPPORT_TIMIDITY := false | |
include $(call all-subdir-makefiles) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment this if you're using STL in your project | |
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information | |
APP_STL := gnustl_static | |
APP_ABI := armeabi armeabi-v7a x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := enet | |
LOCAL_CFLAGS := -DHAS_SOCKLEN_T -O3 | |
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include | |
LOCAL_SRC_FILES := \ | |
callbacks.c \ | |
compress.c \ | |
host.c \ | |
list.c \ | |
packet.c \ | |
peer.c \ | |
protocol.c \ | |
unix.c | |
LOCAL_LDLIBS := | |
include $(BUILD_SHARED_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Set up Android SDK and NDK | |
- Copy android-project from SDL source | |
- #? Edit AndroidManifest.xml | |
- android update project | |
- cd jni | |
- hg clone http://hg.libsdl.org/SDL SDL2 | |
- hg clone http://hg.libsdl.org/SDL_image SDL2_image | |
- hg clone http://hg.libsdl.org/SDL_mixer SDL2_mixer | |
- Edit src/org/libsdl/app/SDLActivity.java to load Image and Mixer | |
- Edit src/org/libsdl/app/SDLActivity.java to load enet, lz4, yaml-cpp-noboost | |
- Copy the dependencies to jni | |
- Copy common* and smw from [supermariowar/src] to /jni/src | |
- Remove savepng, MenuTemplate and menu/xbox then add all c/cpp to Android.mk, or: | |
- Use attached makefiles | |
zsh: ls -1 **/*.cpp, and common/SFont.c | |
packages must not start with number | |
do not put comments in file list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := lz4 | |
LOCAL_CPPFLAGS += -O3 -ffast-math | |
LOCAL_SRC_FILES := \ | |
lib/lz4.c \ | |
lib/lz4frame.c \ | |
lib/lz4hc.c \ | |
lib/xxhash.c | |
LOCAL_LDLIBS := | |
include $(BUILD_SHARED_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := main | |
SDL_PATH := ../SDL2 | |
SDL_IMAGE_PATH := ../SDL2_image | |
SDL_MIXER_PATH := ../SDL2_mixer | |
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include \ | |
$(LOCAL_PATH)/$(SDL_IMAGE_PATH)/include \ | |
$(LOCAL_PATH)/$(SDL_MIXER_PATH)/include \ | |
$(LOCAL_PATH)/common \ | |
$(LOCAL_PATH)/common_netplay \ | |
$(LOCAL_PATH)/../enet/include \ | |
$(LOCAL_PATH)/../lz4/include \ | |
$(LOCAL_PATH)/../yaml-cpp-noboost/include | |
# Add your application source files here... | |
# $(notdir $(wildcard $(LOCAL_PATH)/*.cpp)) $(notdir $(wildcard $(LOCAL_PATH)/*.c)) | |
# common/savepng.cpp \ | |
# menu/MenuTemplate.cpp \ | |
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ | |
common/dirlist.cpp \ | |
common/FileIO.cpp \ | |
common/FileList.cpp \ | |
common/global.cpp \ | |
FPSLimiter.cpp \ | |
common/sfx.cpp \ | |
GSGameplay.cpp \ | |
GSMenu.cpp \ | |
GSSplashScreen.cpp \ | |
main.cpp \ | |
common/GameValues.cpp \ | |
common/eyecandy.cpp \ | |
common/Game.cpp \ | |
common/GameModeSettings.cpp \ | |
common/SFont.c \ | |
common/gfx.cpp \ | |
common/gfx/gfxFont.cpp \ | |
common/gfx/gfxPalette.cpp \ | |
common/gfx/gfxSDL.cpp \ | |
common/gfx/gfxSprite.cpp \ | |
common/input.cpp \ | |
common/linfunc.cpp \ | |
common/map.cpp \ | |
common/MapList.cpp \ | |
common/map/MapReader15xx.cpp \ | |
common/map/MapReader16xx.cpp \ | |
common/map/MapReader17xx.cpp \ | |
common/map/MapReader18xx.cpp \ | |
common/map/MapReader.cpp \ | |
common/movingplatform.cpp \ | |
common_netplay/platform_enet/NetPeerENet.cpp \ | |
common/ObjectBase.cpp \ | |
common/path.cpp \ | |
common/RandomNumberGenerator.cpp \ | |
common/ResourceManager.cpp \ | |
common/TilesetManager.cpp \ | |
common/uicontrol.cpp \ | |
common/uimenu.cpp \ | |
common/ui/MI_MapField.cpp \ | |
common/ui/MI_MapPreview.cpp \ | |
platform/network/enet/NetworkLayerENet.cpp \ | |
objects/blocks/BounceBlock.cpp \ | |
objects/blocks/BreakableBlock.cpp \ | |
objects/blocks/DonutBlock.cpp \ | |
objects/blocks/FlipBlock.cpp \ | |
objects/blocks/IO_Block.cpp \ | |
objects/blocks/NoteBlock.cpp \ | |
objects/blocks/OnOffSwitchBlock.cpp \ | |
objects/blocks/PowerupBlock.cpp \ | |
objects/blocks/SwitchBlock.cpp \ | |
objects/blocks/ThrowBlock.cpp \ | |
objects/blocks/ViewBlock.cpp \ | |
objects/blocks/WeaponBreakableBlock.cpp \ | |
objects/moving/MovingObject.cpp \ | |
objects/overmap/OverMapObject.cpp \ | |
player_components/PlayerShield.cpp \ | |
player_components/PlayerKuriboShoe.cpp \ | |
player_components/PlayerSuperStomp.cpp \ | |
player_components/PlayerAwardEffects.cpp \ | |
player_components/PlayerBurnupTimer.cpp \ | |
player_components/PlayerCape.cpp \ | |
player_components/PlayerCardCollection.cpp \ | |
player_components/PlayerCollisions.cpp \ | |
player_components/PlayerInvincibility.cpp \ | |
player_components/PlayerJail.cpp \ | |
player_components/PlayerOutOfArenaTimer.cpp \ | |
player_components/PlayerSecretCode.cpp \ | |
player_components/PlayerSpinStatus.cpp \ | |
player_components/PlayerSuicideTimer.cpp \ | |
player_components/PlayerTail.cpp \ | |
player_components/PlayerTanookiSuit.cpp \ | |
player_components/PlayerWarpStatus.cpp \ | |
player_components/PlayerWings.cpp \ | |
player.cpp \ | |
gamemodes.cpp \ | |
menu/BonusWheelMenu.cpp \ | |
menu/GameSettingsMenu.cpp \ | |
menu/MainMenu.cpp \ | |
menu/MapFilterEditMenu.cpp \ | |
menu/MatchSelectionMenu.cpp \ | |
menu/ModeOptionsMenu.cpp \ | |
menu/network/NetLobbyMenu.cpp \ | |
menu/network/NetNewLevelMenu.cpp \ | |
menu/network/NetNewRoomMenu.cpp \ | |
menu/network/NetRoomMenu.cpp \ | |
menu/network/NetServersMenu.cpp \ | |
menu/options/EyeCandyOptionsMenu.cpp \ | |
menu/options/GameplayOptionsMenu.cpp \ | |
menu/options/GraphicsOptionsMenu.cpp \ | |
menu/OptionsMenu.cpp \ | |
menu/options/PowerupDropRatesMenu.cpp \ | |
menu/options/PowerupSettingsMenu.cpp \ | |
menu/options/ProjectileLimitsMenu.cpp \ | |
menu/options/ProjectileOptionsMenu.cpp \ | |
menu/options/SoundOptionsMenu.cpp \ | |
menu/options/TeamOptionsMenu.cpp \ | |
menu/PlayerControlsMenu.cpp \ | |
menu/PlayerControlsSelectMenu.cpp \ | |
menu/TeamSelectMenu.cpp \ | |
menu/TournamentScoreboardMenu.cpp \ | |
menu/TourStopMenu.cpp \ | |
menu/WorldMenu.cpp \ | |
menu/xbox/ScreenResizeMenu.cpp \ | |
menu/xbox/ScreenSettingsMenu.cpp \ | |
net.cpp \ | |
network/FileCompressor.cpp \ | |
network/NetConfigManager.cpp \ | |
ObjectContainer.cpp \ | |
objectgame.cpp \ | |
objecthazard.cpp \ | |
ai.cpp \ | |
uicustomcontrol.cpp \ | |
world.cpp | |
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer | |
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog | |
LOCAL_CPPFLAGS += -DUSE_SDL2 -std=c++11 -fexceptions -O1 -fpermissive -ffast-math | |
LOCAL_CFLAGS += -DUSE_SDL2 -O1 -fpermissive -ffast-math | |
include $(BUILD_SHARED_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.seventytwodpiarmy.supermariowar; | |
import org.libsdl.app.SDLActivity; | |
public class MainActivity extends SDLActivity { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := main | |
SDL_PATH := ../SDL2 | |
SDL_IMAGE_PATH := ../SDL2_image | |
SDL_MIXER_PATH := ../SDL2_mixer | |
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include \ | |
$(LOCAL_PATH)/$(SDL_IMAGE_PATH)/include \ | |
$(LOCAL_PATH)/$(SDL_MIXER_PATH)/include \ | |
$(LOCAL_PATH)/../enet/include \ | |
$(LOCAL_PATH)/../lz4/lib \ | |
$(LOCAL_PATH)/../yaml-cpp-noboost/include \ | |
$(LOCAL_PATH)/common \ | |
$(LOCAL_PATH)/common_netplay \ | |
$(LOCAL_PATH)/smw | |
# Add your application source files here... | |
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ | |
common/dirlist.cpp \ | |
common/eyecandy.cpp \ | |
common/FileIO.cpp \ | |
common/FileList.cpp \ | |
common/Game.cpp \ | |
common/GameModeSettings.cpp \ | |
common/GameValues.cpp \ | |
common/gfx.cpp \ | |
common/gfx/gfxFont.cpp \ | |
common/gfx/gfxPalette.cpp \ | |
common/gfx/gfxSDL.cpp \ | |
common/gfx/gfxSprite.cpp \ | |
common/global.cpp \ | |
common/input.cpp \ | |
common/linfunc.cpp \ | |
common/map.cpp \ | |
common/MapList.cpp \ | |
common/map/MapReader15xx.cpp \ | |
common/map/MapReader16xx.cpp \ | |
common/map/MapReader17xx.cpp \ | |
common/map/MapReader18xx.cpp \ | |
common/map/MapReader.cpp \ | |
common/movingplatform.cpp \ | |
common_netplay/platform_enet/NetPeerENet.cpp \ | |
common/ObjectBase.cpp \ | |
common/path.cpp \ | |
common/RandomNumberGenerator.cpp \ | |
common/ResourceManager.cpp \ | |
common/SFont.c \ | |
common/sfx.cpp \ | |
common/TilesetManager.cpp \ | |
common/uicontrol.cpp \ | |
common/uimenu.cpp \ | |
common/ui/MI_MapField.cpp \ | |
common/ui/MI_MapPreview.cpp \ | |
smw/ai.cpp \ | |
smw/FPSLimiter.cpp \ | |
smw/gamemodes.cpp \ | |
smw/GSGameplay.cpp \ | |
smw/GSMenu.cpp \ | |
smw/GSSplashScreen.cpp \ | |
smw/main.cpp \ | |
smw/menu/BonusWheelMenu.cpp \ | |
smw/menu/GameSettingsMenu.cpp \ | |
smw/menu/MainMenu.cpp \ | |
smw/menu/MapFilterEditMenu.cpp \ | |
smw/menu/MatchSelectionMenu.cpp \ | |
smw/menu/ModeOptionsMenu.cpp \ | |
smw/menu/network/NetLobbyMenu.cpp \ | |
smw/menu/network/NetNewLevelMenu.cpp \ | |
smw/menu/network/NetNewRoomMenu.cpp \ | |
smw/menu/network/NetRoomMenu.cpp \ | |
smw/menu/network/NetServersMenu.cpp \ | |
smw/menu/options/EyeCandyOptionsMenu.cpp \ | |
smw/menu/options/GameplayOptionsMenu.cpp \ | |
smw/menu/options/GraphicsOptionsMenu.cpp \ | |
smw/menu/OptionsMenu.cpp \ | |
smw/menu/options/PowerupDropRatesMenu.cpp \ | |
smw/menu/options/PowerupSettingsMenu.cpp \ | |
smw/menu/options/ProjectileLimitsMenu.cpp \ | |
smw/menu/options/ProjectileOptionsMenu.cpp \ | |
smw/menu/options/SoundOptionsMenu.cpp \ | |
smw/menu/options/TeamOptionsMenu.cpp \ | |
smw/menu/PlayerControlsMenu.cpp \ | |
smw/menu/PlayerControlsSelectMenu.cpp \ | |
smw/menu/TeamSelectMenu.cpp \ | |
smw/menu/TournamentScoreboardMenu.cpp \ | |
smw/menu/TourStopMenu.cpp \ | |
smw/menu/WorldMenu.cpp \ | |
smw/net.cpp \ | |
smw/network/FileCompressor.cpp \ | |
smw/network/NetConfigManager.cpp \ | |
smw/ObjectContainer.cpp \ | |
smw/objectgame.cpp \ | |
smw/objecthazard.cpp \ | |
smw/objects/blocks/BounceBlock.cpp \ | |
smw/objects/blocks/BreakableBlock.cpp \ | |
smw/objects/blocks/DonutBlock.cpp \ | |
smw/objects/blocks/FlipBlock.cpp \ | |
smw/objects/blocks/IO_Block.cpp \ | |
smw/objects/blocks/NoteBlock.cpp \ | |
smw/objects/blocks/OnOffSwitchBlock.cpp \ | |
smw/objects/blocks/PowerupBlock.cpp \ | |
smw/objects/blocks/SwitchBlock.cpp \ | |
smw/objects/blocks/ThrowBlock.cpp \ | |
smw/objects/blocks/ViewBlock.cpp \ | |
smw/objects/blocks/WeaponBreakableBlock.cpp \ | |
smw/objects/moving/MovingObject.cpp \ | |
smw/objects/overmap/OverMapObject.cpp \ | |
smw/platform/network/enet/NetworkLayerENet.cpp \ | |
smw/player_components/PlayerAwardEffects.cpp \ | |
smw/player_components/PlayerBurnupTimer.cpp \ | |
smw/player_components/PlayerCape.cpp \ | |
smw/player_components/PlayerCardCollection.cpp \ | |
smw/player_components/PlayerCollisions.cpp \ | |
smw/player_components/PlayerInvincibility.cpp \ | |
smw/player_components/PlayerJail.cpp \ | |
smw/player_components/PlayerKuriboShoe.cpp \ | |
smw/player_components/PlayerOutOfArenaTimer.cpp \ | |
smw/player_components/PlayerSecretCode.cpp \ | |
smw/player_components/PlayerShield.cpp \ | |
smw/player_components/PlayerSpinStatus.cpp \ | |
smw/player_components/PlayerSuicideTimer.cpp \ | |
smw/player_components/PlayerSuperStomp.cpp \ | |
smw/player_components/PlayerTail.cpp \ | |
smw/player_components/PlayerTanookiSuit.cpp \ | |
smw/player_components/PlayerWarpStatus.cpp \ | |
smw/player_components/PlayerWings.cpp \ | |
smw/player.cpp \ | |
smw/uicustomcontrol.cpp \ | |
smw/world.cpp | |
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer enet lz4 yaml-cpp-noboost | |
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog | |
LOCAL_CPPFLAGS += -DUSE_SDL2 -std=c++11 -fexceptions -O3 -fpermissive -ffast-math | |
LOCAL_CFLAGS += -DUSE_SDL2 -O3 -ffast-math | |
include $(BUILD_SHARED_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := yaml-cpp-noboost | |
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include | |
LOCAL_CPPFLAGS += -std=c++11 -fexceptions -O3 -ffast-math | |
LOCAL_SRC_FILES := \ | |
src/binary.cpp \ | |
src/contrib/graphbuilderadapter.cpp \ | |
src/contrib/graphbuilder.cpp \ | |
src/convert.cpp \ | |
src/directives.cpp \ | |
src/emit.cpp \ | |
src/emitfromevents.cpp \ | |
src/emitter.cpp \ | |
src/emitterstate.cpp \ | |
src/emitterutils.cpp \ | |
src/exp.cpp \ | |
src/memory.cpp \ | |
src/nodebuilder.cpp \ | |
src/node.cpp \ | |
src/node_data.cpp \ | |
src/nodeevents.cpp \ | |
src/null.cpp \ | |
src/ostream_wrapper.cpp \ | |
src/parse.cpp \ | |
src/parser.cpp \ | |
src/regex_yaml.cpp \ | |
src/scanner.cpp \ | |
src/scanscalar.cpp \ | |
src/scantag.cpp \ | |
src/scantoken.cpp \ | |
src/simplekey.cpp \ | |
src/singledocparser.cpp \ | |
src/stream.cpp \ | |
src/tag.cpp | |
LOCAL_LDLIBS := | |
include $(BUILD_SHARED_LIBRARY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment