Moved libpng-config stuff to the main Makefile and modified (hacked
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 8 Jul 2007 02:41:41 +0000 (02:41 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 8 Jul 2007 02:41:41 +0000 (02:41 +0000)
actually) Makefile.mingw to get it to work in my cross-compilation
environment.

git-svn-id: https://s.snth.net/svn/neverball/trunk@1026 78b8d119-cf0a-0410-b17c-f493084dd1d7

Makefile
Makefile.mingw

index 3caf80f..5db57b8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ CFLAGS= -Wall -g -O3 -ansi -pedantic $(shell sdl-config --cflags)
 #CFLAGS= -Wall -pg -ansi $(shell sdl-config --cflags)
 
 SDL_LIBS= $(shell sdl-config --libs)
+PNG_LIBS= $(shell libpng-config --libs)
 
 MAPC_TARG= mapc
 BALL_TARG= neverball
@@ -110,7 +111,7 @@ PUTT_DEPS= $(PUTT_OBJS:.o=.d)
 MAPC_DEPS= $(MAPC_OBJS:.o=.d)
 
 BASE_LIBS= $(SDL_LIBS) -lSDL_image
-LIBS= $(X11_PATH) $(BASE_LIBS) -lpng -lSDL_ttf -lSDL_mixer $(OGL_LIBS)
+LIBS= $(X11_PATH) $(BASE_LIBS) $(PNG_LIBS) -lSDL_ttf -lSDL_mixer $(OGL_LIBS)
 
 MESSAGEPART= /LC_MESSAGES/$(LOCALEDOM).mo
 MESSAGES= $(LINGUAS:%=$(LOCALEDIR)/%$(MESSAGEPART))
index 744d7e2..65eba1a 100644 (file)
@@ -5,8 +5,7 @@ BALL_TARG= neverball.exe
 PUTT_TARG= neverputt.exe
 
 OGL_LIBS := -lm -lopengl32
-PNG_LIBS := $(shell libpng-config --libs)
-BASE_LIBS := -lSDL -lSDL_image -lintl
+BASE_LIBS := $(LDFLAGS) -lSDL -lSDL_image -lintl
 
 LIBS := $(SDL_LIBS) -lSDL_image -lSDL_mixer -lSDL_ttf \
        $(OGL_LIBS) $(PNG_LIBS) -lintl