WIP: Vibra support
[neverball] / Makefile
index 08e22cc..e594c89 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__ $(shell pkg-config --cflags libosso)
+endif
+
 ALL_CPPFLAGS += $(CPPFLAGS)
 
 #------------------------------------------------------------------------------
@@ -135,12 +143,20 @@ 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)
     BASE_LIBS += -L/opt/local/lib
 endif
 
+ifeq ($(PLATFORM),maemo)
+    BASE_LIBS += $(shell pkg-config --libs libosso)
+endif
+
 ALL_LIBS := $(SDL_LIBS) $(BASE_LIBS) $(TILT_LIBS) $(INTL_LIBS) -lSDL_ttf \
     -lvorbisfile $(OGL_LIBS)
 
@@ -166,7 +182,7 @@ endif
 MAPC_OBJS := \
        share/vec3.o        \
        share/base_image.o  \
-       share/solid.o       \
+       share/solid_base.o  \
        share/binary.o      \
        share/base_config.o \
        share/common.o      \
@@ -183,12 +199,12 @@ BALL_OBJS := \
        share/vec3.o        \
        share/base_image.o  \
        share/image.o       \
-       share/solid.o       \
-       share/solid_gl.o    \
+       share/solid_base.o  \
+       share/solid_vary.o  \
+       share/solid_draw.o  \
        share/solid_cmd.o   \
        share/solid_all.o   \
        share/part.o        \
-       share/back.o        \
        share/geom.o        \
        share/item.o        \
        share/ball.o        \
@@ -196,6 +212,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       \
@@ -232,8 +249,7 @@ BALL_OBJS := \
        ball/st_demo.o      \
        ball/st_save.o      \
        ball/st_goal.o      \
-       ball/st_fall_out.o  \
-       ball/st_time_out.o  \
+       ball/st_fail.o      \
        ball/st_done.o      \
        ball/st_level.o     \
        ball/st_over.o      \
@@ -253,17 +269,18 @@ PUTT_OBJS := \
        share/vec3.o        \
        share/base_image.o  \
        share/image.o       \
-       share/solid.o       \
-       share/solid_gl.o    \
+       share/solid_base.o  \
+       share/solid_vary.o  \
+       share/solid_draw.o  \
        share/solid_cmd.o   \
        share/solid_all.o   \
        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       \
@@ -307,9 +324,14 @@ else
 ifeq ($(ENABLE_TILT),loop)
 BALL_OBJS += share/tilt_loop.o
 else
+ifeq ($(PLATFORM),maemo)
+BALL_OBJS += share/tilt_maemo.o
+BALL_OBJS += share/maemo.o
+else
 BALL_OBJS += share/tilt_null.o
 endif
 endif
+endif
 
 ifeq ($(PLATFORM),mingw)
 BALL_OBJS += neverball.ico.o