GNU Build system appears to work for hardcoded SDL front end and SDL sound.

This commit is contained in:
Clifford T. Matthews 2009-06-20 07:27:44 -06:00
parent 058ad8d226
commit edb51b569f
7 changed files with 119 additions and 21 deletions

View File

@ -2,7 +2,7 @@
bin_PROGRAMS = executor
noinst_PROGRAMS = map_to_c mkseedtables mkultable mksspairtable
noinst_PROGRAMS = map_to_c mkseedtables mkultable mksspairtable opfind
ctl_bitmap_c_files = arrow_up_active.c arrow_up_inactive.c \
arrow_down_active.c arrow_down_inactive.c \
@ -33,6 +33,10 @@ mkultable_SOURCES = mkultable.c
mksspairtable_SOURCES = mksspairtable.c
opfind_SOURCES = config/arch/i386/opfind.c
opfind_CPPFLAGS = -DCOMPILE_FOR_BUILD $(AM_CPPFLAGS)
seedtables.c: mkseedtables
./mkseedtables > $@
@ -85,7 +89,7 @@ qd_sources = qBit.c qCConv.c qCGrafPort.c qCRegular.c qColor.c qColorMgr.c \
qColorutil.c qCursor.c qGrafport.c qIMIV.c qIMV.c qIMVxfer.c \
qMisc.c qPaletteMgr.c qPen.c qPicstuff.c qPicture.c \
qPixMapConv.c qPoint.c qPoly.c qRect.c qRegion.c qRegular.c \
qScale.c qStandard.c qStdArc.c qStdBits.c qStdLine.cq qStdOval.c \
qScale.c qStandard.c qStdArc.c qStdBits.c qStdLine.c qStdOval.c \
qStdPic.c qStdPoly.c qStdRRect.c qStdRect.c qStdRgn.c \
qStdText.c qText.c qGWorld.c qGDevice.c qIMVI.c qHooks.c \
xdata.c xdblt.c rawpatblt.c rawsrcblt.c dirtyrect.c srcblt.c \
@ -121,14 +125,70 @@ misc_sources = desk.c device.c disk.c diskinit.c dump.c trapname.c font.c \
splash.c icon.c redrawscreen.c ini.c checkpoint.c qt.c cleanup.c \
paramline.c fauxdbm.c custom.c commtool.c cfm.c local_charset.c pef_hash.c \
interfacelib.c mixed_mode.c suffix_maps.c appearance.c lockrange.c \
emutrap.c emutraptables.c emustubs.c
emutrap.c emutraptables.c emustubs.c unix_like.c parse.y check_structs.c \
executor.c mkvol/mkvol.c crc.c
front_end_sdl_sources = config/front-ends/sdl/SDL_bmp.c \
config/front-ends/sdl/sdlevents.c \
config/front-ends/sdl/sdl_mem.c \
config/front-ends/sdl/sdlquit.c \
config/front-ends/sdl/sdlscrap.c \
config/front-ends/sdl/sdlwin.c \
config/front-ends/sdl/sdlwm.c \
config/front-ends/sdl/sdlX.c \
config/front-ends/sdl/syswm_map.c \
config/front-ends/sdl/winmain.c
sound_sdl_sources = config/sound/sdl/sdl-sound.c
os_linux_sources = config/os/linux/linux.c \
config/os/linux/linux_except.c \
config/os/linux/lowglobals-mem.c
arch_i386_sources = config/arch/i386/x86patblt.S \
config/arch/i386/x86srcblt.S \
config/arch/i386/xdstubtables.c \
config/arch/i386/sbstubtables.c \
config/arch/i386/i386.c
x86patblt.$(OBJEXT): pat-blitters.s
x86srcblt.$(OBJEXT): src-blitters.s
pat-blitters-stamp pat-blitters.h pat-blitters.s: \
config/arch/i386/opfind.c config/arch/i386/opfind.h \
config/arch/i386/metaasm.pl config/arch/i386/pat-blitters.meta
$(srcdir)/config/arch/i386/metaasm.pl $(METAASM_ARGS)\
$(srcdir)/config/arch/i386/pat-blitters.meta\
pat-blitters.s pat-blitters.h\
config/arch/i386/opfind.c
$(RM) opfind asmsamples.h
touch pat-blitters-stamp
# We have src-blitters-stamp depend on pat-blitters-stamp so we don't
# try to do two metaasm's at once. They would fight over `opfind'.
src-blitters-stamp src-blitters.h src-blitters.s: \
config/arch/i386/opfind.c config/arch/i386/opfind.h \
config/arch/i386/metaasm.pl \
config/arch/i386/src-blitters.meta \
config/arch/i386/src-shift.meta \
config/arch/i386/src-noshift.meta \
config/arch/i386/src-shift-fgbk.meta \
config/arch/i386/src-noshift-fgbk.meta \
pat-blitters-stamp config/arch/i386/src-blitters-core.meta
$(srcdir)/config/arch/i386/metaasm.pl -define DST_SEG= $(METAASM_ARGS)\
$(srcdir)/config/arch/i386/src-blitters.meta\
src-blitters.s src-blitters.h\
config/arch/i386/opfind.c
$(RM) opfind
touch src-blitters-stamp
executor_SOURCES = $(ctl_sources) $(dial_sources) $(file_sources) \
$(hfs_sources) $(list_sources) $(menu_sources) \
$(print_sources) $(qd_sources) $(res_sources) \
$(te_sources) $(wind_sources) $(ae_sources) \
$(sound_sources) $(num_sources) $(misc_sources)
$(sound_sources) $(num_sources) $(misc_sources) \
$(front_end_sdl_sources) $(sound_sdl_sources) \
$(os_linux_sources) $(arch_i386_sources)
AM_CPPFLAGS=-I$(srcdir)/include -I$(srcdir)/config/front-ends/$(front_end) -I$(srcdir)/config/os/$(host_os) -I$(srcdir)/config/arch/$(host_cpu)

View File

@ -1,7 +1,21 @@
Make it so people can select the front-end and the sound, but that
we default to SDL if it's available
GNU build fixes
Make it so people can select the front-end and the
sound, but that we default to SDL if it's available
Make it so if we don't find libsyn68k, we die properly
(unless we're on a 68k)
See if there's a more elegant way to identify the build
parameters than our current per-target override using
-DCOMPILE_FOR_BUILD
See if there's a more elegant solution to the blitters
code (can we nuke the config/arch/i386 prefixes in the
dependencies? should we make it so both source and pattern
blitters can be done in parallel?
test parallel builds
CToPascalCall -- look hard for arguments that sometimes take a pointer
and sometimes take a long

View File

@ -162,8 +162,8 @@ os_init (void)
void
msdos_print_info (void)
{
printf ("This is %s, compiled %s.\n",
ROMlib_executor_full_name, ROMlib_executor_build_time);
printf ("This is %s.\n",
ROMlib_executor_full_name);
/* Print out CPU type. */
if (arch_type == ARCH_TYPE_I386)

View File

@ -12,6 +12,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
AM_PROG_AS
AC_PROG_YACC
AC_CHECK_PROG([PERL], [perl], [perl])
AC_ARG_VAR([PERL], [perl for generating blitters])
@ -22,23 +23,47 @@ AC_SYS_LARGEFILE
AC_CHECK_LIB(syn68k, initialize_68k_emulator)
# TODO: may not want to look for SDL if people have chosen an alternate
# front-end.
# Right now we blindly look for the libraries we need for the SDL Linux
# port since that's the first one I'll get going with the this file.
AC_CHECK_LIB(sdl, SDL_Init)
AC_CHECK_LIB(SDL, SDL_Init)
AC_CHECK_LIB(db, __db_ndbm_open)
AC_CHECK_LIB(X11, XInitThreads)
AC_CHECK_LIB(m, pow)
AC_CONFIG_FILES([Makefile])
# Normalize to our old names
case ${build_cpu} in
i[[3456]]86)
build_cpu=i386
;;
esac
case ${host_cpu} in
i[[3456]]86)
host_cpu=i386
;;
esac
case ${build_os} in
darwin*)
build_os=macosx
;;
linux*)
build_os=linux
;;
esac
case ${host_os} in
darwin*)
host_os=macosx
;;
linux*)
host_os=linux
;;
esac
# This is a temporary cheat that forces us to use SDL.

View File

@ -278,11 +278,11 @@ err_vprintf (const char *fmt, va_list ap)
if (!beenhere_p)
{
fprintf (fp,
"This is %s, compiled %s.\n"
"This is %s.\n"
"Using %u.%02u MB for applzone, "
"%u.%02u MB for syszone, %u.%02u MB for stack\n"
"Approximate command line: %s\n",
ROMlib_executor_full_name, ROMlib_executor_build_time,
ROMlib_executor_full_name,
ROMlib_applzone_size / MB,
(ROMlib_applzone_size % MB) * 100 / MB,
ROMlib_syszone_size / MB,

View File

@ -23,7 +23,6 @@
extern const char ROMlib_executor_version[];
extern char *ROMlib_executor_full_name;
extern const char ROMlib_executor_build_time[];
#define PLATFORM_MOD 10 /* last decimal digit of serial number is platform */
#define COMPOSITE_MOD 100 /* 2nd to last digit is price class */

View File

@ -1052,8 +1052,8 @@ parse_drive_opt (const char *opt_name, const char *opt_value)
static void
print_info (void)
{
printf ("This is %s, compiled %s.\n",
ROMlib_executor_full_name, ROMlib_executor_build_time);
printf ("This is %s, compiled.\n",
ROMlib_executor_full_name);
#if defined (i386)
/* Print out CPU type. */