projects
/
neverball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a problem with Makefile.mingw where make wasn't rebuilding targets
[neverball]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
e9c2ae1
..
fbb726e
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,4
+1,13
@@
+#-------------------------------------------------------------------------------
+
+#VERSION=1.5.0
+VERSION= $(shell sh scripts/version.sh)
+
+ifeq ($(VERSION),)
+ $(error Failed to obtain version for this build.)
+endif
+
#------------------------------------------------------------------------------
# Maybe you need one of these. Maybe you don't.
#------------------------------------------------------------------------------
# Maybe you need one of these. Maybe you don't.
@@
-9,21
+18,20
@@
OGL_LIBS= -lGL -lm
#OGL_LIBS= -lm # Think Different
OGL_LIBS= -lGL -lm
#OGL_LIBS= -lm # Think Different
-#------------------------------------------------------------------------------
-# Configuration constants
-#------------------------------------------------------------------------------
-
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)
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)
+CPPFLAGS := -DVERSION=\"$(VERSION)\" -Ishare $(CPPFLAGS)
+
SDL_LIBS= $(shell sdl-config --libs)
SDL_LIBS= $(shell sdl-config --libs)
-FT2_LIBS= $(shell freetype-config --libs)
+PNG_LIBS= $(shell libpng-config --libs)
+
+MAPC_TARG= mapc$(EXT)
+BALL_TARG= neverball$(EXT)
+PUTT_TARG= neverputt$(EXT)
-MAPC_TARG= mapc
-MAPC_EXEC = ./$(MAPC_TARG)
-BALL_TARG= neverball
-PUTT_TARG= neverputt
+MAPC_EXEC= ./$(MAPC_TARG)
LOCALEDIR= locale
LOCALEDOM= neverball
LOCALEDIR= locale
LOCALEDOM= neverball
@@
-34,7
+42,7
@@
POTFILE= po/neverball.pot
MAPC_OBJS= \
share/vec3.o \
MAPC_OBJS= \
share/vec3.o \
- share/image.o \
+ share/base_image.o \
share/solid.o \
share/binary.o \
share/base_config.o \
share/solid.o \
share/binary.o \
share/base_config.o \
@@
-44,8
+52,10
@@
BALL_OBJS= \
share/st_lang.o \
share/st_resol.o \
share/vec3.o \
share/st_lang.o \
share/st_resol.o \
share/vec3.o \
+ share/base_image.o \
share/image.o \
share/solid.o \
share/image.o \
share/solid.o \
+ share/solid_gl.o\
share/part.o \
share/back.o \
share/geom.o \
share/part.o \
share/back.o \
share/geom.o \
@@
-65,8
+75,7
@@
BALL_OBJS= \
ball/st_conf.o \
ball/st_demo.o \
ball/st_save.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 \
ball/st_done.o \
ball/st_level.o \
ball/st_over.o \
@@
-74,6
+83,7
@@
BALL_OBJS= \
ball/st_set.o \
ball/st_start.o \
ball/st_title.o \
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
ball/st_name.o \
ball/st_shared.o \
ball/main.o
@@
-82,8
+92,10
@@
PUTT_OBJS= \
share/st_lang.o \
share/st_resol.o \
share/vec3.o \
share/st_lang.o \
share/st_resol.o \
share/vec3.o \
+ share/base_image.o \
share/image.o \
share/solid.o \
share/image.o \
share/solid.o \
+ share/solid_gl.o \
share/part.o \
share/geom.o \
share/back.o \
share/part.o \
share/geom.o \
share/back.o \
@@
-105,7
+117,8
@@
BALL_DEPS= $(BALL_OBJS:.o=.d)
PUTT_DEPS= $(PUTT_OBJS:.o=.d)
MAPC_DEPS= $(MAPC_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) $(PNG_LIBS) -lSDL_ttf -lSDL_mixer $(OGL_LIBS)
MESSAGEPART= /LC_MESSAGES/$(LOCALEDOM).mo
MESSAGES= $(LINGUAS:%=$(LOCALEDIR)/%$(MESSAGEPART))
MESSAGEPART= /LC_MESSAGES/$(LOCALEDOM).mo
MESSAGES= $(LINGUAS:%=$(LOCALEDIR)/%$(MESSAGEPART))
@@
-121,10
+134,10
@@
LINGUAS= $(POS:po/%.po=%)
#------------------------------------------------------------------------------
%.d : %.c
#------------------------------------------------------------------------------
%.d : %.c
- $(CC) $(CFLAGS) -Ishare -MM -MF $@ $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -MM -MF $@ -MT '$*.o $@' $<
%.o : %.c
%.o : %.c
- $(CC) $(CFLAGS) -Ishare -o $@ -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
%.sol : %.map $(MAPC_TARG)
$(MAPC_EXEC) $< data
%.sol : %.map $(MAPC_TARG)
$(MAPC_EXEC) $< data
@@
-146,7
+159,7
@@
$(PUTT_TARG) : $(PUTT_OBJS)
$(CC) $(CFLAGS) -o $(PUTT_TARG) $(PUTT_OBJS) $(LIBS)
$(MAPC_TARG) : $(MAPC_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)
sols : $(SOLS)
@@
-164,6
+177,12
@@
clean : clean-src
test : all
./neverball
test : all
./neverball
+tools :
+ cd tools && $(MAKE)
+
+mingw-%:
+ $(MAKE) -f Makefile.mingw $*
+
#------------------------------------------------------------------------------
# PO update rules
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# PO update rules
#------------------------------------------------------------------------------
@@
-173,10
+192,16
@@
po/%.po : $(POTFILE)
touch $@
po-update-extract :
touch $@
po-update-extract :
- bash extractpo.sh $(POTFILE) $(LOCALEDOM)
+ sh scripts/extractpo.sh $(POTFILE) $(LOCALEDOM)
po-update-merge : $(POS)
po-update : po-update-extract po-update-merge
#------------------------------------------------------------------------------
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)