Skip to content

Commit

Permalink
MegaZeux 2.80e release.
Browse files Browse the repository at this point in the history
  • Loading branch information
adelva1984 committed Aug 11, 2008
1 parent 8ab51ab commit 837aa5d
Show file tree
Hide file tree
Showing 126 changed files with 51,391 additions and 48,812 deletions.
48 changes: 0 additions & 48 deletions MZX270w_Bugs.txt

This file was deleted.

63 changes: 32 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# MZX makefile
#
# Slave MegaZeux makefile
#
include Makefile.platform
include Makefile.in

OBJS = main.o graphics.o window.o hexchar.o event.o \
error.o helpsys.o world.o board.o robot.o idput.o \
intake.o sfx.o scrdisp.o data.o game.o counter.o \
idarray.o delay.o game2.o expr.o sprite.o runrobo2.o \
mzm.o decrypt.o audio.o edit.o edit_di.o block.o \
char_ed.o pal_ed.o param.o sfx_edit.o fill.o rasm.o \
robo_ed.o configure.o
SUBDIRS = contrib/gdm2s3m/src contrib/libmodplug/src src

PREFIX = /usr
all: subdir

BIN = mzx280d.exe

CC = gcc
CPP = g++
STRIP = strip
CFLAGS = -mconsole -O2 -funsigned-char -ffast-math
INCLUDES = -I$(PREFIX)/include -I$(PREFIX)/include/SDL

LIBS = -L$(PREFIX)/lib -lmingw32 -lSDLmain -lSDL -lmodplug -lgdm2s3m

.SUFFIXES: .cpp

%.o: %.cpp
${CPP} ${CFLAGS} ${INCLUDES} -c $<

all: mzx

mzx: ${OBJS}
${CPP} ${OBJS} ${LIBS} -o ${BIN}
${STRIP} --strip-all ${BIN}
subdir:
list='$(SUBDIRS)'; \
for subdir in $$list; do \
pwd=`pwd`; \
cd $$subdir && make && cd $$pwd; \
done;

clean:
rm -f *.o ${BIN}

list='$(SUBDIRS)'; \
for subdir in $$list; do \
pwd=`pwd`; \
cd $$subdir && make clean && cd $$pwd; \
done;

install:
mkdir -p ${PREFIX}/share/megazeux && \
chown root:root ${PREFIX}/share/megazeux && \
chmod 0755 ${PREFIX}/share/megazeux && \
install -o root -m 0644 mzx_default.chr ${PREFIX}/share/megazeux && \
install -o root -m 0644 mzx_blank.chr ${PREFIX}/share/megazeux && \
install -o root -m 0644 mzx_smzx.chr ${PREFIX}/share/megazeux && \
install -o root -m 0644 mzx_ascii.chr ${PREFIX}/share/megazeux && \
install -o root -m 0644 default.spl ${PREFIX}/share/megazeux && \
install -o root -m 0644 mzx_help.fil ${PREFIX}/share/megazeux && \
install -o root -m 0644 config.txt /etc/megazeux-config && \
install -o root -m 0755 ${TARGET} ${PREFIX}/bin && \
ln -sf ${TARGET} ${PREFIX}/bin/megazeux
21 changes: 21 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# used by all makefiles
#
CC = gcc
CPP = g++

# default target name
TARGET = mzx280e
VERSION = 2.80e

# default optimisations
CXXFLAGS = -O2 -funsigned-char -ffast-math -Wall -DMZX_VERSION=\"${VERSION}\"
CXXFLAGS += -I../contrib/libmodplug/src -I../contrib/libmodplug/src/include
CXXFLAGS += -I../contrib/gdm2s3m/src
LIBS += ../contrib/libmodplug/src/libmodplug.a
LIBS += ../contrib/gdm2s3m/src/libgdm2s3m.a

.SUFFIXES: .cpp

%.o: %.cpp
${CXX} ${CXXFLAGS} ${INCLUDES} -c $<
43 changes: 0 additions & 43 deletions Makefile.linux

This file was deleted.

15 changes: 15 additions & 0 deletions Makefile.platform
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# linux makefile generics
#

# location of strip (must be defined)
STRIP = strip --strip-unneeded

# standard linker includes
INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL

# standard libraries
LIBS = -L$(PREFIX)/lib -lSDL -lpthread

# install prefix
PREFIX=/usr
12 changes: 12 additions & 0 deletions arch/Makefile.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# linux makefile generics
#

# location of strip (must be defined)
STRIP = strip --strip-unneeded

# standard linker includes
INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL

# standard libraries
LIBS = -L$(PREFIX)/lib -lSDL -lpthread
12 changes: 12 additions & 0 deletions arch/Makefile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# macos makefile generics
#

# location of strip (must be defined)
STRIP = true

# standard linker includes
INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL

# standard libraries
LIBS = -L$(PREFIX)/lib -lSDL -lpthread
15 changes: 15 additions & 0 deletions arch/Makefile.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# win32 makefile generics
#

# windows requires a binary extension
BINEXT = .exe

# location of strip (must be defined)
STRIP = strip --strip-unneeded

# standard linker includes
INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL

# standard libraries
LIBS = -L$(PREFIX)/lib -lmingw32 -mwindows -lSDLmain -lSDL
54 changes: 54 additions & 0 deletions config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

if [ "$1" = "" ]; then
if [ "`uname -o`" = "GNU/Linux" ]; then
echo "Assuming Linux operating system.."
cp -f arch/Makefile.linux Makefile.platform
ARCH=linux
else
echo "Assuming Windows operating system.."
cp -f arch/Makefile.win32 Makefile.platform
ARCH=win32
fi
else
cp -f arch/Makefile.$1 Makefile.platform
ARCH=$1
fi

if [ ! -f Makefile.platform ]; then
echo "Invalid platform selection (see arch/)"
exit 1
fi

if [ "$2" = "" ]; then
echo "Assuming /usr prefix.."
PREFIX=/usr
else
PREFIX=$2
fi

echo >> Makefile.platform
echo "# install prefix" >> Makefile.platform
echo "PREFIX=$PREFIX" >> Makefile.platform

if [ "$ARCH" = "win32" ]; then
echo "#define MZX_DEFAULT_CHR \"mzx_default.chr\"" > src/config.h
echo "#define MZX_BLANK_CHR \"mzx_blank.chr\"" >> src/config.h
echo "#define MZX_SMZX_CHR \"mzx_smzx.chr\"" >> src/config.h
echo "#define MZX_ASCII_CHR \"mzx_ascii.chr\"" >> src/config.h
echo "#define DEFAULT_SPL \"default.spl\"" >> src/config.h
echo "#define MZX_HELP_FIL \"mzx_help.fil\"" >> src/config.h
echo "#define CONFIG_TXT \"config.txt\"" >> src/config.h
fi

if [ "$ARCH" = "linux" -o "$ARCH" = "macos" ]; then
echo "#define MZX_DEFAULT_CHR \"$PREFIX/share/megazeux/mzx_default.chr\"" > src/config.h
echo "#define MZX_BLANK_CHR \"$PREFIX/share/megazeux/mzx_blank.chr\"" >> src/config.h
echo "#define MZX_SMZX_CHR \"$PREFIX/share/megazeux/mzx_smzx.chr\"" >> src/config.h
echo "#define MZX_ASCII_CHR \"$PREFIX/share/megazeux/mzx_ascii.chr\"" >> src/config.h
echo "#define DEFAULT_SPL \"$PREFIX/share/megazeux/default.spl\"" >> src/config.h
echo "#define MZX_HELP_FIL \"$PREFIX/share/megazeux/mzx_help.fil\"" >> src/config.h
echo "#define CONFIG_TXT \"/etc/megazeux-config\"" >> src/config.h
fi

echo "All done!"
Loading

0 comments on commit 837aa5d

Please sign in to comment.