-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ab51ab
commit 837aa5d
Showing
126 changed files
with
51,391 additions
and
48,812 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
@@ -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 |
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,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 $< |
This file was deleted.
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,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 |
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,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 |
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,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 |
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,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 |
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,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!" |
Oops, something went wrong.