ball/util: clean up duplicate code
[neverball] / Makefile
index 84e6e93..1811809 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ SSE_CFLAGS := $(shell env CC="$(CC)" sh scripts/get-sse-cflags.sh)
 
 ifeq ($(ENABLE_WII),1)
     # -std=c99 because we need isnormal and -fms-extensions because
-    # libwiimote headers makes heavy use of the "unnamed fields" GCC
+    # libwiimote headers make heavy use of the "unnamed fields" GCC
     # extension.
 
     ALL_CFLAGS := -Wall -std=c99 -pedantic -fms-extensions \
@@ -70,6 +70,7 @@ ALL_CPPFLAGS += $(CPPFLAGS)
 
 SDL_LIBS := $(shell sdl-config --libs)
 PNG_LIBS := $(shell libpng-config --libs)
+FS_LIBS := -lphysfs
 
 # The  non-conditionalised values  below  are specific  to the  native
 # system. The native system of this Makefile is Linux (or GNU+Linux if
@@ -86,7 +87,7 @@ OGL_LIBS := -lGL -lm
 
 ifdef MINGW
     ifneq ($(ENABLE_NLS),0)
-        INTL_LIBS := -lintl -liconv
+        INTL_LIBS := -lintl
     endif
 
     TILT_LIBS :=
@@ -95,14 +96,14 @@ endif
 
 ifdef DARWIN
     ifneq ($(ENABLE_NLS),0)
-        INTL_LIBS := -lintl -liconv
+        INTL_LIBS := -lintl
     endif
 
     TILT_LIBS :=
     OGL_LIBS  := -framework OpenGL
 endif
 
-BASE_LIBS := -ljpeg $(PNG_LIBS)
+BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
 
 ifdef DARWIN
     BASE_LIBS += -L/opt/local/lib
@@ -137,6 +138,11 @@ MAPC_OBJS := \
        share/binary.o      \
        share/base_config.o \
        share/common.o      \
+       share/fs.o          \
+       share/fs_png.o      \
+       share/fs_jpg.o      \
+       share/dir.o         \
+       share/array.o       \
        share/mapc.o
 BALL_OBJS := \
        share/lang.o        \
@@ -160,7 +166,6 @@ BALL_OBJS := \
        share/state.o       \
        share/audio.o       \
        share/text.o        \
-       share/sync.o        \
        share/tilt.o        \
        share/common.o      \
        share/keynames.o    \
@@ -168,6 +173,13 @@ BALL_OBJS := \
        share/list.o        \
        share/queue.o       \
        share/cmd.o         \
+       share/array.o       \
+       share/dir.o         \
+       share/fs.o          \
+       share/fs_png.o      \
+       share/fs_jpg.o      \
+       share/fs_rwops.o    \
+       share/fs_ov.o       \
        ball/hud.o          \
        ball/game_common.o  \
        ball/game_client.o  \
@@ -178,6 +190,7 @@ BALL_OBJS := \
        ball/progress.o     \
        ball/set.o          \
        ball/demo.o         \
+       ball/demo_dir.o     \
        ball/util.o         \
        ball/st_conf.o      \
        ball/st_demo.o      \
@@ -196,6 +209,7 @@ BALL_OBJS := \
        ball/st_name.o      \
        ball/st_shared.o    \
        ball/st_pause.o     \
+       ball/st_ball.o      \
        ball/main.o
 PUTT_OBJS := \
        share/lang.o        \
@@ -218,10 +232,16 @@ PUTT_OBJS := \
        share/state.o       \
        share/gui.o         \
        share/text.o        \
-       share/sync.o        \
        share/common.o      \
        share/syswm.o       \
        share/list.o        \
+       share/fs.o          \
+       share/fs_png.o      \
+       share/fs_jpg.o      \
+       share/fs_rwops.o    \
+       share/fs_ov.o       \
+       share/dir.o         \
+       share/array.o       \
        putt/hud.o          \
        putt/game.o         \
        putt/hole.o         \