pkgsrc/games/onscripter/patches/patch-Makefile.Linux

67 lines
2 KiB
Text
Raw Normal View History

$NetBSD: patch-Makefile.Linux,v 1.4 2012/05/27 17:08:44 tsutsui Exp $
- use appropriate pkg-config metainfo for INCS and LIBS definitions
- disable avifile (that is not in pkgsrc) support
- replace tools definitions with pkgsrc ones
--- Makefile.Linux.orig 2012-05-27 05:49:49.000000000 +0000
+++ Makefile.Linux
@@ -18,8 +18,8 @@ EXT_OBJS =
# mandatory: SDL, SDL_ttf, SDL_image, SDL_mixer, bzip2, libjpeg
DEFS = -DLINUX
-INCS = `sdl-config --cflags`
-LIBS = `sdl-config --libs` -lSDL_ttf -lSDL_image -lSDL_mixer -lbz2 -ljpeg -lm
+INCS = `sdl-config --cflags` `pkg-config --cflags SDL_ttf` `pkg-config --cflags SDL_image` `pkg-config --cflags SDL_mixer`
+LIBS = `sdl-config --libs` `pkg-config --libs SDL_ttf` `pkg-config --libs SDL_image` `pkg-config --libs SDL_mixer` -lbz2 -ljpeg -lm
# recommended: smpeg
DEFS += -DUSE_SMPEG
@@ -42,16 +42,16 @@ LIBS += -logg -lvorbis -lvorbisfile
DEFS += -DUSE_CDROM
# optional: avifile
-DEFS += -DUSE_AVIFILE
-INCS += `avifile-config --cflags`
-LIBS += `avifile-config --libs`
-TARGET += simple_aviplay$(EXESUFFIX)
-EXT_OBJS += AVIWrapper$(OBJSUFFIX)
+#DEFS += -DUSE_AVIFILE
+#INCS += `avifile-config --cflags`
+#LIBS += `avifile-config --libs`
+#TARGET += simple_aviplay$(EXESUFFIX)
+#EXT_OBJS += AVIWrapper$(OBJSUFFIX)
# optional: lua
DEFS += -DUSE_LUA
-INCS += -I/usr/include/lua5.1
-LIBS += -llua5.1
+INCS += `pkg-config --cflags lua`
+LIBS += `pkg-config --libs lua`
EXT_OBJS += LUAHandler$(OBJSUFFIX)
# optional: force screen width for PDA
@@ -62,11 +62,11 @@ EXT_OBJS += LUAHandler$(OBJSUFFIX)
# for GNU g++
-CC = g++
-LD = g++ -o
+CC = @CXX@
+LD = @CXX@ -o
#CFLAGS = -g -Wall -pipe -c $(INCS) $(DEFS)
-CFLAGS = -O3 -Wall -fomit-frame-pointer -pipe -c $(INCS) $(DEFS)
+CFLAGS = -Wall @CXXFLAGS@ -c $(INCS) $(DEFS)
# for GCC on PowerPC specfied
#CC = powerpc-unknown-linux-gnu-g++
@@ -80,6 +80,6 @@ CFLAGS = -O3 -Wall -fomit-frame-pointer
#CFLAGS = -O3 -tpp6 -xK -c $(INCS) $(DEFS)
-RM = rm -f
+RM = @RM@
include Makefile.onscripter