mirror of
https://github.com/ctm/executor.git
synced 2024-11-27 01:49:33 +00:00
Use "host" and "build" like its done with the current GNU build system. Lightly tested.
This commit is contained in:
parent
ffb371a163
commit
8141c0662b
29
README
29
README
@ -23,7 +23,7 @@ install of syn68k):
|
||||
|
||||
mkdir -p build/debug-linux
|
||||
cd build/debug-linux
|
||||
../../util/configure.sh '--target=i486-linux' '--host=i486-linux' '--front-end=x' '--target-gcc=gcc' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=linux' '--syn68k-target=i486-linux-glibc'
|
||||
../../util/configure.sh '--host=i486-linux' '--build=i486-linux' '--front-end=x' '--host-gcc=gcc' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=linux' '--syn68k-host=i486-linux-glibc'
|
||||
make
|
||||
|
||||
That should leave you with a binary called executor. Unfortunately, without
|
||||
@ -31,9 +31,13 @@ a System Folder, Executor won't even come close to running. If you're using
|
||||
a system that can install RPMs and you can dig up and install a copy of
|
||||
executor-aux-2.1pr16-1.i386.rpm, then you should be able to run.
|
||||
|
||||
I'll fiddle around a bit and figure out the easiest way to build a
|
||||
System Folder for Executor from the git repository and add that info
|
||||
next. In the meantime, if anyone is reading this and wants a copy of
|
||||
I've begun transitioning to the new GNU build system. My plan is to
|
||||
use the datadir related variables as a place to install the template
|
||||
for a system volume and to automatically build an ExecutorVolume
|
||||
somewhere (based on environment variables and defaults) the first time
|
||||
Executor is run.
|
||||
|
||||
In the meantime, if anyone is reading this and wants a copy of
|
||||
executor-aux-2.1pr16-1.i386.rpm, try messaging me (ctm) at github.
|
||||
|
||||
If you're on an x86_64 based machine and you have the ability to compile
|
||||
@ -42,16 +46,16 @@ something like
|
||||
|
||||
mkdir -p build/debug-linux
|
||||
cd build/debug-linux
|
||||
../../util/configure.sh '--target=i486-linux' '--host=i486-linux' '--front-end=x' '--target-gcc=gcc -m32' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=linux' '--syn68k-target=i486-linux-glibc'
|
||||
../../util/configure.sh '--host=i486-linux' '--build=i486-linux' '--front-end=x' '--host-gcc=gcc -m32' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=linux' '--syn68k-host=i486-linux-glibc'
|
||||
make
|
||||
|
||||
However, you may find that you need to hand-edit Makefile and change the line
|
||||
|
||||
HOST_GCC = gcc
|
||||
BUILD_GCC = gcc
|
||||
|
||||
to
|
||||
|
||||
HOST_GCC = gcc -m32
|
||||
BUILD_GCC = gcc -m32
|
||||
|
||||
|
||||
If you have SDL <http://libsdl.org/> installed and would like to use
|
||||
@ -59,7 +63,7 @@ the SDL-based version of Executor on Linux, you can try:
|
||||
|
||||
mkdir -p build/debug-linux-sdl
|
||||
cd build/debug-linux-sdl
|
||||
../../util/configure.sh '--target=i486-linux' '--host=i486-linux' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=sdl' '--syn68k-target=i486-linux-glibc'
|
||||
../../util/configure.sh '--host=i486-linux' '--build=i486-linux' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=sdl' '--syn68k-host=i486-linux-glibc'
|
||||
make
|
||||
|
||||
If you have SDL <http://libsdl.org/> installed and would like to play with
|
||||
@ -67,7 +71,7 @@ the SDL-based version of Executor on Mac OS X Intel, you can try:
|
||||
|
||||
mkdir -p build/debug-macosx-sdl
|
||||
cd build/debug-macosx-sdl
|
||||
../../util/configure.sh '--target=i486-macosx' '--host=i486-macosx' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=sdl' '--syn68k-target=i486-macosx-glibc'
|
||||
../../util/configure.sh '--host=i486-macosx' '--build=i486-macosx' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=sdl' '--syn68k-host=i486-macosx-glibc'
|
||||
make
|
||||
|
||||
If you have SDL installed and would like to play with the SDL-based
|
||||
@ -75,13 +79,18 @@ version of Executor on Mac OS X PPC, you can try the following.
|
||||
|
||||
mkdir -p build/debug-macosx-sdl
|
||||
cd build/debug-macosx-sdl
|
||||
../../util/configure.sh '--target=powerpc-macosx' '--host=powerpc-macosx' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--target-file-format=glibc' '--sound=sdl' '--syn68k-target=powerpc-macosx-glibc'
|
||||
../../util/configure.sh '--host=powerpc-macosx' '--build=powerpc-macosx' '--front-end=sdl' '--cflags=-fno-strict-aliasing -I/usr/X11R6/include -O0 -finline-functions -g -Wall' '--root=../..' '--host-file-format=glibc' '--sound=sdl' '--syn68k-host=powerpc-macosx-glibc'
|
||||
|
||||
In the past it was possible to cross-compile a version of Executor for
|
||||
Windows using mingw32. So far that port hasn't been tried since
|
||||
putting the code on Github. It probably doesn't work, but probably
|
||||
could be made to work without much effort.
|
||||
|
||||
As I work on switching to the gnu build system I may inadvertantly
|
||||
push versions that don't build when using the above commands. Don't
|
||||
hesitate to ask me if you're having trouble compiling, linking or
|
||||
running any of the above platforms.
|
||||
|
||||
My email address is still <ctm@ardi.com>, although ARDI itself is
|
||||
defunct. I get a ridiculous amount of spam and will quite possibly
|
||||
not see email addressed to me. I'm ctm on github (http://github.com)
|
||||
|
2
src/README
Normal file
2
src/README
Normal file
@ -0,0 +1,2 @@
|
||||
I'm starting to work on the conversion to a modern GNU build system, but
|
||||
it's not usable yet. For now see ../README.
|
99
src/TODO
99
src/TODO
@ -1,100 +1,11 @@
|
||||
DONE look for all occurences of EM_A in ROMlib code
|
||||
DONE? Where we use "target", the new GNU build system uses "host"
|
||||
Where we use "host", GNU uses "build". We should clean this up
|
||||
before we do anything else
|
||||
|
||||
DONE look for all occurences of destroy_blocks in ROMlib code
|
||||
|
||||
DONE look for all occurences of -1 used as a pointer (like in NewWindow)
|
||||
|
||||
DONE look at all xDEF code since they tend to cast parameters and return
|
||||
types:
|
||||
|
||||
DONE look at all the code that calls xDEFs
|
||||
|
||||
DONE look for pointers hidden in event manager routines
|
||||
especially message field
|
||||
|
||||
DONE look for all P_ jobbies (convert them to ROMlib addresses and
|
||||
deconvert them appropriately)
|
||||
|
||||
DONE all calls to CALL_EMULATOR
|
||||
$target_os winds up being darwin9.7.0, while we currently use
|
||||
macosx. We probably should map into the old name for now
|
||||
|
||||
CToPascalCall -- look hard for arguments that sometimes take a pointer
|
||||
and sometimes take a long
|
||||
|
||||
look for casts between pointers and longs
|
||||
|
||||
KNOWN DIFFERENCES:
|
||||
|
||||
DONE Browser complains about not being able to delete its backup
|
||||
state
|
||||
|
||||
DONE Compact Pro dies instantly
|
||||
|
||||
DONE Printing from Compact Pro Users's Guide dies
|
||||
|
||||
DONE Double-clicking on one of the Tex-Edit documents causes a -120
|
||||
error instead of opening the document
|
||||
|
||||
DONE Opening a document with File->Open... causes trouble, too
|
||||
|
||||
DONE Claris Works 3.0 dies immediately
|
||||
|
||||
DONE Claris Works dies when trying to create a Word Processing document
|
||||
|
||||
DONE Compact Pro User's guide "About PostCard..." dialog box is off the
|
||||
upper left hand of the screen
|
||||
MoveWindow has different args
|
||||
|
||||
DONE Cmd-Shift-5 under Browser dies
|
||||
|
||||
DONE Illustrator dies during startup
|
||||
|
||||
DONE Resorcerer Demo dies during startup
|
||||
|
||||
DONE Word has purple buttons
|
||||
|
||||
DONE Marathon demo dies during startup
|
||||
|
||||
DONE FileMaker Pro dies during startup
|
||||
|
||||
DONE Word dies during startup
|
||||
|
||||
DONE Quark dies during startup
|
||||
|
||||
DONE Quark dies while opening file
|
||||
|
||||
DONE Excel dies when you click on "OK" button after asking for help.
|
||||
|
||||
DONE ClarisWorks Tour (Projector dies during startup)
|
||||
|
||||
DONE Risk seems to have problems with Shift keys
|
||||
|
||||
DONE Lemmings Demo has no sound
|
||||
|
||||
DONE Eric's Ultimate wedges at end of game (sound related, likely)
|
||||
|
||||
DONE Rescue died when I turned sound on in the middle of the game
|
||||
(may not be offset memory related)
|
||||
|
||||
DONE Sound turns itself off when running Rescue with prefs that say
|
||||
we want it.
|
||||
|
||||
DONE Fatty Bear is real slow on buy, but that may be sound related
|
||||
|
||||
DONE Ultima III crashes on startup
|
||||
|
||||
DONE Quicken 4 dies (lat one I've tested today, May 2)
|
||||
|
||||
DONE Haven't tested Object Modeler
|
||||
|
||||
DONE Nisus may die earlier w/memory offset
|
||||
|
||||
DONE Apeiron dies
|
||||
|
||||
DONE Claris Works ruler has messed up numbers on top
|
||||
(NOTE: although I just did a bunch of floating point changes, I
|
||||
didn't introduce a bug, per-se, becuase the same code works when
|
||||
ROMlib_offset is zero)
|
||||
|
||||
DONE About Tex-Edit has black bullets under Executor/DOS -offset
|
||||
(but not under /net/buy/usr/local/builds/linux-debug -offset)
|
||||
[Time to try /net/buy/usr/local/builds/linux-temp -offset]
|
||||
|
@ -2,26 +2,26 @@ root = @root@
|
||||
|
||||
util_dir = $(root)/util
|
||||
|
||||
# gnu-style triple identifying the host machine;
|
||||
# gnu-style triple identifying the build machine;
|
||||
# this is a dynamic value
|
||||
# HOST := $(shell $(root)/util/config.guess)
|
||||
# BUILD := $(shell $(root)/util/config.guess)
|
||||
|
||||
host_obj_dir = $(HOST)
|
||||
host_obj_dir_stamp = $(host_obj_dir)/stamp
|
||||
build_obj_dir = $(BUILD)
|
||||
build_obj_dir_stamp = $(build_obj_dir)/stamp
|
||||
|
||||
# gnu-style triple identifying the target machine
|
||||
TARGET = @target@
|
||||
# canonical triple
|
||||
CANONICAL_TARGET = @canonical_target@
|
||||
TARGET_ARCH = @target_arch@
|
||||
TARGET_OS = @target_os@
|
||||
TARGET_FILE_FORMAT = @target_file_format@
|
||||
|
||||
# same for the host machine
|
||||
# gnu-style triple identifying the host machine
|
||||
HOST = @host@
|
||||
# canonical triple
|
||||
CANONICAL_HOST = @canonical_host@
|
||||
HOST_ARCH = @host_arch@
|
||||
HOST_OS = @host_os@
|
||||
HOST_FILE_FORMAT = @host_file_format@
|
||||
|
||||
# same for the build machine
|
||||
BUILD = @build@
|
||||
CANONICAL_BUILD = @canonical_build@
|
||||
BUILD_ARCH = @build_arch@
|
||||
BUILD_OS = @build_os@
|
||||
|
||||
# front-end for this version of executor;
|
||||
# currently one of `nextstep', `x' or `dos'
|
||||
@ -33,94 +33,94 @@ SRC_DIR = $(root)/src
|
||||
FRONT_END_DIR = $(root)/src/config/front-ends/@front_end@
|
||||
SOUND_DIR = $(root)/src/config/sound/@sound@
|
||||
|
||||
TARGET_ARCH_DIR = $(root)/src/config/arch/$(TARGET_ARCH)
|
||||
TARGET_OS_DIR = $(root)/src/config/os/$(TARGET_OS)
|
||||
|
||||
HOST_ARCH_DIR = $(root)/src/config/arch/$(HOST_ARCH)
|
||||
HOST_OS_DIR = $(root)/src/config/os/$(HOST_OS)
|
||||
|
||||
SYN68K_LIB_DIR = $(root)/syn68k/lib/@syn68k_target@
|
||||
BUILD_ARCH_DIR = $(root)/src/config/arch/$(BUILD_ARCH)
|
||||
BUILD_OS_DIR = $(root)/src/config/os/$(BUILD_OS)
|
||||
|
||||
SYN68K_LIB_DIR = $(root)/syn68k/lib/@syn68k_host@
|
||||
INCL_DIR = $(SRC_DIR)/include
|
||||
|
||||
# ahh, should HOST_{OS, ARCH}_DIR be added to the VPATH?
|
||||
VPATH = $(SRC_DIR):$(TARGET_ARCH_DIR):$(TARGET_OS_DIR):$(FRONT_END_DIR):$(SOUND_DIR)
|
||||
# ahh, should BUILD_{OS, ARCH}_DIR be added to the VPATH?
|
||||
VPATH = $(SRC_DIR):$(HOST_ARCH_DIR):$(HOST_OS_DIR):$(FRONT_END_DIR):$(SOUND_DIR)
|
||||
|
||||
# these are (possibly) cross-tools that run on the target
|
||||
# and produce code for the target
|
||||
# these names are target-independant
|
||||
TARGET_CC = splode
|
||||
TARGET_GCC = @target_gcc@
|
||||
TARGET_STRIP = @target_strip@
|
||||
# these are (possibly) cross-tools that run on the host
|
||||
# and produce code for the host
|
||||
# these names are host-independant
|
||||
HOST_CC = splode
|
||||
HOST_GCC = @host_gcc@
|
||||
HOST_STRIP = @host_strip@
|
||||
|
||||
TARGET_AS = $(TARGET_GCC) -c -x assembler-with-cpp
|
||||
TARGET_AS_CPP = $(TARGET_GCC) -c -x assembler-with-cpp -P
|
||||
HOST_AS = $(HOST_GCC) -c -x assembler-with-cpp
|
||||
HOST_AS_CPP = $(HOST_GCC) -c -x assembler-with-cpp -P
|
||||
# specifies c-specific -Ldirs
|
||||
TARGET_LD = splosion
|
||||
HOST_LD = splosion
|
||||
|
||||
# these are compilers for the target
|
||||
HOST_CC = cc
|
||||
HOST_GCC = gcc
|
||||
# these are compilers for the host
|
||||
BUILD_CC = cc
|
||||
BUILD_GCC = gcc
|
||||
|
||||
ifobjc
|
||||
# currently, objc compilers are only used on NEXTSTEP hosts.
|
||||
# the native (host) NeXT c compiler can act as the native objc compiler,
|
||||
# as well as the target objc compiler.
|
||||
HOST_OBJC = cc
|
||||
TARGET_OBJC = cc -arch @arch@
|
||||
# currently, objc compilers are only used on NEXTSTEP builds.
|
||||
# the native (build) NeXT c compiler can act as the native objc compiler,
|
||||
# as well as the host objc compiler.
|
||||
BUILD_OBJC = cc
|
||||
HOST_OBJC = cc -arch @arch@
|
||||
end ifobjc
|
||||
|
||||
DEFINES = @syn68k_define@ $(ROMLIB_DEFINES) \
|
||||
$(FRONT_END_DEFINES) $(TARGET_ARCH_DEFINES) $(TARGET_OS_DEFINES)
|
||||
$(FRONT_END_DEFINES) $(HOST_ARCH_DEFINES) $(HOST_OS_DEFINES)
|
||||
|
||||
# include in -I$(TARGET_..._DIR) also?
|
||||
INCLUDES = -I. -I$(INCL_DIR) -I$(FRONT_END_DIR) -I$(TARGET_OS_DIR) -I$(TARGET_ARCH_DIR) -I$(SOUND_DIR)
|
||||
# include in -I$(HOST_..._DIR) also?
|
||||
INCLUDES = -I. -I$(INCL_DIR) -I$(FRONT_END_DIR) -I$(HOST_OS_DIR) -I$(HOST_ARCH_DIR) -I$(SOUND_DIR)
|
||||
|
||||
# host cflags are those given when compiling for the host
|
||||
# build cflags are those given when compiling for the build
|
||||
# do not put optimized/debug flags here
|
||||
HOST_CFLAGS = $(CFLAGS) -DCOMPILE_FOR_HOST $(DEFINES) $(INCLUDES)
|
||||
# GEN_FLAGS is like HOST_FLAGS, but used when building object files
|
||||
BUILD_CFLAGS = $(CFLAGS) -DCOMPILE_FOR_BUILD $(DEFINES) $(INCLUDES)
|
||||
# GEN_FLAGS is like BUILD_FLAGS, but used when building object files
|
||||
# which include ROMlib header files but do not link against ROMlib
|
||||
# (so ROMlib headers should define inline functions which reference
|
||||
# external romlib functions).
|
||||
# this is indicated by `-DNO_ROMLIB'
|
||||
GEN_CFLAGS = $(HOST_CFLAGS) -DNO_ROMLIB -Wall
|
||||
GEN_CFLAGS = $(BUILD_CFLAGS) -DNO_ROMLIB -Wall
|
||||
|
||||
ifobjc
|
||||
HOST_OBJCFLAGS = $(CFLAGS) $(DEFINES) $(INCLUDES)
|
||||
BUILD_OBJCFLAGS = $(CFLAGS) $(DEFINES) $(INCLUDES)
|
||||
end ifobjc
|
||||
|
||||
# cflags specified during configuration, defaults to `-g'
|
||||
CONFIGURE_CFLAGS = @cflags@
|
||||
|
||||
# cflags for target
|
||||
TARGET_CFLAGS = $(DEFINES) $(INCLUDES) $(CONFIGURE_CFLAGS)
|
||||
# cflags for host
|
||||
HOST_CFLAGS = $(DEFINES) $(INCLUDES) $(CONFIGURE_CFLAGS)
|
||||
|
||||
ifobjc
|
||||
# `-traditional-cpp' is needed by NeXT cc to make sense of the
|
||||
# global asm a5 decl
|
||||
# TARGET_OBJCFLAGS = -traditional-cpp $(TARGET_CFLAGS)
|
||||
# HOST_OBJCFLAGS = -traditional-cpp $(HOST_CFLAGS)
|
||||
# Haven't compiled NeXT based Executor in a very long time, but now that
|
||||
# we have the beginnings of a Mac OS X port, don't mess it up by requesting
|
||||
# -traditional-cpp. If we ever do support NEXT targets again it will be
|
||||
# -traditional-cpp. If we ever do support NEXT hosts again it will be
|
||||
# after moving to a more modern GNU build system.
|
||||
TARGET_OBJCFLAGS = $(TARGET_CFLAGS)
|
||||
HOST_OBJCFLAGS = $(HOST_CFLAGS)
|
||||
end ifobjc
|
||||
|
||||
.SUFFIXES: .map .psw .h .c .m .s .scpp .o
|
||||
|
||||
# by default, .c files are built by the target gcc compiler,
|
||||
# by default, .c files are built by the host gcc compiler,
|
||||
# you must make an explicit rule to override this
|
||||
.c.o: $<
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c -o $*.o $<
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c -o $*.o $<
|
||||
|
||||
.m.o: $<
|
||||
$(TARGET_OBJC) $(TARGET_OBJCFLAGS) -c -o $*.o $<
|
||||
$(HOST_OBJC) $(HOST_OBJCFLAGS) -c -o $*.o $<
|
||||
|
||||
.s.o: $<
|
||||
$(TARGET_AS) -o $*.o $<
|
||||
$(HOST_AS) -o $*.o $<
|
||||
|
||||
.scpp.o: $<
|
||||
$(TARGET_AS_CPP) $(DEFINES) $(INCLUDES) -o $*.o $<
|
||||
$(HOST_AS_CPP) $(DEFINES) $(INCLUDES) -o $*.o $<
|
||||
|
||||
all:: executor
|
||||
|
||||
@ -128,8 +128,8 @@ ifsyn68k
|
||||
LIBSYN68K = -L$(SYN68K_LIB_DIR) -lsyn68k
|
||||
end ifsyn68k
|
||||
|
||||
@target_arch_make@
|
||||
@target_os_make@
|
||||
@host_arch_make@
|
||||
@host_os_make@
|
||||
@front_end_make@
|
||||
@sound_make@
|
||||
@executor_make@
|
||||
@ -140,40 +140,40 @@ IV_OBJ = $(IV_SRC:.c=.o)
|
||||
|
||||
all:: iv-server
|
||||
iv-server: iv-server.o
|
||||
$(TARGET_GCC) -o iv-server iv-server.o $(IV_LIBS) $(FRONT_END_LIBS)
|
||||
$(HOST_GCC) -o iv-server iv-server.o $(IV_LIBS) $(FRONT_END_LIBS)
|
||||
|
||||
clean::
|
||||
rm -f iv-server iv-server.o $(IV_OBJ)
|
||||
endif
|
||||
|
||||
TARGET_OBJ = $(TARGET_ARCH_OBJ) $(TARGET_OS_OBJ)
|
||||
TARGET_LIBS = $(TARGET_ARCH_LIBS) $(TARGET_OS_LIBS)
|
||||
TARGET_LD_FLAGS = $(TARGET_ARCH_LD_FLAGS) $(TARGET_OS_LD_FLAGS)
|
||||
HOST_OBJ = $(HOST_ARCH_OBJ) $(HOST_OS_OBJ)
|
||||
HOST_LIBS = $(HOST_ARCH_LIBS) $(HOST_OS_LIBS)
|
||||
HOST_LD_FLAGS = $(HOST_ARCH_LD_FLAGS) $(HOST_OS_LD_FLAGS)
|
||||
|
||||
executor: lowglobals.o $(ROMLIB_OBJ) $(EXECUTOR_OBJ) \
|
||||
$(TARGET_OBJ) \
|
||||
$(FRONT_END_OBJ) $(IV_OBJ) $(SOUND_OBJ) $(TARGET_OS_POST_LD_CMD)
|
||||
$(HOST_OBJ) \
|
||||
$(FRONT_END_OBJ) $(IV_OBJ) $(SOUND_OBJ) $(HOST_OS_POST_LD_CMD)
|
||||
echo '#include "rsys/common.h"' > tmp-buildtime.c
|
||||
echo '#include "rsys/version.h"' >> tmp-buildtime.c
|
||||
echo 'const char ROMlib_executor_build_time[] = "'`date`'";' >> tmp-buildtime.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c -o buildtime.o tmp-buildtime.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c -o buildtime.o tmp-buildtime.c
|
||||
rm -f tmp-buildtime.c
|
||||
@$(TARGET_GCC) -o executor \
|
||||
$(LD_FLAGS) $(TARGET_LD_FLAGS) $(LOWGLOBALS_LD_OPTION) \
|
||||
@$(HOST_GCC) -o executor \
|
||||
$(LD_FLAGS) $(HOST_LD_FLAGS) $(LOWGLOBALS_LD_OPTION) \
|
||||
$(ROMLIB_OBJ) $(EXECUTOR_OBJ) buildtime.o \
|
||||
$(TARGET_OBJ) $(FRONT_END_OBJ) $(IV_OBJ) $(SOUND_OBJ) \
|
||||
$(LIBSYN68K) $(FRONT_END_LIBS) $(TARGET_LIBS) $(SOUND_LIBS)
|
||||
$(TARGET_OS_POST_LD_CMD) $(TARGET_OS_POST_LD_OPTIONS)
|
||||
$(HOST_OBJ) $(FRONT_END_OBJ) $(IV_OBJ) $(SOUND_OBJ) \
|
||||
$(LIBSYN68K) $(FRONT_END_LIBS) $(HOST_LIBS) $(SOUND_LIBS)
|
||||
$(HOST_OS_POST_LD_CMD) $(HOST_OS_POST_LD_OPTIONS)
|
||||
|
||||
$(host_obj_dir_stamp):
|
||||
if [ ! -d $(host_obj_dir) ]; then \
|
||||
mkdir $(host_obj_dir); \
|
||||
$(build_obj_dir_stamp):
|
||||
if [ ! -d $(build_obj_dir) ]; then \
|
||||
mkdir $(build_obj_dir); \
|
||||
fi
|
||||
touch $(host_obj_dir_stamp)
|
||||
touch $(build_obj_dir_stamp)
|
||||
|
||||
clean::
|
||||
rm -f executor
|
||||
rm -rf $(host_obj_dir) buildtime.o
|
||||
rm -rf $(build_obj_dir) buildtime.o
|
||||
|
||||
# We no longer use RCS; we use subversion, so we don't want any automatic
|
||||
# checkouts
|
||||
@ -181,14 +181,14 @@ clean::
|
||||
|
||||
include make.depend
|
||||
|
||||
depend-files: $(ROMLIB_SRC) $(EXECUTOR_SRC) $(TARGET_SRC) \
|
||||
$(TARGET_OS_SRC) $(FRONT_END_SRC) $(IV_SRC) $(SOUND_SRC) \
|
||||
$(MAP_C) $(EXECUTOR_GEN_C) $(TARGET_ARCH_SRC) Makefile
|
||||
depend-files: $(ROMLIB_SRC) $(EXECUTOR_SRC) $(HOST_SRC) \
|
||||
$(HOST_OS_SRC) $(FRONT_END_SRC) $(IV_SRC) $(SOUND_SRC) \
|
||||
$(MAP_C) $(EXECUTOR_GEN_C) $(HOST_ARCH_SRC) Makefile
|
||||
@echo $(filter %.c %.m,$^) > depend-files.tmp
|
||||
$(util_dir)/move-if-changed.sh depend-files.tmp depend-files
|
||||
|
||||
make.depend: depend-files
|
||||
-$(TARGET_GCC) $(INCLUDES) -MM `cat depend-files` > make.depend
|
||||
-$(HOST_GCC) $(INCLUDES) -MM `cat depend-files` > make.depend
|
||||
|
||||
clean::
|
||||
rm -f depend-files make.depend
|
||||
|
@ -1 +1 @@
|
||||
TARGET_ARCH_OBJ = alpha.o
|
||||
HOST_ARCH_OBJ = alpha.o
|
||||
|
@ -1,18 +1,18 @@
|
||||
TARGET_ARCH_OBJ = i386.o
|
||||
HOST_ARCH_OBJ = i386.o
|
||||
|
||||
# In the first days of the Mac OS X port we can't use the tricked out blitters,
|
||||
# quite possibly due to register ebx smashage interfering with PIC.
|
||||
|
||||
ifeq (,$(findstring macosx,$(TARGET)))
|
||||
TARGET_ARCH_OBJ += x86patblt.o x86srcblt.o xdstubtables.o sbstubtables.o
|
||||
ifeq (,$(findstring macosx,$(HOST)))
|
||||
HOST_ARCH_OBJ += x86patblt.o x86srcblt.o xdstubtables.o sbstubtables.o
|
||||
endif
|
||||
|
||||
pat-blitters-stamp pat-blitters.h pat-blitters.s: \
|
||||
opfind.c opfind.h metaasm.pl pat-blitters.meta
|
||||
$(TARGET_ARCH_DIR)/metaasm.pl $(METAASM_ARGS)\
|
||||
$(TARGET_ARCH_DIR)/pat-blitters.meta\
|
||||
$(HOST_ARCH_DIR)/metaasm.pl $(METAASM_ARGS)\
|
||||
$(HOST_ARCH_DIR)/pat-blitters.meta\
|
||||
pat-blitters.s pat-blitters.h\
|
||||
$(TARGET_ARCH_DIR)/opfind.c
|
||||
$(HOST_ARCH_DIR)/opfind.c
|
||||
$(RM) opfind
|
||||
touch pat-blitters-stamp
|
||||
|
||||
@ -22,21 +22,21 @@ src-blitters-stamp src-blitters.h src-blitters.s: \
|
||||
opfind.c opfind.h metaasm.pl src-blitters.meta src-shift.meta\
|
||||
src-noshift.meta src-shift-fgbk.meta src-noshift-fgbk.meta\
|
||||
pat-blitters-stamp src-blitters-core.meta
|
||||
$(TARGET_ARCH_DIR)/metaasm.pl -define DST_SEG= $(METAASM_ARGS)\
|
||||
$(TARGET_ARCH_DIR)/src-blitters.meta\
|
||||
$(HOST_ARCH_DIR)/metaasm.pl -define DST_SEG= $(METAASM_ARGS)\
|
||||
$(HOST_ARCH_DIR)/src-blitters.meta\
|
||||
src-blitters.s src-blitters.h\
|
||||
$(TARGET_ARCH_DIR)/opfind.c
|
||||
$(HOST_ARCH_DIR)/opfind.c
|
||||
$(RM) opfind
|
||||
touch src-blitters-stamp
|
||||
|
||||
x86patblt.o: x86patblt.S pat-blitters-stamp
|
||||
$(TARGET_AS_CPP) $(TARGET_CFLAGS) -c $(TARGET_ARCH_DIR)/x86patblt.S
|
||||
$(HOST_AS_CPP) $(HOST_CFLAGS) -c $(HOST_ARCH_DIR)/x86patblt.S
|
||||
|
||||
x86srcblt.o: x86srcblt.S src-blitters-stamp
|
||||
$(TARGET_AS_CPP) $(TARGET_CFLAGS) -c $(TARGET_ARCH_DIR)/x86srcblt.S
|
||||
$(HOST_AS_CPP) $(HOST_CFLAGS) -c $(HOST_ARCH_DIR)/x86srcblt.S
|
||||
|
||||
opfind: opfind.c opfind.h asmsamples.h
|
||||
$(HOST_GCC) $(HOST_CFLAGS) $(TARGET_ARCH_DIR)/opfind.c -o opfind
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) $(HOST_ARCH_DIR)/opfind.c -o opfind
|
||||
$(RM) asmsamples.h
|
||||
|
||||
xdstubtables.o: xdstubtables.c pat-blitters-stamp
|
||||
@ -44,6 +44,6 @@ xdstubtables.o: xdstubtables.c pat-blitters-stamp
|
||||
sbstubtables.o: sbstubtables.c src-blitters-stamp
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_ARCH_OBJ) pat-blitters.s pat-blitters.h asmsamples.h\
|
||||
rm -f $(HOST_ARCH_OBJ) pat-blitters.s pat-blitters.h asmsamples.h\
|
||||
pat-blitters-stamp src-blitters.s src-blitters.h\
|
||||
src-blitters-stamp opfind
|
||||
|
@ -1,15 +1,15 @@
|
||||
TARGET_ARCH_OBJ = m68k-call-emulator.o m68k-callback-stubs.o m68k-callback.o\
|
||||
HOST_ARCH_OBJ = m68k-call-emulator.o m68k-callback-stubs.o m68k-callback.o\
|
||||
m68k-stack.o m68k-trap-handler.o m68k.o m68k-destroy.o trap.o
|
||||
|
||||
MAX_CALLBACKS=4352 # 4096 plus extra slop
|
||||
|
||||
m68k-callback-stubs.s: make_callback_stubs.pl m68k-callback-handler.s
|
||||
$(TARGET_ARCH_DIR)/make_callback_stubs.pl $(MAX_CALLBACKS)\
|
||||
$(TARGET_ARCH_DIR)/m68k-callback-handler.s\
|
||||
$(HOST_ARCH_DIR)/make_callback_stubs.pl $(MAX_CALLBACKS)\
|
||||
$(HOST_ARCH_DIR)/m68k-callback-handler.s\
|
||||
./m68k-callback-stubs.s
|
||||
|
||||
m68k-callback.o: m68k-callback.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -DNUM_CALLBACK_SLOTS=$(MAX_CALLBACKS)\
|
||||
$(TARGET_ARCH_DIR)/m68k-callback.c -c -o m68k-callback.o
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -DNUM_CALLBACK_SLOTS=$(MAX_CALLBACKS)\
|
||||
$(HOST_ARCH_DIR)/m68k-callback.c -c -o m68k-callback.o
|
||||
|
||||
clean::
|
||||
|
@ -1,13 +1,13 @@
|
||||
TARGET_ARCH_SRC = powerpc.c ppc_call.c ppc_stubs.c
|
||||
HOST_ARCH_SRC = powerpc.c ppc_call.c ppc_stubs.c
|
||||
|
||||
TARGET_ARCH_OBJ = $(strip $(notdir $(addsuffix .o,$(basename $(TARGET_ARCH_SRC)))))
|
||||
HOST_ARCH_OBJ = $(strip $(notdir $(addsuffix .o,$(basename $(HOST_ARCH_SRC)))))
|
||||
|
||||
# _GNU_SOURCE needed for some simple math #defines
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE
|
||||
HOST_CFLAGS += -D_GNU_SOURCE
|
||||
|
||||
# NOTE: using -mcall-aix doesn't help here; it hurts
|
||||
# ppc_call.o: ppc_call.c
|
||||
# $(TARGET_GCC) $(TARGET_CFLAGS) -mcall-aix -c $<
|
||||
# $(HOST_GCC) $(HOST_CFLAGS) -mcall-aix -c $<
|
||||
|
||||
|
||||
# -mcall-aix was used when we were compiling on Linux and experimenting with
|
||||
@ -15,12 +15,12 @@ TARGET_CFLAGS += -D_GNU_SOURCE
|
||||
# native powerpc code is not likely to work (initially) under the Mac OS X
|
||||
# port.
|
||||
|
||||
ifeq (,$(findstring macosx,$(TARGET)))
|
||||
ifeq (,$(findstring macosx,$(HOST)))
|
||||
CALL_AIX_FLAG = -mcall-aix
|
||||
endif
|
||||
|
||||
ppc_stubs.o: ppc_stubs.c ppc_stubs.h
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) $(CALL_AIX_FLAG) -c $<
|
||||
$(HOST_GCC) $(HOST_CFLAGS) $(CALL_AIX_FLAG) -c $<
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_ARCH_OBJ)
|
||||
rm -f $(HOST_ARCH_OBJ)
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
FRONT_END_DEFINES =
|
||||
|
||||
FRONT_END_LIBS = -L$(FRONT_END_DIR) -lsv
|
||||
@ -13,7 +12,7 @@ FRONT_END_SRC = $(DOS_SRC)
|
||||
FRONT_END_OBJ = $(strip $(addsuffix .o,$(basename $(FRONT_END_SRC))))
|
||||
|
||||
deintr.o: deintr.S dosevq_defs.h
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c $(FRONT_END_DIR)/deintr.S
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c $(FRONT_END_DIR)/deintr.S
|
||||
|
||||
clean::
|
||||
rm -f $(FRONT_END_OBJ)
|
||||
|
@ -3,19 +3,19 @@ INCLUDES += -I/usr/include/SDL
|
||||
SDL_SRC = sdlwin.c sdlevents.c sdlwm.c sdlscrap.c sdlquit.c \
|
||||
syswm_map.c sdl_mem.c SDL_bmp.c
|
||||
|
||||
ifneq (,$(findstring linux,$(TARGET)))
|
||||
ifneq (,$(findstring linux,$(HOST)))
|
||||
SDL_SRC += sdlX.c
|
||||
endif
|
||||
|
||||
FRONT_END_SRC = $(SDL_SRC)
|
||||
FRONT_END_OBJ = $(FRONT_END_SRC:.c=.o)
|
||||
|
||||
ifneq (,$(findstring macosx,$(TARGET)))
|
||||
ifneq (,$(findstring macosx,$(HOST)))
|
||||
FRONT_END_OBJ += macosx_main.o
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(findstring mingw,$(TARGET)))
|
||||
ifneq (,$(findstring mingw,$(HOST)))
|
||||
FRONT_END_LIBS += -lmingw32
|
||||
endif
|
||||
# SDL_LIB_DIR is defined in the OS-specific makefile
|
||||
@ -27,17 +27,17 @@ endif
|
||||
# with the version of SDL on Fedora 9 (SDL 1.2.13)
|
||||
|
||||
# FRONT_END_LIBS += -lSDLmain -lSDL
|
||||
ifeq (,$(findstring macosx,$(TARGET)))
|
||||
ifeq (,$(findstring macosx,$(HOST)))
|
||||
FRONT_END_LIBS += -lSDL
|
||||
endif
|
||||
#
|
||||
ifneq (,$(findstring linux,$(TARGET)))
|
||||
ifneq (,$(findstring linux,$(HOST)))
|
||||
FRONT_END_LIBS += -ldl -L/usr/X11R6/lib -lX11 -lpthread
|
||||
INCLUDES += -I/usr/X11R6/include
|
||||
CFLAGS += -D_REENTRANT
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring macosx,$(TARGET)))
|
||||
ifneq (,$(findstring macosx,$(HOST)))
|
||||
FRONT_END_LIBS += -framework SDL -framework Cocoa
|
||||
CFLAGS += -D_REENTRANT
|
||||
endif
|
||||
|
7
src/config/hosts/i386-msdos-go32/i386-msdos-go32.make
Normal file
7
src/config/hosts/i386-msdos-go32/i386-msdos-go32.make
Normal file
@ -0,0 +1,7 @@
|
||||
LOWGLOBALS_LD_OPTION = -Wl,lowglobals.o
|
||||
|
||||
HOST_LD_FLAGS = -Wl,-Ttext,0
|
||||
|
||||
HOST_LIBS = -lpc -lm
|
||||
|
||||
|
9
src/config/hosts/i486-linux/i486-linux.make
Normal file
9
src/config/hosts/i486-linux/i486-linux.make
Normal file
@ -0,0 +1,9 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
HOST_SRC = lowglobals-mem.c
|
||||
HOST_OBJ = lowglobals-mem.o
|
||||
|
||||
HOST_LIBS = -ldbm -lm
|
||||
|
||||
clean::
|
||||
rm -f $(HOST_OBJ)
|
9
src/config/hosts/i486-next-ns3/i486-next-ns3.make
Normal file
9
src/config/hosts/i486-next-ns3/i486-next-ns3.make
Normal file
@ -0,0 +1,9 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
HOST_LIBS = -lIndexing_s -lkernload -lMedia_s -lNeXT_s
|
||||
|
||||
HOST_POST_LD_CMD = $(build_obj_dir)/set_page_zero_size
|
||||
HOST_POST_LD_OPTIONS = executor 200000
|
||||
|
||||
$(build_obj_dir)/set_page_zero_size: set_page_zero_size.c
|
||||
$(BUILD_GCC) -o $(build_obj_dir)/set_page_zero_size $<
|
9
src/config/hosts/m68k-next-ns3/m68k-next-ns3.make
Normal file
9
src/config/hosts/m68k-next-ns3/m68k-next-ns3.make
Normal file
@ -0,0 +1,9 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
HOST_LIBS = -lIndexing_s -lkernload -lMedia_s -lNeXT_s
|
||||
|
||||
HOST_POST_LD_CMD = $(build_obj_dir)/set_page_zero_size
|
||||
HOST_POST_LD_OPTIONS = executor 200000
|
||||
|
||||
$(build_obj_dir)/set_page_zero_size: set_page_zero_size.c
|
||||
$(BUILD_GCC) -o $(build_obj_dir)/set_page_zero_size $<
|
@ -1,23 +1,23 @@
|
||||
TARGET_OS_SRC = cygwin32.c winfs.c win_disk.c win_stat.c \
|
||||
HOST_OS_SRC = cygwin32.c winfs.c win_disk.c win_stat.c \
|
||||
win_memory.c win_serial.c win_ntcd.c win_print.c win_beep.c \
|
||||
win_cookie.c win_clip.c win_temp.c win_except.c win_time.c \
|
||||
win_dongle.c win_queue.c win_screen.c win_vxdiface.c win_keyboard.c \
|
||||
win_launch.c win_stdfile.c
|
||||
TARGET_OS_OBJ = $(strip $(addsuffix .o,$(basename $(TARGET_OS_SRC))))
|
||||
HOST_OS_OBJ = $(strip $(addsuffix .o,$(basename $(HOST_OS_SRC))))
|
||||
|
||||
TARGET_OS_LIBS = -mwindows -luser32 -lgdi32 -lwinmm -ldxguid
|
||||
HOST_OS_LIBS = -mwindows -luser32 -lgdi32 -lwinmm -ldxguid
|
||||
|
||||
licensetext.txt: licensetext.i extr.c
|
||||
$(HOST_GCC) -DCYGWIN32 -o extr extr.c licensetext.i
|
||||
$(BUILD_GCC) -DCYGWIN32 -o extr extr.c licensetext.i
|
||||
./extr > licensetext.txt
|
||||
|
||||
exemove.exe: exemove.o paramline.o
|
||||
$(TARGET_GCC) -o $@ $^
|
||||
$(TARGET_STRIP) $@
|
||||
$(HOST_GCC) -o $@ $^
|
||||
$(HOST_STRIP) $@
|
||||
|
||||
executor.exe: executor
|
||||
cp executor executor.exe
|
||||
$(TARGET_STRIP) executor.exe
|
||||
$(HOST_STRIP) executor.exe
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_OS_OBJ)
|
||||
rm -f $(HOST_OS_OBJ)
|
||||
|
@ -1,23 +1,23 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
TARGET_OS_LD_FLAGS = -Wl,-no-keep-memory # So we don't page so much
|
||||
HOST_OS_LD_FLAGS = -Wl,-no-keep-memory # So we don't page so much
|
||||
|
||||
TARGET_OS_SRC = lowglobals-mem.c linux.c
|
||||
TARGET_OS_OBJ = lowglobals-mem.o linux.o
|
||||
HOST_OS_SRC = lowglobals-mem.c linux.c
|
||||
HOST_OS_OBJ = lowglobals-mem.o linux.o
|
||||
|
||||
TARGET_OS_LIBS = @libdb@ -lm @libg@
|
||||
HOST_OS_LIBS = @libdb@ -lm @libg@
|
||||
|
||||
SDL_LIB_DIR=/usr/lib
|
||||
|
||||
licensetext.txt: licensetext.i extr.c
|
||||
$(HOST_GCC) -DLINUX -o extr extr.c licensetext.i
|
||||
$(BUILD_GCC) -DLINUX -o extr extr.c licensetext.i
|
||||
./extr > licensetext.txt
|
||||
|
||||
# see the extended comment in linux.c as to why we REQUIRE -O6 below
|
||||
# if you change this, you may introduce a very subtle bug.
|
||||
|
||||
linux.o: linux.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -O6 -c -o $*.o $<
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -O6 -c -o $*.o $<
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_OS_OBJ)
|
||||
rm -f $(HOST_OS_OBJ)
|
||||
|
@ -1,20 +1,20 @@
|
||||
LOWGLOBALS_LD_OPTION = -Wl,lowglobals.o
|
||||
|
||||
TARGET_OS_LD_FLAGS = -Wl,-Ttext,2000 -Wl,-no-keep-memory
|
||||
HOST_OS_LD_FLAGS = -Wl,-Ttext,2000 -Wl,-no-keep-memory
|
||||
|
||||
TARGET_OS_SRC = msdos.c dpmimem.c dpmicall.c openmany.c rmint70.S
|
||||
TARGET_OS_OBJ = $(strip $(addsuffix .o,$(basename $(TARGET_OS_SRC))))
|
||||
HOST_OS_SRC = msdos.c dpmimem.c dpmicall.c openmany.c rmint70.S
|
||||
HOST_OS_OBJ = $(strip $(addsuffix .o,$(basename $(HOST_OS_SRC))))
|
||||
|
||||
TARGET_OS_LIBS =
|
||||
HOST_OS_LIBS =
|
||||
|
||||
rmint70.o: rmint70.S
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c $(TARGET_OS_DIR)/rmint70.S
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c $(HOST_OS_DIR)/rmint70.S
|
||||
|
||||
TARGET_OS_POST_LD_OPTIONS = cp executor executor.bkup && $(TARGET_STRIP) executor && stubify executor && mv executor.bkup executor
|
||||
HOST_OS_POST_LD_OPTIONS = cp executor executor.bkup && $(HOST_STRIP) executor && stubify executor && mv executor.bkup executor
|
||||
|
||||
licensetext.txt: licensetext.i extr.c
|
||||
$(HOST_GCC) -DMSDOS -o extr extr.c licensetext.i
|
||||
$(BUILD_GCC) -DMSDOS -o extr extr.c licensetext.i
|
||||
./extr > licensetext.txt
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_OS_OBJ) executor.exe
|
||||
rm -f $(HOST_OS_OBJ) executor.exe
|
||||
|
@ -1,7 +0,0 @@
|
||||
LOWGLOBALS_LD_OPTION = -Wl,lowglobals.o
|
||||
|
||||
TARGET_LD_FLAGS = -Wl,-Ttext,0
|
||||
|
||||
TARGET_LIBS = -lpc -lm
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
TARGET_SRC = lowglobals-mem.c
|
||||
TARGET_OBJ = lowglobals-mem.o
|
||||
|
||||
TARGET_LIBS = -ldbm -lm
|
||||
|
||||
clean::
|
||||
rm -f $(TARGET_OBJ)
|
@ -1,9 +0,0 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
TARGET_LIBS = -lIndexing_s -lkernload -lMedia_s -lNeXT_s
|
||||
|
||||
TARGET_POST_LD_CMD = $(host_obj_dir)/set_page_zero_size
|
||||
TARGET_POST_LD_OPTIONS = executor 200000
|
||||
|
||||
$(host_obj_dir)/set_page_zero_size: set_page_zero_size.c
|
||||
$(HOST_GCC) -o $(host_obj_dir)/set_page_zero_size $<
|
@ -1,9 +0,0 @@
|
||||
LOWGLOBALS_LD_OPTION = lowglobals.o
|
||||
|
||||
TARGET_LIBS = -lIndexing_s -lkernload -lMedia_s -lNeXT_s
|
||||
|
||||
TARGET_POST_LD_CMD = $(host_obj_dir)/set_page_zero_size
|
||||
TARGET_POST_LD_OPTIONS = executor 200000
|
||||
|
||||
$(host_obj_dir)/set_page_zero_size: set_page_zero_size.c
|
||||
$(HOST_GCC) -o $(host_obj_dir)/set_page_zero_size $<
|
@ -94,29 +94,29 @@ MAP_SRC = \
|
||||
active.map go_away.map grow.map ractive.map zoom.map
|
||||
MAP_C = $(MAP_SRC:.map=.c)
|
||||
|
||||
$(host_obj_dir)/mksspairtable: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/mksspairtable: mksspairtable.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -o $(host_obj_dir)/mksspairtable $<
|
||||
sspairtable.c: $(host_obj_dir)/mksspairtable
|
||||
$(build_obj_dir)/mksspairtable: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/mksspairtable: mksspairtable.c
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -o $(build_obj_dir)/mksspairtable $<
|
||||
sspairtable.c: $(build_obj_dir)/mksspairtable
|
||||
rm -f sspairtable.c
|
||||
$(host_obj_dir)/mksspairtable > sspairtable.c
|
||||
$(build_obj_dir)/mksspairtable > sspairtable.c
|
||||
chmod -w sspairtable.c
|
||||
|
||||
$(host_obj_dir)/mkultable: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/mkultable: mkultable.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -o $(host_obj_dir)/mkultable $<
|
||||
ultable.c: $(host_obj_dir)/mkultable
|
||||
$(build_obj_dir)/mkultable: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/mkultable: mkultable.c
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -o $(build_obj_dir)/mkultable $<
|
||||
ultable.c: $(build_obj_dir)/mkultable
|
||||
rm -f ultable.c
|
||||
$(host_obj_dir)/mkultable > ultable.c
|
||||
$(build_obj_dir)/mkultable > ultable.c
|
||||
chmod -w ultable.c
|
||||
|
||||
$(host_obj_dir)/mkseedtables: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/mkseedtables: mkseedtables.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -o $(host_obj_dir)/mkseedtables $<
|
||||
$(build_obj_dir)/mkseedtables: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/mkseedtables: mkseedtables.c
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -o $(build_obj_dir)/mkseedtables $<
|
||||
|
||||
seedtables.c: $(host_obj_dir)/mkseedtables
|
||||
seedtables.c: $(build_obj_dir)/mkseedtables
|
||||
rm -f seedtables.c
|
||||
$(host_obj_dir)/mkseedtables > seedtables.c
|
||||
$(build_obj_dir)/mkseedtables > seedtables.c
|
||||
chmod -w seedtables.c
|
||||
|
||||
rawpatstubs.c: makerawblt.pl pat-blitters.tmpl
|
||||
@ -135,33 +135,33 @@ rawsrcblt.o: rawsrcblt.c rawsrcstubs.c
|
||||
|
||||
qIMIV.o: seedtables.c
|
||||
|
||||
$(host_obj_dir)/mkexpandtables: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/mkexpandtables: mkexpandtables.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -o $(host_obj_dir)/mkexpandtables $<
|
||||
$(build_obj_dir)/mkexpandtables: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/mkexpandtables: mkexpandtables.c
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -o $(build_obj_dir)/mkexpandtables $<
|
||||
|
||||
expandtables.c: $(host_obj_dir)/mkexpandtables
|
||||
expandtables.c: $(build_obj_dir)/mkexpandtables
|
||||
rm -f expandtables.c
|
||||
$(host_obj_dir)/mkexpandtables > expandtables.c
|
||||
$(build_obj_dir)/mkexpandtables > expandtables.c
|
||||
chmod -w expandtables.c
|
||||
|
||||
globals.o: globals.c
|
||||
rm -f tmp-globals.c
|
||||
awk -F, '$$5 !~ /false/ && $$5 !~ /true-b/' $< > tmp-globals.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c -o globals.o tmp-globals.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c -o globals.o tmp-globals.c
|
||||
rm -f tmp-globals.c
|
||||
|
||||
$(host_obj_dir)/map_to_c: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/map_to_c: map_to_c.c
|
||||
$(HOST_GCC) -O1 $(GEN_CFLAGS) -o $(host_obj_dir)/map_to_c $<
|
||||
$(MAP_C): $(host_obj_dir)/map_to_c
|
||||
$(build_obj_dir)/map_to_c: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/map_to_c: map_to_c.c
|
||||
$(BUILD_GCC) -O1 $(GEN_CFLAGS) -o $(build_obj_dir)/map_to_c $<
|
||||
$(MAP_C): $(build_obj_dir)/map_to_c
|
||||
.map.c: $<
|
||||
rm -f $*.c
|
||||
$(host_obj_dir)/map_to_c > $*.c < $<
|
||||
$(build_obj_dir)/map_to_c > $*.c < $<
|
||||
chmod -w $*.c
|
||||
|
||||
$(host_obj_dir)/gensplash: $(host_obj_dir_stamp)
|
||||
$(host_obj_dir)/gensplash: gensplash.c
|
||||
$(HOST_GCC) -g -O1 $(GEN_CFLAGS) -o $(host_obj_dir)/gensplash $<
|
||||
$(build_obj_dir)/gensplash: $(build_obj_dir_stamp)
|
||||
$(build_obj_dir)/gensplash: gensplash.c
|
||||
$(BUILD_GCC) -g -O1 $(GEN_CFLAGS) -o $(build_obj_dir)/gensplash $<
|
||||
|
||||
# automatically generated c files; used make.depend depends on them
|
||||
# since they are inlcluded by other executor source files
|
||||
@ -188,44 +188,44 @@ TRAP_SRC = emustubs.c emutrap.c
|
||||
EXECUTOR_SRC = crc.c emutraptables.c executor.c priv.c parse.y $(TRAP_SRC)
|
||||
EXECUTOR_OBJ = $(strip $(addsuffix .o,$(basename $(EXECUTOR_SRC))))
|
||||
|
||||
$(host_obj_dir)/genfndecls: genfndecls.c
|
||||
$(HOST_CC) $(TARGET_CFLAGS) $< -o $(host_obj_dir)/genfndecls
|
||||
$(build_obj_dir)/genfndecls: genfndecls.c
|
||||
$(BUILD_CC) $(HOST_CFLAGS) $< -o $(build_obj_dir)/genfndecls
|
||||
|
||||
fndecls: $(host_obj_dir)/genfndecls
|
||||
fndecls: $(build_obj_dir)/genfndecls
|
||||
fndecls: $(ROMLIB_SRC) $(TRAP_SRC)
|
||||
$(host_obj_dir)/genfndecls $(addprefix $(SRC_DIR)/, $(ROMLIB_SRC)) \
|
||||
$(build_obj_dir)/genfndecls $(addprefix $(SRC_DIR)/, $(ROMLIB_SRC)) \
|
||||
$(addprefix $(SRC_DIR)/, $(TRAP_SRC)) \
|
||||
$(addprefix $(TARGET_ARCH_DIR)/, $(TARGET_ARCH_SRC)) \
|
||||
$(addprefix $(HOST_ARCH_DIR)/, $(HOST_ARCH_SRC)) \
|
||||
> fndecls.tmp
|
||||
$(util_dir)/move-if-changed.sh fndecls.tmp fndecls
|
||||
|
||||
genptocflags_h.c: genptocflags_h.tmpl fndecls
|
||||
$(util_dir)/subst.pl @fndecls@:fndecls < $< > genptocflags_h.c
|
||||
$(host_obj_dir)/genptocflags_h: genptocflags_h.c
|
||||
$(HOST_GCC) $(GEN_CFLAGS) $< -o $(host_obj_dir)/genptocflags_h
|
||||
ptocflags.h: $(host_obj_dir)/genptocflags_h
|
||||
$(host_obj_dir)/genptocflags_h > ptocflags.h
|
||||
$(build_obj_dir)/genptocflags_h: genptocflags_h.c
|
||||
$(BUILD_GCC) $(GEN_CFLAGS) $< -o $(build_obj_dir)/genptocflags_h
|
||||
ptocflags.h: $(build_obj_dir)/genptocflags_h
|
||||
$(build_obj_dir)/genptocflags_h > ptocflags.h
|
||||
|
||||
geninterfacelib.c: geninterfacelib.tmpl fndecls
|
||||
$(util_dir)/subst.pl @fndecls@:fndecls < $< > geninterfacelib.c
|
||||
$(host_obj_dir)/geninterfacelib: geninterfacelib.c
|
||||
$(HOST_GCC) $(GEN_CFLAGS) $< -o $(host_obj_dir)/geninterfacelib
|
||||
$(build_obj_dir)/geninterfacelib: geninterfacelib.c
|
||||
$(BUILD_GCC) $(GEN_CFLAGS) $< -o $(build_obj_dir)/geninterfacelib
|
||||
|
||||
newinterfacelib.c: $(host_obj_dir)/geninterfacelib
|
||||
$(host_obj_dir)/geninterfacelib > newinterfacelib.c
|
||||
newinterfacelib.c: $(build_obj_dir)/geninterfacelib
|
||||
$(build_obj_dir)/geninterfacelib > newinterfacelib.c
|
||||
|
||||
genctopflags_h.c: genctopflags_h.tmpl fndecls
|
||||
$(util_dir)/subst.pl @fndecls@:fndecls < $< > genctopflags_h.c
|
||||
$(host_obj_dir)/genctopflags_h: genctopflags_h.c
|
||||
$(HOST_GCC) $(GEN_CFLAGS) $< -o $(host_obj_dir)/genctopflags_h
|
||||
ctopflags.h: $(host_obj_dir)/genctopflags_h
|
||||
$(host_obj_dir)/genctopflags_h > ctopflags.h
|
||||
$(build_obj_dir)/genctopflags_h: genctopflags_h.c
|
||||
$(BUILD_GCC) $(GEN_CFLAGS) $< -o $(build_obj_dir)/genctopflags_h
|
||||
ctopflags.h: $(build_obj_dir)/genctopflags_h
|
||||
$(build_obj_dir)/genctopflags_h > ctopflags.h
|
||||
|
||||
$(host_obj_dir)/genrand_h: genrand_h.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -o $(host_obj_dir)/genrand_h $<
|
||||
$(build_obj_dir)/genrand_h: genrand_h.c
|
||||
$(BUILD_GCC) $(BUILD_CFLAGS) -o $(build_obj_dir)/genrand_h $<
|
||||
|
||||
rand.h: $(host_obj_dir)/genrand_h
|
||||
$(host_obj_dir)/genrand_h > rand.h
|
||||
rand.h: $(build_obj_dir)/genrand_h
|
||||
$(build_obj_dir)/genrand_h > rand.h
|
||||
|
||||
genstubify_body: $(awk_src_dir)/stubify.awk fndecls ptocflags.h
|
||||
echo atrap > genstubify_tmp
|
||||
@ -248,10 +248,10 @@ genstubify_h.c: genstubify_h.tmpl genstubify_body
|
||||
p_q_defines.h: $(util_dir)/mkstubdefns.pl
|
||||
$(util_dir)/mkstubdefns.pl 0 11 > p_q_defines.h
|
||||
|
||||
$(host_obj_dir)/genstubify_h: genstubify_h.c p_q_defines.h
|
||||
$(HOST_GCC) $(GEN_CFLAGS) genstubify_h.c -o $(host_obj_dir)/genstubify_h
|
||||
stubify.h: $(host_obj_dir)/genstubify_h
|
||||
$(host_obj_dir)/genstubify_h > stubify.h
|
||||
$(build_obj_dir)/genstubify_h: genstubify_h.c p_q_defines.h
|
||||
$(BUILD_GCC) $(GEN_CFLAGS) genstubify_h.c -o $(build_obj_dir)/genstubify_h
|
||||
stubify.h: $(build_obj_dir)/genstubify_h
|
||||
$(build_obj_dir)/genstubify_h > stubify.h
|
||||
|
||||
lowglobals.s: $(SRC_DIR)/globals.c $(SRC_DIR)/globals.pl
|
||||
rm -f lowglobals.s
|
||||
@ -260,10 +260,10 @@ lowglobals.s: $(SRC_DIR)/globals.c $(SRC_DIR)/globals.pl
|
||||
chmod -w lowglobals.s
|
||||
|
||||
licensetext.i: $(SRC_DIR)/licensetext.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -E -o licensetext.i $<
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -E -o licensetext.i $<
|
||||
|
||||
licensetext.o: licensetext.i
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -c -o licensetext.o $<
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -c -o licensetext.o $<
|
||||
|
||||
extr.c: $(root)/packages/extr_license/extr.c
|
||||
ln -s $< extr.c
|
||||
@ -273,7 +273,7 @@ parse.c: parse.y
|
||||
mv y.tab.c parse.c
|
||||
|
||||
executor.o: rand.h executor.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) -DROOT_DIR='"$(root)"' -c -o $*.o $(SRC_DIR)/executor.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) -DROOT_DIR='"$(root)"' -c -o $*.o $(SRC_DIR)/executor.c
|
||||
|
||||
clean::
|
||||
rm -f $(EXECUTOR_OBJ) $(ROMLIB_OBJ) $(MAP_C) lowglobals.s \
|
||||
@ -285,7 +285,7 @@ syserr.o: include/rsys/version.h
|
||||
toolevent.o: include/rsys/version.h
|
||||
|
||||
mkvol.o: $(SRC_DIR)/mkvol/mkvol.c $(SRC_DIR)/mkvol/mkvol.h
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) $(CFLAGS) -c $(SRC_DIR)/mkvol/mkvol.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) $(CFLAGS) -c $(SRC_DIR)/mkvol/mkvol.c
|
||||
|
||||
dcconvert.o: dcconvert.c
|
||||
$(TARGET_GCC) $(TARGET_CFLAGS) @egcs_dcconvert_workaround@ -c -o $*.o $(SRC_DIR)/dcconvert.c
|
||||
$(HOST_GCC) $(HOST_CFLAGS) @egcs_dcconvert_workaround@ -c -o $*.o $(SRC_DIR)/dcconvert.c
|
||||
|
@ -11,13 +11,13 @@
|
||||
/* #include this second, so we know what release type we are. */
|
||||
#include "rsys/release.h"
|
||||
|
||||
#if defined (COMPILE_FOR_HOST)
|
||||
#if defined (COMPILE_FOR_BUILD)
|
||||
#include "build-os-config.h"
|
||||
#include "build-arch-config.h"
|
||||
#else /* !COMPILE_FOR_BUILD */
|
||||
#include "host-os-config.h"
|
||||
#include "host-arch-config.h"
|
||||
#else /* !COMPILE_FOR_HOST */
|
||||
#include "target-os-config.h"
|
||||
#include "target-arch-config.h"
|
||||
#endif /* !COMPILE_FOR_HOST */
|
||||
#endif /* !COMPILE_FOR_BUILD */
|
||||
|
||||
#if !defined (CYGWIN32) && defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
#undef USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES
|
||||
@ -43,7 +43,7 @@
|
||||
#include "rsys/lowglobals.h"
|
||||
#endif
|
||||
|
||||
#if !defined (COMPILE_FOR_HOST)
|
||||
#if !defined (COMPILE_FOR_BUILD)
|
||||
#include "front-end-config.h"
|
||||
#endif
|
||||
|
||||
|
@ -3,16 +3,16 @@
|
||||
# usage: ./configure.sh [options]
|
||||
# options:
|
||||
# --cflags='flags' (default "-g")
|
||||
# --target='target' (no default)
|
||||
# --target-file-format='format (no default)
|
||||
# --host='host' (no default)
|
||||
# --target-gcc='gcc' (default "gcc", if host and target are same)
|
||||
# --target-strip='strip' (default "strip")
|
||||
# --target-nm='nm' (default "nm")
|
||||
# --host-file-format='format (no default)
|
||||
# --build='build' (no default)
|
||||
# --host-gcc='gcc' (default "gcc", if build and host are same)
|
||||
# --host-strip='strip' (default "strip")
|
||||
# --host-nm='nm' (default "nm")
|
||||
# --root='dir' (default "..")
|
||||
# --front-end='front-end'
|
||||
# one of `x', `nextstep', `dos', `svgalib', `win32', 'sdl' (no default)
|
||||
# --syn68k-target='target'
|
||||
# --syn68k-host='host'
|
||||
# --sound='sound'
|
||||
|
||||
cflags='-g'
|
||||
@ -44,29 +44,29 @@ while [ $# != 0 ]; do
|
||||
"root")
|
||||
root="${val}"
|
||||
;;
|
||||
"target")
|
||||
target="${val}"
|
||||
;;
|
||||
"target_gcc")
|
||||
target_gcc="${val}"
|
||||
;;
|
||||
"target_strip")
|
||||
target_strip="${val}"
|
||||
;;
|
||||
"target_nm")
|
||||
target_nm="${val}"
|
||||
;;
|
||||
"host")
|
||||
host="${val}"
|
||||
;;
|
||||
"host_gcc")
|
||||
host_gcc="${val}"
|
||||
;;
|
||||
"host_strip")
|
||||
host_strip="${val}"
|
||||
;;
|
||||
"host_nm")
|
||||
host_nm="${val}"
|
||||
;;
|
||||
"build")
|
||||
build="${val}"
|
||||
;;
|
||||
"front_end")
|
||||
front_end="${val}"
|
||||
;;
|
||||
"target_file_format")
|
||||
target_file_format="${val}"
|
||||
"host_file_format")
|
||||
host_file_format="${val}"
|
||||
;;
|
||||
"syn68k_target")
|
||||
syn68k_target="${val}"
|
||||
"syn68k_host")
|
||||
syn68k_host="${val}"
|
||||
;;
|
||||
"sound")
|
||||
sound="${val}"
|
||||
@ -84,8 +84,8 @@ done
|
||||
|
||||
util_dir=${root}/util
|
||||
|
||||
if [ "${target}" = "" ]; then
|
||||
echo "Fatal error: you must specify a target. Exiting."
|
||||
if [ "${host}" = "" ]; then
|
||||
echo "Fatal error: you must specify a host. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -94,15 +94,15 @@ if [ "${front_end}" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${host}" = "" ]; then
|
||||
echo "You did not specify a host. Taking a guess."
|
||||
host=`${root}/util/config.guess`
|
||||
if [ "${build}" = "" ]; then
|
||||
echo "You did not specify a build. Taking a guess."
|
||||
build=`${root}/util/config.guess`
|
||||
|
||||
if [ "${host}" = "" ]; then
|
||||
echo "config.guess failed to determine the host type. Exiting."
|
||||
if [ "${build}" = "" ]; then
|
||||
echo "config.guess failed to determine the build type. Exiting."
|
||||
exit 1
|
||||
else
|
||||
echo "This appears to be a \`${host}'."
|
||||
echo "This appears to be a \`${build}'."
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -124,56 +124,56 @@ case "${sound}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# canonicalize the name of the target; this should
|
||||
# give us the name used for tool configuration
|
||||
if canonical_target=`${root}/util/config.sub "${target}"` ; then : ; else
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# canonicalize the name of the host; this should
|
||||
# give us the name used for tool configuration
|
||||
if canonical_host=`${root}/util/config.sub "${host}"` ; then : ; else
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ "${target_gcc}" = "" ]; then
|
||||
if [ "${canonical_target}" = "${canonical_host}" ]; then
|
||||
target_gcc=gcc
|
||||
# canonicalize the name of the build; this should
|
||||
# give us the name used for tool configuration
|
||||
if canonical_build=`${root}/util/config.sub "${build}"` ; then : ; else
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ "${host_gcc}" = "" ]; then
|
||||
if [ "${canonical_host}" = "${canonical_build}" ]; then
|
||||
host_gcc=gcc
|
||||
else
|
||||
echo "Fatal error: target and host differ, target gcc must by specified. Exiting."
|
||||
echo "Fatal error: host and build differ, host gcc must by specified. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${target_nm}" = "" ]; then
|
||||
target_nm=nm
|
||||
if [ "${host_nm}" = "" ]; then
|
||||
host_nm=nm
|
||||
fi
|
||||
|
||||
if [ "${target_strip}" = "" ]; then
|
||||
target_strip=strip
|
||||
if [ "${host_strip}" = "" ]; then
|
||||
host_strip=strip
|
||||
fi
|
||||
|
||||
case ${canonical_target} in
|
||||
case ${canonical_host} in
|
||||
m68k-next-ns* | m68k-next-bsd* | m68k-next-mach* | m68k-next-nextstep*)
|
||||
target_os='next'
|
||||
target_syn68k='next'
|
||||
target_arch='m68k'
|
||||
target_file_format='mach-o'
|
||||
host_os='next'
|
||||
host_syn68k='next'
|
||||
host_arch='m68k'
|
||||
host_file_format='mach-o'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-next-ns* | i[3456]86-next-bsd* | i[3456]86-next-mach* \
|
||||
| i[3456]86-next-nextstep*)
|
||||
target_os='next'
|
||||
target_syn68k='next'
|
||||
target_arch='i386'
|
||||
target_file_format='mach-o'
|
||||
host_os='next'
|
||||
host_syn68k='next'
|
||||
host_arch='i386'
|
||||
host_file_format='mach-o'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-msdos-go32 | i[3456]86-go32-bsd | i[3456]86-unknown-msdos)
|
||||
target_os='msdos'
|
||||
target_syn68k='msdos'
|
||||
target_file_format='coff'
|
||||
target_arch='i386'
|
||||
host_os='msdos'
|
||||
host_syn68k='msdos'
|
||||
host_file_format='coff'
|
||||
host_arch='i386'
|
||||
;;
|
||||
|
||||
# NOTE: Historically we've used mingw32 but called it cygwin. The reason
|
||||
@ -182,105 +182,58 @@ case ${canonical_target} in
|
||||
# cygwin to mingw32 everywhere right now (20031217).
|
||||
|
||||
i[3456]86-pc-mingw32)
|
||||
target_os='cygwin32'
|
||||
target_syn68k='mingw32'
|
||||
echo target os set to cygwin32 which is a misnomer. this really is mingw32
|
||||
target_file_format='pe'
|
||||
target_arch='i386'
|
||||
host_os='cygwin32'
|
||||
host_syn68k='mingw32'
|
||||
echo host os set to cygwin32 which is a misnomer. this really is mingw32
|
||||
host_file_format='pe'
|
||||
host_arch='i386'
|
||||
;;
|
||||
i[3456]86-pc-cygwin32)
|
||||
target_os='cygwin32'
|
||||
target_syn68k='cygwin32'
|
||||
target_file_format='pe'
|
||||
target_arch='i386'
|
||||
;;
|
||||
alpha-unknown-linux)
|
||||
target_os='linux'
|
||||
target_syn68k='linux'
|
||||
target_file_format='elf'
|
||||
target_arch='alpha'
|
||||
;;
|
||||
powerpc-unknown-linux)
|
||||
target_os='linux'
|
||||
target_syn68k='linux'
|
||||
target_file_format='elf'
|
||||
target_arch='powerpc'
|
||||
;;
|
||||
i[3456]86-unknown-linux)
|
||||
target_os='linux'
|
||||
target_syn68k='linux'
|
||||
target_arch='i386'
|
||||
if [ x"${target_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
target_file_format='a.out'
|
||||
fi
|
||||
;;
|
||||
i[456]86-unknown-macosx)
|
||||
target_os='macosx'
|
||||
target_syn68k='macosx'
|
||||
target_arch='i386'
|
||||
if [ x"${target_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
target_file_format='mach-o'
|
||||
fi
|
||||
;;
|
||||
|
||||
powerpc-unknown-macosx)
|
||||
target_os='macosx'
|
||||
target_syn68k='macosx'
|
||||
target_arch='powerpc' # how we refer to it
|
||||
target_gcc_arch='ppc' # how gcc -arch wants us to call it
|
||||
if [ x"${target_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
target_file_format='mach-o'
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Fatal error: unknown target \`${canonical_target}'. Exiting."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${canonical_host} in
|
||||
m68k-next-ns* | m68k-next-bsd* | m68k-next-mach* \
|
||||
| m68k-next-nextstep*)
|
||||
host_os='next'
|
||||
host_arch='m68k'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-next-ns* | i[3456]86-next-bsd* | i[3456]86-next-mach* \
|
||||
| i[3456]86-next-nextstep*)
|
||||
host_os='next'
|
||||
host_arch='i386'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-msdos-go32 | i[3456]86-go32-bsd | i[3456]86-unknown-msdos)
|
||||
host_os='msdos'
|
||||
host_os='cygwin32'
|
||||
host_syn68k='cygwin32'
|
||||
host_file_format='pe'
|
||||
host_arch='i386'
|
||||
;;
|
||||
alpha-unknown-linux)
|
||||
host_os='linux'
|
||||
host_syn68k='linux'
|
||||
host_file_format='elf'
|
||||
host_arch='alpha'
|
||||
;;
|
||||
powerpc-unknown-linux)
|
||||
host_os='linux'
|
||||
host_syn68k='linux'
|
||||
host_file_format='elf'
|
||||
host_arch='powerpc'
|
||||
;;
|
||||
i[3456]86-unknown-linux)
|
||||
host_os='linux'
|
||||
host_syn68k='linux'
|
||||
host_arch='i386'
|
||||
if [ x"${host_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
host_file_format='a.out'
|
||||
fi
|
||||
;;
|
||||
i[456]86-unknown-macosx)
|
||||
host_os='macosx'
|
||||
host_syn68k='macosx'
|
||||
host_arch='i386'
|
||||
objc='yes'
|
||||
if [ x"${host_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
host_file_format='mach-o'
|
||||
fi
|
||||
;;
|
||||
|
||||
powerpc-unknown-macosx)
|
||||
host_os='macosx'
|
||||
host_arch='powerpc'
|
||||
objc='yes'
|
||||
host_syn68k='macosx'
|
||||
host_arch='powerpc' # how we refer to it
|
||||
host_gcc_arch='ppc' # how gcc -arch wants us to call it
|
||||
if [ x"${host_file_format}" = x"" ]; then
|
||||
# default linux file format; this may change
|
||||
host_file_format='mach-o'
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -289,44 +242,91 @@ case ${canonical_host} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# check for the target directories
|
||||
target_arch_dir=${root}/src/config/arch/${target_arch}
|
||||
if [ ! -d ${target_arch_dir} ]; then
|
||||
echo "Fatal error: target arch directory \`${target_arch_dir}' not found. Exiting."
|
||||
case ${canonical_build} in
|
||||
m68k-next-ns* | m68k-next-bsd* | m68k-next-mach* \
|
||||
| m68k-next-nextstep*)
|
||||
build_os='next'
|
||||
build_arch='m68k'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-next-ns* | i[3456]86-next-bsd* | i[3456]86-next-mach* \
|
||||
| i[3456]86-next-nextstep*)
|
||||
build_os='next'
|
||||
build_arch='i386'
|
||||
objc='yes'
|
||||
;;
|
||||
i[3456]86-msdos-go32 | i[3456]86-go32-bsd | i[3456]86-unknown-msdos)
|
||||
build_os='msdos'
|
||||
build_arch='i386'
|
||||
;;
|
||||
alpha-unknown-linux)
|
||||
build_os='linux'
|
||||
build_arch='alpha'
|
||||
;;
|
||||
powerpc-unknown-linux)
|
||||
build_os='linux'
|
||||
build_arch='powerpc'
|
||||
;;
|
||||
i[3456]86-unknown-linux)
|
||||
build_os='linux'
|
||||
build_arch='i386'
|
||||
;;
|
||||
i[456]86-unknown-macosx)
|
||||
build_os='macosx'
|
||||
build_arch='i386'
|
||||
objc='yes'
|
||||
;;
|
||||
|
||||
powerpc-unknown-macosx)
|
||||
build_os='macosx'
|
||||
build_arch='powerpc'
|
||||
objc='yes'
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Fatal error: unknown build \`${canonical_build}'. Exiting."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# check for the host directories
|
||||
host_arch_dir=${root}/src/config/arch/${host_arch}
|
||||
if [ ! -d ${host_arch_dir} ]; then
|
||||
echo "Fatal error: host arch directory \`${host_arch_dir}' not found. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
target_os_dir=${root}/src/config/os/${target_os}
|
||||
if [ ! -d ${target_os_dir} ]; then
|
||||
echo "Fatal error: target os directory \`${target_os_dir}' not found. Exiting."
|
||||
host_os_dir=${root}/src/config/os/${host_os}
|
||||
if [ ! -d ${host_os_dir} ]; then
|
||||
echo "Fatal error: host os directory \`${host_os_dir}' not found. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -r ${root}/src/config/os/${target_os}/${target_os}.make ]; then
|
||||
if [ -r ${root}/src/config/os/${host_os}/${host_os}.make ]; then
|
||||
|
||||
if [ -r ${root}/src/config/os/${target_os}/${target_os}.sh ]; then
|
||||
${root}/src/config/os/${target_os}/${target_os}.sh \
|
||||
"${target_gcc}" \
|
||||
if [ -r ${root}/src/config/os/${host_os}/${host_os}.sh ]; then
|
||||
${root}/src/config/os/${host_os}/${host_os}.sh \
|
||||
"${host_gcc}" \
|
||||
"${cflags}" \
|
||||
${root}/src/config/os/${target_os}/${target_os}.make \
|
||||
__config__.target_os.make
|
||||
${root}/src/config/os/${host_os}/${host_os}.make \
|
||||
__config__.host_os.make
|
||||
|
||||
if [ $? != "0" ]; then
|
||||
echo "Fatal error: target os configuration failed. Exiting."
|
||||
echo "Fatal error: host os configuration failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
target_os_make=__config__.target_os.make
|
||||
host_os_make=__config__.host_os.make
|
||||
else
|
||||
target_os_make=${root}/src/config/os/${target_os}/${target_os}.make
|
||||
host_os_make=${root}/src/config/os/${host_os}/${host_os}.make
|
||||
fi
|
||||
else
|
||||
target_os_make="/dev/null"
|
||||
host_os_make="/dev/null"
|
||||
fi
|
||||
|
||||
if [ -r ${root}/src/config/arch/${target_arch}/${target_arch}.make ]; then
|
||||
target_arch_make=${root}/src/config/arch/${target_arch}/${target_arch}.make
|
||||
if [ -r ${root}/src/config/arch/${host_arch}/${host_arch}.make ]; then
|
||||
host_arch_make=${root}/src/config/arch/${host_arch}/${host_arch}.make
|
||||
else
|
||||
target_arch_make="/dev/null"
|
||||
host_arch_make="/dev/null"
|
||||
fi
|
||||
|
||||
if [ -r ${root}/src/config/front-ends/${front_end}/${front_end}.sh ]; then
|
||||
@ -335,7 +335,7 @@ if [ -r ${root}/src/config/front-ends/${front_end}/${front_end}.sh ]; then
|
||||
|
||||
# there must be a front-end makefile fragment
|
||||
${root}/src/config/front-ends/${front_end}/${front_end}.sh \
|
||||
"${target_gcc}" \
|
||||
"${host_gcc}" \
|
||||
"${cflags}" \
|
||||
${root}/src/config/front-ends/${front_end}/${front_end}.make \
|
||||
__config__.front_end.make
|
||||
@ -357,13 +357,13 @@ front_end_config_h=${root}/src/config/front-ends/${front_end}/${front_end}.h
|
||||
if [ -r ${root}/src/config/sound/${sound}/${sound}.make ]; then
|
||||
if [ -r ${root}/src/config/sound/${sound}/${sound}.sh ]; then
|
||||
${root}/src/config/sound/${sound}/${sound}.sh \
|
||||
"${target_gcc}" \
|
||||
"${host_gcc}" \
|
||||
"${cflags}" \
|
||||
${root}/src/config/sound/${sound}/${sound}.make \
|
||||
__config__.sound.make
|
||||
|
||||
if [ $? != "0" ]; then
|
||||
echo "Fatal error: target os configuration failed. Exiting."
|
||||
echo "Fatal error: host os configuration failed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
sound_make=__config__.sound.make
|
||||
@ -381,15 +381,15 @@ rm -f front-end-config.h
|
||||
ln -s ${front_end_config_h} front-end-config.h
|
||||
|
||||
# arch determines syn68k usage
|
||||
rm -f target-arch-config.h
|
||||
if [ -r ${root}/src/config/arch/${target_arch}/${target_arch}.h ]; then
|
||||
target_arch_h=${root}/src/config/arch/${target_arch}/${target_arch}.h
|
||||
rm -f host-arch-config.h
|
||||
if [ -r ${root}/src/config/arch/${host_arch}/${host_arch}.h ]; then
|
||||
host_arch_h=${root}/src/config/arch/${host_arch}/${host_arch}.h
|
||||
|
||||
ln -s ${target_arch_h} target-arch-config.h
|
||||
ln -s ${host_arch_h} host-arch-config.h
|
||||
|
||||
cat > ./test.c.sed << __EOF__
|
||||
#include <stdio.h>
|
||||
#include "@target_arch_h@"
|
||||
#include "@host_arch_h@"
|
||||
|
||||
int main ()
|
||||
{
|
||||
@ -403,7 +403,7 @@ int main ()
|
||||
}
|
||||
__EOF__
|
||||
|
||||
sed -e "s:@target_arch_h@:${target_arch_h}:" \
|
||||
sed -e "s:@host_arch_h@:${host_arch_h}:" \
|
||||
< ./test.c.sed > ./test.c
|
||||
|
||||
gcc -I${root}/src/include -o ./test ./test.c
|
||||
@ -414,34 +414,12 @@ __EOF__
|
||||
fi
|
||||
|
||||
rm -f ./test.c.sed ./test.c ./test
|
||||
else
|
||||
# create an empty `target-arch-config.h'
|
||||
touch target-arch-config.h
|
||||
|
||||
target_conf_h=""
|
||||
syn68k=''
|
||||
fi
|
||||
|
||||
rm -f target-os-config.h
|
||||
if [ -r ${root}/src/config/os/${target_os}/${target_os}.h ]; then
|
||||
target_os_h=${root}/src/config/os/${target_os}/${target_os}.h
|
||||
|
||||
ln -s ${target_os_h} target-os-config.h
|
||||
else
|
||||
# create an empty `target-os-config.h'
|
||||
touch target-os-config.h
|
||||
target_os_h=""
|
||||
fi
|
||||
|
||||
rm -f host-arch-config.h
|
||||
if [ -r ${root}/src/config/arch/${host_arch}/${host_arch}.h ]; then
|
||||
host_arch_h=${root}/src/config/arch/${host_arch}/${host_arch}.h
|
||||
|
||||
ln -s ${host_arch_h} host-arch-config.h
|
||||
else
|
||||
# create an empty `host-arch-config.h'
|
||||
touch host-arch-config.h
|
||||
host_arch_h=""
|
||||
|
||||
host_conf_h=""
|
||||
syn68k=''
|
||||
fi
|
||||
|
||||
rm -f host-os-config.h
|
||||
@ -455,6 +433,28 @@ else
|
||||
host_os_h=""
|
||||
fi
|
||||
|
||||
rm -f build-arch-config.h
|
||||
if [ -r ${root}/src/config/arch/${build_arch}/${build_arch}.h ]; then
|
||||
build_arch_h=${root}/src/config/arch/${build_arch}/${build_arch}.h
|
||||
|
||||
ln -s ${build_arch_h} build-arch-config.h
|
||||
else
|
||||
# create an empty `build-arch-config.h'
|
||||
touch build-arch-config.h
|
||||
build_arch_h=""
|
||||
fi
|
||||
|
||||
rm -f build-os-config.h
|
||||
if [ -r ${root}/src/config/os/${build_os}/${build_os}.h ]; then
|
||||
build_os_h=${root}/src/config/os/${build_os}/${build_os}.h
|
||||
|
||||
ln -s ${build_os_h} build-os-config.h
|
||||
else
|
||||
# create an empty `build-os-config.h'
|
||||
touch build-os-config.h
|
||||
build_os_h=""
|
||||
fi
|
||||
|
||||
rm -f sound-config.h
|
||||
if [ -r ${root}/src/config/sound/${sound}/${sound}-sound.h ]; then
|
||||
sound_h=${root}/src/config/sound/${sound}/${sound}-sound.h
|
||||
@ -470,21 +470,21 @@ if [ x"${syn68k}" = x"yes" ]; then
|
||||
# syn68k_define='-DSYN68K'
|
||||
syn68k_define=''
|
||||
syn68k_lib='libsyn68k.a'
|
||||
if [ x$syn68k_target = x"" ]; then
|
||||
syn68k_target="${target_arch}-${target_syn68k}-${target_file_format}"
|
||||
if [ x$syn68k_host = x"" ]; then
|
||||
syn68k_host="${host_arch}-${host_syn68k}-${host_file_format}"
|
||||
fi
|
||||
else
|
||||
syn68k_define=''
|
||||
syn68k_lib=''
|
||||
syn68k_target=''
|
||||
syn68k_host=''
|
||||
fi
|
||||
|
||||
cat > ./test.c << __EOF__
|
||||
int foo;
|
||||
__EOF__
|
||||
|
||||
${target_gcc} -c test.c
|
||||
symbol=`${target_nm} test.o | awk '/foo/ { print $3; }'`
|
||||
${host_gcc} -c test.c
|
||||
symbol=`${host_nm} test.o | awk '/foo/ { print $3; }'`
|
||||
case ${symbol} in
|
||||
_foo)
|
||||
symbol_prefix='_'
|
||||
@ -499,37 +499,37 @@ esac
|
||||
|
||||
rm -f ./test.c ./test.o
|
||||
|
||||
if ${target_gcc} --version | egrep -q 'egcs-2\.91'; then
|
||||
if ${host_gcc} --version | egrep -q 'egcs-2\.91'; then
|
||||
egcs_dcconvert_workaround=-fno-omit-frame-pointer
|
||||
else
|
||||
egcs_dcconvert_workaround=
|
||||
fi
|
||||
|
||||
${util_dir}/subst.pl \
|
||||
@target_arch_make@:${target_arch_make} \
|
||||
@target_os_make@:${target_os_make} \
|
||||
@host_arch_make@:${host_arch_make} \
|
||||
@host_os_make@:${host_os_make} \
|
||||
@front_end_make@:${front_end_make} \
|
||||
@sound_make@:${sound_make} \
|
||||
@executor_make@:${executor_make} < ${root}/src/config/Makefile.in > ./tmp-Makefile.in
|
||||
|
||||
if [ x"${target_gcc_arch}" = x"" ]; then
|
||||
target_gcc_arch="$target_arch"
|
||||
if [ x"${host_gcc_arch}" = x"" ]; then
|
||||
host_gcc_arch="$host_arch"
|
||||
fi
|
||||
|
||||
sed -e "s:@symbol_prefix@:${symbol_prefix}:g
|
||||
|
||||
s:@target@:${target}:g
|
||||
s:@canonical_target@:${canonical_target}:g
|
||||
s:@target_arch@:${target_arch}:g
|
||||
s:@target_os@:${target_os}:g
|
||||
s:@target_gcc@:${target_gcc}:g
|
||||
s:@target_strip@:${target_strip}:g
|
||||
s:@target_file_format@:${target_file_format}:g
|
||||
|
||||
s:@host@:${host}:g
|
||||
s:@canonical_host@:${canonical_host}:g
|
||||
s:@host_arch@:${host_arch}:g
|
||||
s:@host_os@:${host_os}:g
|
||||
s:@host_gcc@:${host_gcc}:g
|
||||
s:@host_strip@:${host_strip}:g
|
||||
s:@host_file_format@:${host_file_format}:g
|
||||
|
||||
s:@build@:${build}:g
|
||||
s:@canonical_build@:${canonical_build}:g
|
||||
s:@build_arch@:${build_arch}:g
|
||||
s:@build_os@:${build_os}:g
|
||||
|
||||
s:@front_end@:${front_end}:g
|
||||
s:@sound@:${sound}:g
|
||||
@ -537,10 +537,10 @@ sed -e "s:@symbol_prefix@:${symbol_prefix}:g
|
||||
s:@root@:${root}:g
|
||||
s:@syn68k_define@:${syn68k_define}:g
|
||||
s:@syn68k_lib@:${syn68k_lib}:g
|
||||
s:@syn68k_target@:${syn68k_target}:g
|
||||
s:@syn68k_host@:${syn68k_host}:g
|
||||
s:@cflags@:${cflags}:g
|
||||
s:@egcs_dcconvert_workaround@:${egcs_dcconvert_workaround}:g
|
||||
s:@arch@:${target_gcc_arch}:g" < ./tmp-Makefile.in > ./Makefile
|
||||
s:@arch@:${host_gcc_arch}:g" < ./tmp-Makefile.in > ./Makefile
|
||||
rm -f ./tmp-Makefile.in
|
||||
|
||||
if [ x"${syn68k}" = x"yes" ]; then
|
||||
@ -577,4 +577,4 @@ echo "${root}/util/configure.sh $arguments" >> config.status
|
||||
|
||||
chmod +x config.status
|
||||
|
||||
echo "Executor is now configured for \`${target_arch}-${target_os}/${front_end}'."
|
||||
echo "Executor is now configured for \`${host_arch}-${host_os}/${front_end}'."
|
||||
|
Loading…
Reference in New Issue
Block a user