Undid revisions 884 and 883, in effect removing the macosx directory.
[neverball] / Makefile
index a6fa80c..cee30c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,12 +13,11 @@ OGL_LIBS= -lGL -lm
 # Configuration constants
 #------------------------------------------------------------------------------
 
-CFLAGS= -Wall -O3 -ansi -pedantic $(shell sdl-config --cflags)
+CFLAGS= -Wall -g -O3 -ansi -pedantic $(shell sdl-config --cflags)
 #CFLAGS= -Wall -g -O1 -ansi -pedantic $(shell sdl-config --cflags)
 #CFLAGS= -Wall -pg -ansi $(shell sdl-config --cflags)
 
 SDL_LIBS= $(shell sdl-config --libs)
-FT2_LIBS= $(shell freetype-config --libs)
 
 MAPC_TARG= mapc
 MAPC_EXEC = ./$(MAPC_TARG)
@@ -34,7 +33,7 @@ POTFILE= po/neverball.pot
 
 MAPC_OBJS= \
        share/vec3.o   \
-       share/image.o  \
+       share/base_image.o  \
        share/solid.o  \
        share/binary.o \
        share/base_config.o \
@@ -44,8 +43,10 @@ BALL_OBJS= \
        share/st_lang.o \
        share/st_resol.o \
        share/vec3.o    \
+       share/base_image.o   \
        share/image.o   \
        share/solid.o   \
+       share/solid_gl.o\
        share/part.o    \
        share/back.o    \
        share/geom.o    \
@@ -58,14 +59,14 @@ BALL_OBJS= \
        ball/hud.o      \
        ball/game.o     \
        ball/level.o    \
+       ball/levels.o   \
        ball/set.o      \
        ball/demo.o     \
        ball/util.o     \
        ball/st_conf.o  \
        ball/st_demo.o  \
        ball/st_save.o  \
-       ball/st_fail.o  \
-       ball/st_goal.o  \
+       ball/st_play_end.o  \
        ball/st_done.o  \
        ball/st_level.o \
        ball/st_over.o  \
@@ -73,6 +74,7 @@ BALL_OBJS= \
        ball/st_set.o   \
        ball/st_start.o \
        ball/st_title.o \
+       ball/st_help.o  \
        ball/st_name.o  \
        ball/st_shared.o  \
        ball/main.o
@@ -81,8 +83,10 @@ PUTT_OBJS= \
        share/st_lang.o \
        share/st_resol.o \
        share/vec3.o   \
+       share/base_image.o  \
        share/image.o  \
        share/solid.o  \
+       share/solid_gl.o  \
        share/part.o   \
        share/geom.o   \
        share/back.o   \
@@ -104,7 +108,8 @@ BALL_DEPS= $(BALL_OBJS:.o=.d)
 PUTT_DEPS= $(PUTT_OBJS:.o=.d)
 MAPC_DEPS= $(MAPC_OBJS:.o=.d)
 
-LIBS= $(X11_PATH) $(SDL_LIBS) -lSDL_image -lSDL_ttf -lSDL_mixer $(FT2_LIBS) $(OGL_LIBS)
+BASE_LIBS= $(SDL_LIBS) -lSDL_image
+LIBS= $(X11_PATH) $(BASE_LIBS) -lpng -lSDL_ttf -lSDL_mixer $(OGL_LIBS)
 
 MESSAGEPART= /LC_MESSAGES/$(LOCALEDOM).mo
 MESSAGES= $(LINGUAS:%=$(LOCALEDIR)/%$(MESSAGEPART))
@@ -120,7 +125,7 @@ LINGUAS= $(POS:po/%.po=%)
 #------------------------------------------------------------------------------
 
 %.d : %.c
-       $(CC) $(CFLAGS) -Ishare -MM -MF $@ $<
+       $(CC) $(CFLAGS) -Ishare -MM -MF $@ -MT '$*.o $@' $<
 
 %.o : %.c
        $(CC) $(CFLAGS) -Ishare -o $@ -c $<
@@ -145,7 +150,7 @@ $(PUTT_TARG) : $(PUTT_OBJS)
        $(CC) $(CFLAGS) -o $(PUTT_TARG) $(PUTT_OBJS) $(LIBS)
 
 $(MAPC_TARG) : $(MAPC_OBJS)
-       $(CC) $(CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LIBS)
+       $(CC) $(CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(BASE_LIBS)
 
 sols : $(SOLS)
 
@@ -163,6 +168,9 @@ clean : clean-src
 test : all
        ./neverball
 
+tools :
+       cd tools && $(MAKE)
+
 #------------------------------------------------------------------------------
 # PO update rules
 #------------------------------------------------------------------------------
@@ -179,3 +187,9 @@ po-update-merge : $(POS)
 po-update : po-update-extract po-update-merge
 
 #------------------------------------------------------------------------------
+
+.PHONY : all sols locales clean-src clean test \
+       po-update-extract po-update-merge po-update \
+       tools
+
+-include $(BALL_DEPS) $(PUTT_DEPS) $(MAPC_DEPS)