diff options
| author | Max Horn | 2002-08-21 17:35:46 +0000 | 
|---|---|---|
| committer | Max Horn | 2002-08-21 17:35:46 +0000 | 
| commit | ee3ea28e6cbef89ea9416c3a38fef422a77392a3 (patch) | |
| tree | 089a643d599b2bba5bd6378e8057b72e6f7f98fd | |
| parent | c0324a9e6df3b472b5483803983e8831f3777a44 (diff) | |
| download | scummvm-rg350-ee3ea28e6cbef89ea9416c3a38fef422a77392a3.tar.gz scummvm-rg350-ee3ea28e6cbef89ea9416c3a38fef422a77392a3.tar.bz2 scummvm-rg350-ee3ea28e6cbef89ea9416c3a38fef422a77392a3.zip | |
first go at modularizing the build system
svn-id: r4796
| -rw-r--r-- | Makefile | 35 | ||||
| -rw-r--r-- | Makefile.common | 2 | ||||
| -rw-r--r-- | backends/morphos/build.rules | 5 | ||||
| -rw-r--r-- | backends/sdl/build.rules | 16 | ||||
| -rw-r--r-- | backends/x11/build.rules | 7 | ||||
| -rw-r--r-- | scumm/scumm.h | 2 | 
6 files changed, 39 insertions, 28 deletions
| @@ -6,6 +6,10 @@ DEFINES  =  LDFLAGS :=  INCLUDES:= -I. -Icommon -Iscumm  LIBS	 = -lncurses +OBJS	 = + +# Load the build rules & settings for the chosen backend +-include build.rules  # Enable this if you want ScummVM to dump all scripts it runs.  # This is mainly interesting for developers. @@ -19,32 +23,7 @@ LIBS    += -lmad  # DEFINES += -DUSE_ALSA  # LIBS    += -lasound -# Now, please choose a graphical output system between SDL, SDL/GL and X11. -# Beware, only define one of them, otherwise the compilation will blow up. - -# Comment this if you want to disable SDL output -OBJS	 = backends/sdl/sdl.o -INCLUDES += `sdl-config --cflags` -LIBS    += `sdl-config --libs` -DEFINES += -DUNIX - -# Uncomment this (instead of the above) to activate the SDL with OpenGL output -# OBJS	 = backends/sdl/sdl_gl.o -# INCLUDES += `sdl-config --cflags` -# LIBS    += `sdl-config --libs` -lGL -# DEFINES += -DUNIX - -# Uncomment this in addition to the above if you compile on Mac OS X -LIBS	+= -framework QuickTime -framework AudioUnit -DEFINES += -DMACOSX - -# Uncomment this if you rather want X11 output -# OBJS     = backends/x11/x11.o -# DEFINES += -DUNIX -DX11_BACKEND -# LDFLAGS := -L/usr/X11R6/lib -L/usr/local/lib -# INCLUDES+= -I/usr/X11R6/include -# LIBS    += -lpthread -lXext -lX11 - +# Concat DEFINES and INCLUDES to for the CPPFLAGS  CPPFLAGS= $(DEFINES) $(INCLUDES)  include Makefile.common @@ -52,3 +31,7 @@ include Makefile.common  dist:  	rm -f $(ZIPFILE)  	zip -q $(ZIPFILE) $(DISTFILES) + +# Until we add a nice configure tool, default to the SDL build rules +build.rules: +	ln -s backends/sdl/build.rules diff --git a/Makefile.common b/Makefile.common index bedb4a30ef..5636e64e77 100644 --- a/Makefile.common +++ b/Makefile.common @@ -3,7 +3,7 @@  # common rules, a list of common object files etc.  # List of all sub modules -MODULES := common gui scumm simon sound +MODULES += common gui scumm simon sound  ZIPFILE := scummvm-`date '+%Y-%m-%d'`.zip diff --git a/backends/morphos/build.rules b/backends/morphos/build.rules new file mode 100644 index 0000000000..d5b853984a --- /dev/null +++ b/backends/morphos/build.rules @@ -0,0 +1,5 @@ +CC      = g++ +CFLAGS  = -Wno-multichar -fstrength-reduce -fno-rtti -O2 +DEFINES = -DNO_PPCINLINE_STDARG -DNO_PPCINLINE_VARARGS +LDFLAGS = -noixemul -s +LIBS	= -lamiga -lamigastubs -lcdda diff --git a/backends/sdl/build.rules b/backends/sdl/build.rules new file mode 100644 index 0000000000..3bdb7b58ce --- /dev/null +++ b/backends/sdl/build.rules @@ -0,0 +1,16 @@ +# Build settings for the SDL backend +MODULES  += backends/sdl +OBJS	 += backends/sdl/sdl.o +DEFINES  += -DUNIX +INCLUDES += `sdl-config --cflags` +LIBS     += `sdl-config --libs` + +# Uncomment this (instead of the above) to activate the SDL with OpenGL output +# OBJS	   += backends/sdl/sdl_gl.o +# DEFINES  += -DUNIX +# INCLUDES += `sdl-config --cflags` +# LIBS     += `sdl-config --libs` -lGL + +# Uncomment this in addition to the above if you compile on Mac OS X +DEFINES += -DMACOSX +LIBS	+= -framework QuickTime -framework AudioUnit diff --git a/backends/x11/build.rules b/backends/x11/build.rules new file mode 100644 index 0000000000..1540d452d6 --- /dev/null +++ b/backends/x11/build.rules @@ -0,0 +1,7 @@ +# Build settings for the X11 backend +MODULES  += backends/x11 +OBJS    += backends/x11/x11.o +DEFINES += -DUNIX -DX11_BACKEND +LDFLAGS += -L/usr/X11R6/lib -L/usr/local/lib +INCLUDES+= -I/usr/X11R6/include +LIBS    += -lpthread -lXext -lX11 diff --git a/scumm/scumm.h b/scumm/scumm.h index 930d25e5d5..140450432e 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -29,7 +29,7 @@  #include "sound.h"  #define SCUMMVM_VERSION "0.2.2 CVS" -#define SCUMMVM_CVS "2002-08-03" +#define SCUMMVM_CVS "2002-08-21"  #define SWAP(a,b) do{int tmp=a; a=b; b=tmp; } while(0)  #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0])) | 
