Improve Maemo accelerometer handling
[neverball] / Makefile
index 169b9f8..3b88369 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,16 @@ $(info Will make a "$(BUILD)" build of Neverball $(VERSION).)
 
 #------------------------------------------------------------------------------
 # Provide a target system hint for the Makefile.
-# Recognized PLATFORM values: darwin, mingw.
+# Recognized PLATFORM values: darwin, mingw, maemo.
 
 ifeq ($(shell uname), Darwin)
     PLATFORM := darwin
 endif
 
+ifdef _SBOX_DIR
+    PLATFORM := maemo
+endif
+
 #------------------------------------------------------------------------------
 # Paths (packagers might want to set DATADIR and LOCALEDIR)
 
@@ -86,6 +90,10 @@ ifeq ($(PLATFORM),darwin)
     ALL_CPPFLAGS += -I/opt/local/include
 endif
 
+ifeq ($(PLATFORM),maemo)
+    ALL_CPPFLAGS += -D__MAEMO__
+endif
+
 ALL_CPPFLAGS += $(CPPFLAGS)
 
 #------------------------------------------------------------------------------
@@ -135,6 +143,10 @@ ifeq ($(PLATFORM),darwin)
     OGL_LIBS  := -framework OpenGL
 endif
 
+ifeq ($(PLATFORM),maemo)
+    OGL_LIBS := -lm -lSDL_gles -lEGL -lGLES_CM
+endif
+
 BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
 
 ifeq ($(PLATFORM),darwin)
@@ -189,7 +201,6 @@ BALL_OBJS := \
        share/solid_cmd.o   \
        share/solid_all.o   \
        share/part.o        \
-       share/back.o        \
        share/geom.o        \
        share/item.o        \
        share/ball.o        \
@@ -197,6 +208,7 @@ BALL_OBJS := \
        share/base_config.o \
        share/config.o      \
        share/video.o       \
+       share/glext.o       \
        share/binary.o      \
        share/state.o       \
        share/audio.o       \
@@ -261,10 +273,10 @@ PUTT_OBJS := \
        share/part.o        \
        share/geom.o        \
        share/ball.o        \
-       share/back.o        \
        share/base_config.o \
        share/config.o      \
        share/video.o       \
+       share/glext.o       \
        share/binary.o      \
        share/audio.o       \
        share/state.o       \
@@ -308,9 +320,13 @@ else
 ifeq ($(ENABLE_TILT),loop)
 BALL_OBJS += share/tilt_loop.o
 else
+ifeq ($(PLATFORM),maemo)
+BALL_OBJS += share/tilt_maemo.o
+else
 BALL_OBJS += share/tilt_null.o
 endif
 endif
+endif
 
 ifeq ($(PLATFORM),mingw)
 BALL_OBJS += neverball.ico.o