forked from rofl0r/gnuboy
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnuboy: initial 1.0.3 import (last official release)
- Loading branch information
0 parents
commit 29076d4
Showing
131 changed files
with
27,998 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
GNUBOY INSTALLATION | ||
|
||
|
||
*NIX SYSTEMS | ||
|
||
One or more of the following is required to compile on *nix: X, SDL, | ||
svgalib, or Linux fbcon. Since basically everyone has X, this should | ||
not be a problem. Please note that the SDL and fbcon ports are the | ||
most functional, however. In the future, Sun console may also be | ||
supported. | ||
|
||
The best and easiest way to build gnuboy for *nix is with the | ||
configure script: | ||
|
||
./configure | ||
make | ||
make install | ||
|
||
By default, heavy optimization and asm cpu and graphics cores will be | ||
used if available on your platform. For information on compiletime | ||
options related to performance and debugging, type: | ||
|
||
./configure --help | ||
|
||
Alternatively, if you don't like the GNU configure script, you may | ||
copy the Makefile.nix to Makefile and edit it by hand to work with | ||
your system. Make sure you uncomment -DIS_LITTLE_ENDIAN if your cpu is | ||
little endian. Please note that not everything is supported when | ||
compiling this way, and that it should only be done as a last resort. | ||
The generic Makefile.nix may be removed in the future since it's extra | ||
work to maintain. | ||
|
||
Running make should produce the binaries xgnuboy, fbgnuboy, sgnuboy | ||
and/or sdlgnuboy, depending on the availability of the various | ||
interface libraries on your host. The install target will install | ||
these to $(prefix)/bin, where prefix is specified to configure in the | ||
usual way. The default prefix is of course /usr/local/. | ||
|
||
Binary packages may be available for some platforms, but they are | ||
usually not quite up to date, and are not built or supported by the | ||
gnuboy team. | ||
|
||
Binary package maintainers should be aware that, by default, gnuboy | ||
will be built with optimizations specific to the exact host cpu it's | ||
being compiled on, and may not work on older models. If you want your | ||
binaries to work with older systems too, run configure with the | ||
--disable-arch option to disable architecture specific compiler flags. | ||
|
||
|
||
WINDOWS | ||
|
||
Mingw32 and the SDL development files are required to compile gnuboy | ||
for Windows. They may be obtained from www.mingw.org and | ||
www.libsdl.org, respectively. | ||
|
||
Just copy Makefile.mingw32 to Makefile and run make. When done, put | ||
the resulting gnuboy.exe wherever you wish to install it. | ||
|
||
Precompiled binaries are also available for Windows; check the site | ||
from which you obtained gnuboy to see if it provides copies. | ||
|
||
|
||
DOS | ||
|
||
You'll need djgpp to use the included Makefile. Theoretically it | ||
shouldn't be hard to port the dos-specific modules to work with other | ||
compilers, but I see no reason why it should be necessary. | ||
|
||
Since all DOS systems are basically alike, just copy Makefile.dos to | ||
Makefile and type "make" to compile gnuboy. No configuration should be | ||
necessary. If you do have build problems, let us know. | ||
|
||
After compiling, place gnuboy.exe wherever you want. | ||
|
||
Precompiled binaries are also available for DOS; check the site from | ||
which you obtained gnuboy to see if it provides copies. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
|
||
AS = $(CC) | ||
LD = $(CC) | ||
|
||
CFLAGS = -O3 -fstrength-reduce -fomit-frame-pointer -I./asm/i386 | ||
ASFLAGS = -x assembler-with-cpp | ||
LDFLAGS = -s | ||
|
||
THIN_NAMES = tl_main tl_log tl_timer tl_key tl_mouse tl_joy tl_dpp tl_event \ | ||
tl_bmp tl_vesa tl_vga tl_video tl_sb tl_sound tl_int | ||
THIN_OBJS = $(THIN_NAMES:%=sys/thinlib/lib/%.o) | ||
|
||
SYS_DEFS = -DIS_LITTLE_ENDIAN -DALLOW_UNALIGNED_IO -DALT_PATH_SEP -DUSE_ASM | ||
|
||
SYS_INCS = -I./sys/dos -I./sys/thinlib/lib | ||
SYS_OBJS = sys/dos/dos.o sys/thinlib/thinlib.o sys/thinlib/keymap.o $(THIN_OBJS) \ | ||
asm/i386/cpu.o asm/i386/lcd.o asm/i386/refresh.o | ||
|
||
all: gnuboy.exe | ||
|
||
include Rules | ||
|
||
gnuboy.exe: $(OBJS) $(SYS_OBJS) | ||
$(LD) $(CFLAGS) $(LDFLAGS) $(OBJS) $(SYS_OBJS) -o $@ | ||
|
||
clean: | ||
rm -f gnuboy.exe gmon.out *.o sys/*.o sys/dos/*.o sys/pc/*.o asm/i386/*.o \ | ||
sys/thinlib/*.o sys/thinlib/*.exe sys/thinlib/*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
prefix = @prefix@ | ||
exec_prefix = @exec_prefix@ | ||
bindir = @bindir@ | ||
|
||
CC = @CC@ | ||
LD = $(CC) | ||
AS = $(CC) | ||
INSTALL = @INSTALL@ | ||
|
||
CFLAGS = @CFLAGS@ | ||
LDFLAGS = $(CFLAGS) @LDFLAGS@ | ||
ASFLAGS = $(CFLAGS) | ||
|
||
TARGETS = @TARGETS@ | ||
|
||
ASM_OBJS = @ASM_OBJS@ | ||
|
||
SYS_DEFS = @DEFS@ @ENDIAN@ @ASM@ @SYS_DEFS@ | ||
SYS_OBJS = sys/nix/nix.o $(ASM_OBJS) | ||
SYS_INCS = -I/usr/local/include @XINCS@ -I./sys/nix | ||
|
||
FB_OBJS = @FB_OBJS@ @JOY@ @SOUND@ | ||
FB_LIBS = | ||
|
||
SVGA_OBJS = sys/svga/svgalib.o sys/pc/keymap.o @JOY@ @SOUND@ | ||
SVGA_LIBS = -L/usr/local/lib -lvga | ||
|
||
SDL_OBJS = sys/sdl/sdl.o sys/sdl/keymap.o | ||
SDL_LIBS = @SDL_LIBS@ | ||
SDL_CFLAGS = @SDL_CFLAGS@ | ||
|
||
X11_OBJS = sys/x11/xlib.o sys/x11/keymap.o @JOY@ @SOUND@ | ||
X11_LIBS = @XLIBS@ -lX11 -lXext | ||
|
||
all: $(TARGETS) | ||
|
||
include Rules | ||
|
||
fbgnuboy: $(OBJS) $(SYS_OBJS) $(FB_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(FB_OBJS) -o $@ $(FB_LIBS) | ||
|
||
sgnuboy: $(OBJS) $(SYS_OBJS) $(SVGA_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SVGA_OBJS) -o $@ $(SVGA_LIBS) | ||
|
||
sdlgnuboy: $(OBJS) $(SYS_OBJS) $(SDL_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SDL_OBJS) -o $@ $(SDL_LIBS) | ||
|
||
sys/sdl/sdl.o: sys/sdl/sdl.c | ||
$(MYCC) $(SDL_CFLAGS) -c $< -o $@ | ||
|
||
sys/sdl/keymap.o: sys/sdl/keymap.c | ||
$(MYCC) $(SDL_CFLAGS) -c $< -o $@ | ||
|
||
xgnuboy: $(OBJS) $(SYS_OBJS) $(X11_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(X11_OBJS) -o $@ $(X11_LIBS) | ||
|
||
install: all | ||
$(INSTALL) -d $(bindir) | ||
$(INSTALL) -m 755 $(TARGETS) $(bindir) | ||
|
||
clean: | ||
rm -f *gnuboy gmon.out *.o sys/*.o sys/*/*.o asm/*/*.o | ||
|
||
distclean: clean | ||
rm -f config.* sys/nix/config.h Makefile | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# | ||
# Makefile.nix | ||
# | ||
# This is a *bare minimum* makefile for building gnuboy on *nix systems. | ||
# If you have trouble with the configure script you can try using this, | ||
# but *please* try the configure script first. This file is mostly | ||
# unmaintained and may break. | ||
# | ||
# If you *do* insist on using this makefile, you at least need to check | ||
# SYS_DEFS below and uncomment -DIS_LITTLE_ENDIAN if your system is | ||
# little endian. Also, you may want to enable the OSS sound module if | ||
# your system supports it. | ||
# | ||
|
||
prefix = /usr/local | ||
bindir = /bin | ||
|
||
CC = gcc | ||
AS = $(CC) | ||
LD = $(CC) | ||
INSTALL = /bin/install -c | ||
|
||
CFLAGS = -O3 | ||
LDFLAGS = | ||
ASFLAGS = | ||
|
||
SYS_DEFS = #-DIS_LITTLE_ENDIAN | ||
ASM_OBJS = | ||
#SND_OBJS = sys/oss/oss.o | ||
SND_OBJS = sys/dummy/nosound.o | ||
JOY_OBJS = sys/dummy/nojoy.o | ||
|
||
TARGETS = xgnuboy | ||
|
||
SYS_OBJS = sys/nix/nix.o $(ASM_OBJS) $(SND_OBJS) $(JOY_OBJS) | ||
SYS_INCS = -I/usr/local/include -I/usr/X11R6/include -I./sys/nix | ||
|
||
X11_OBJS = sys/x11/xlib.o sys/x11/keymap.o | ||
X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext | ||
|
||
all: $(TARGETS) | ||
|
||
include Rules | ||
|
||
xgnuboy: $(OBJS) $(SYS_OBJS) $(X11_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(X11_OBJS) -o $@ $(X11_LIBS) | ||
|
||
install: all | ||
$(INSTALL) -m 755 $(TARGETS) $(prefix)$(bindir) | ||
|
||
clean: | ||
rm -f *gnuboy gmon.out *.o sys/*.o sys/*/*.o asm/*/*.o | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
CC = gcc | ||
AS = $(CC) | ||
LD = $(CC) | ||
|
||
CFLAGS = -O3 -I./asm/i386 -Dmain=SDL_main | ||
LDFLAGS = -s -lmingw32 -lSDLmain -lSDL | ||
ASFLAGS = -x assembler-with-cpp | ||
|
||
SYS_DEFS = -DIS_LITTLE_ENDIAN -DALT_PATH_SEP -DUSE_ASM | ||
ASM_OBJS = asm/i386/cpu.o asm/i386/lcd.o asm/i386/refresh.o | ||
#SND_OBJS = sys/dummy/nosound.o | ||
|
||
SYS_OBJS = $(ASM_OBJS) $(SND_OBJS) sys/windows/windows.o sys/windows/resource.o | ||
SYS_INCS = -I./sys/windows | ||
|
||
SDL_OBJS = sys/sdl/sdl.o sys/sdl/keymap.o | ||
SDL_LIBS = -lSDL | ||
|
||
all: gnuboy | ||
|
||
include Rules | ||
|
||
%.o: %.rc | ||
windres -o $@ $< | ||
|
||
gnuboy: $(OBJS) $(SYS_OBJS) $(SDL_OBJS) | ||
$(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SDL_OBJS) -o $@ $(SDL_LIBS) | ||
|
||
clean: | ||
rm -f gnuboy.exe *.o sys/*.o sys/*/*.o asm/*/*.o |
Oops, something went wrong.