aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.new9
-rwxr-xr-xconfigure43
2 files changed, 41 insertions, 11 deletions
diff --git a/Makefile.new b/Makefile.new
index 7b1cb50a9c..cb0014dbdb 100644
--- a/Makefile.new
+++ b/Makefile.new
@@ -27,9 +27,6 @@ OBJS :=
# Load the make rules generated by configure
include config.mak
-# Load the build rules & settings for the chosen backend
--include build.rules
-
# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Wshadow -Werror
@@ -45,14 +42,14 @@ dist:
$(RM) $(ZIPFILE)
$(ZIP) $(ZIPFILE) $(DISTFILES)
-build.rules:
- $(CP) backends/$(BACKEND)/build.rules build.rules
-
deb:
ln -sf dists/debian;
debian/prepare
fakeroot debian/rules binary
+config.mak:
+ ./configure
+
# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
diff --git a/configure b/configure
index a0c11f31e1..888da578eb 100755
--- a/configure
+++ b/configure
@@ -129,7 +129,7 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp32) [sdl]
+ --backend=BACKEND backend to build (sdl, sdlgl, x11, morphos, dc, gp32) [sdl]
Optional Features:
--disable-scumm don't build the SCUMM engine
@@ -265,14 +265,14 @@ hosttype=`uname -s`
echo $hosttype
case $hosttype in
Linux | OpenBSD | FreeBSD | NetBSD | BSD/OS | SunOS | HP-UX)
- _def_unix='/* #define UNIX */'
+ DEFINES="$DEFINES -DUNIX"
;;
IRIX)
- _def_unix='/* #define UNIX */'
+ DEFINES="$DEFINES -DUNIX"
ranlib=ar -r
;;
Darwin)
- _def_unix='/* #define UNIX */'
+ DEFINES="$DEFINES -DUNIX"
_def_macosx='#define MACOSX'
LIBS="$LIBS -framework QuickTime -framework AudioUnit"
;;
@@ -430,6 +430,36 @@ echo -n "Backend... "
echo "$_backend"
echo
+#
+# Backend related stuff
+#
+case $_backend in
+ sdl)
+ INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
+ LIBS="$LIBS `$_sdlconfig --libs`"
+ OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl.o"
+ MODULES="$MODULES backends/sdl"
+ ;;
+ sdlgl)
+ INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
+ LIBS="$LIBS `$_sdlconfig --libs` -lGL"
+ OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl_gl.o"
+ MODULES="$MODULES backends/sdl"
+ ;;
+ x11)
+ INCLUDES="$INCLUDES -I/usr/X11R6/include"
+ LIBS="$LIBS -lpthread -lXext -lX11"
+ LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -L/usr/local/lib"
+ OBJS="$OBJS backends/x11/x11.o"
+ DEFINES="$DEFINES -DX11_BACKEND"
+ MODULES="$MODULES backends/x11"
+ ;;
+ *)
+ echo "support for $_backend backend not implemented in configure script yet"
+ exit 1
+ ;;
+esac
+
echo "Creating config.h"
cat > config.h << EOF
/* This file is automatically generated by configure */
@@ -442,7 +472,6 @@ $_def_scumm
$_def_simon
$_def_sky
-$_def_unix
$_def_macosx
$_def_endianess
$_def_align
@@ -475,4 +504,8 @@ LIBS := $LIBS
RANLIB := $_ranlib
BACKEND := $_backend
+MODULES += $MODULES
+INCLUDES += $INCLUDES
+OBJS += $OBJS
+DEFINES += $DEFINES
EOF