From 80399941b221fe634ef2133bdcbfb6f8cab28104 Mon Sep 17 00:00:00 2001 From: Seth Polsley Date: Mon, 6 Jul 2020 18:47:26 -0500 Subject: [PATCH] Cleaning up build scripts with Bincue for Windows and *nix --- BasiliskII/src/Unix/Makefile.in | 2 +- BasiliskII/src/Unix/configure.ac | 2 +- BasiliskII/src/Windows/Makefile.in | 8 +++++++- BasiliskII/src/Windows/configure.ac | 17 +++++++++++++++++ SheepShaver/src/Unix/Makefile.in | 2 +- SheepShaver/src/Unix/configure.ac | 2 +- SheepShaver/src/Windows/Makefile.in | 10 ++++++++-- SheepShaver/src/Windows/configure.ac | 17 +++++++++++++++++ 8 files changed, 53 insertions(+), 7 deletions(-) diff --git a/BasiliskII/src/Unix/Makefile.in b/BasiliskII/src/Unix/Makefile.in index 42f1b049..1b911c68 100644 --- a/BasiliskII/src/Unix/Makefile.in +++ b/BasiliskII/src/Unix/Makefile.in @@ -100,7 +100,7 @@ define GUI_SRCS_LIST_TO_OBJS endef GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) ifeq ($(USE_BINCUE),yes) -GUI_OBJS += bincue_unix.o +GUI_OBJS += bincue.o endif GUI_SRCS := $(GUI_SRCS:%=@top_srcdir@/%) diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index b3bfc3b9..2c29cd70 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -898,7 +898,7 @@ fi dnl BINCUE overrides if [[ "x$have_bincue" = "xyes" ]]; then - EXTRASYSSRCS="$EXTRASYSSRCS bincue_unix.cpp" + EXTRASYSSRCS="$EXTRASYSSRCS bincue.cpp" fi dnl libvhd overrides diff --git a/BasiliskII/src/Windows/Makefile.in b/BasiliskII/src/Windows/Makefile.in index 156d1f81..663db7fb 100755 --- a/BasiliskII/src/Windows/Makefile.in +++ b/BasiliskII/src/Windows/Makefile.in @@ -31,6 +31,8 @@ SLIRP_SRCS = \ ../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=$(OBJ_DIR)/slirp-%.o) +USE_BINCUE = @USE_BINCUE@ + LN_S = @LN_S@ WINDRES = @WINDRES@ CC = @CC@ @@ -42,6 +44,7 @@ DEFS = @DEFS@ @DEFINES@ LDFLAGS = @LDFLAGS@ -Wl,-Bstatic LIBS = @LIBS@ -lws2_32 -lwsock32 -liphlpapi CPUSRCS = @CPUSRCS@ +EXTRASRCS = @EXTRASRCS@ HOST_CC = gcc HOST_CXX = g++ @@ -68,7 +71,7 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window ../extfs.cpp extfs_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ vm_alloc.cpp sigsegv.cpp posix_emu.cpp util_windows.cpp \ ../dummy/prefs_editor_dummy.cpp BasiliskII.rc \ - $(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) $(SLIRP_OBJS) + $(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) $(EXTRASRCS) $(SLIRP_OBJS) UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \ ../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \ @@ -109,6 +112,9 @@ define UI_SRCS_LIST_TO_OBJS $(basename $(notdir $(file)))))) endef UI_OBJS = $(UI_SRCS_LIST_TO_OBJS) +ifeq ($(USE_BINCUE),yes) +UI_OBJS += bincue.o +endif SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) VPATH := diff --git a/BasiliskII/src/Windows/configure.ac b/BasiliskII/src/Windows/configure.ac index a13a3983..04f231ee 100755 --- a/BasiliskII/src/Windows/configure.ac +++ b/BasiliskII/src/Windows/configure.ac @@ -36,6 +36,9 @@ AC_ARG_ENABLE(fpe, dnl External packages. AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) +AC_ARG_WITH(bincue, + AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode])) + dnl Addressing modes. AC_ARG_ENABLE(addressing, [ --enable-addressing=AM specify the addressing mode to use [default=fastest]], @@ -85,6 +88,13 @@ AC_SUBST(WANT_GTK) dnl We use 64-bit file size support if possible. AC_SYS_LARGEFILE +dnl BINCUE +AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no]) +AS_IF([test "x$have_bincue" = "xyes" ], [ + DEFINES="$DEFINES -DBINCUE" + AC_SUBST(USE_BINCUE, yes) +], [AC_SUBST(USE_BINCUE, no)]) + dnl Checks for header files. AC_HEADER_STDC @@ -304,6 +314,11 @@ elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_X86_64" = "xyes" ]]; then fi fi +dnl BINCUE overrides +if [[ "x$have_bincue" = "xyes" ]]; then + EXTRASRCS="$EXTRASRCS bincue.cpp" +fi + dnl Enable JIT compiler, if possible. if [[ "x$WANT_JIT" = "xyes" -a "x$CAN_JIT" ]]; then JITSRCS="$JITSRCS ../uae_cpu/compiler/compemu_support.cpp ../uae_cpu/compiler/compemu_fpp.cpp compstbl.o cpustbl_nf.o" @@ -552,6 +567,7 @@ dnl Generate Makefile. AC_SUBST(DEFINES) AC_SUBST(CPUINCLUDES) AC_SUBST(CPUSRCS) +AC_SUBST(EXTRASRCS) AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -564,6 +580,7 @@ echo JIT debug mode ......................... : $WANT_JIT_DEBUG echo Floating-Point emulation core .......... : $FPE_CORE echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS echo Addressing mode ........................ : $ADDRESSING_MODE +echo BINCUE support ......................... : $have_bincue echo GTK user interface ..................... : $WANT_GTK echo echo "Configuration done. Now type \"make\" (or \"gmake\")." diff --git a/SheepShaver/src/Unix/Makefile.in b/SheepShaver/src/Unix/Makefile.in index ed6148a4..419fa176 100644 --- a/SheepShaver/src/Unix/Makefile.in +++ b/SheepShaver/src/Unix/Makefile.in @@ -106,7 +106,7 @@ define GUI_SRCS_LIST_TO_OBJS endef GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) ifeq ($(USE_BINCUE),yes) -GUI_OBJS += bincue_unix.o +GUI_OBJS += bincue.o endif define DYNGENSRCS_LIST_TO_OBJS diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 7c546e27..fb22fb89 100755 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -781,7 +781,7 @@ fi dnl BINCUE overrides if [[ "x$have_bincue" = "xyes" ]]; then - EXTRASYSSRCS="$EXTRASYSSRCS bincue_unix.cpp" + EXTRASYSSRCS="$EXTRASYSSRCS bincue.cpp" fi dnl libvhd overrides diff --git a/SheepShaver/src/Windows/Makefile.in b/SheepShaver/src/Windows/Makefile.in index 2ca61f47..40f4d4f1 100755 --- a/SheepShaver/src/Windows/Makefile.in +++ b/SheepShaver/src/Windows/Makefile.in @@ -29,6 +29,8 @@ SLIRP_SRCS = \ ../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=$(OBJ_DIR)/slirp-%.o) +USE_BINCUE = @USE_BINCUE@ + LN_S = @LN_S@ WINDRES = @WINDRES@ CC = @CC@ @@ -41,6 +43,7 @@ LDFLAGS = @LDFLAGS@ -Wl,-Bstatic #TODO remove pthread part of that if irrelevant LIBS = @LIBS@ -lws2_32 -lwsock32 -liphlpapi CPUSRCS = @CPUSRCS@ +EXTRASRCS = @EXTRASRCS@ PERL = @PERL@ USE_DYNGEN = @USE_DYNGEN@ @@ -66,14 +69,14 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window sys_windows.cpp cdenable/cache.cpp cdenable/eject_nt.cpp cdenable/ntcd.cpp \ ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \ ../macos_util.cpp ../timer.cpp timer_windows.cpp ../xpram.cpp xpram_windows.cpp \ - ../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../bincue.cpp ../scsi.cpp ../dummy/scsi_dummy.cpp \ + ../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../dummy/scsi_dummy.cpp \ ../gfxaccel.cpp ../video.cpp ../SDL/video_sdl.cpp ../SDL/video_sdl2.cpp video_blit.cpp \ ../audio.cpp ../SDL/audio_sdl.cpp ../ether.cpp ether_windows.cpp \ ../thunks.cpp ../serial.cpp serial_windows.cpp ../extfs.cpp extfs_windows.cpp \ about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ ../dummy/prefs_editor_dummy.cpp clip_windows.cpp util_windows.cpp \ vm_alloc.cpp sigsegv.cpp posix_emu.cpp SheepShaver.rc \ - $(CPUSRCS) $(ROUTERSRCS) $(SLIRP_OBJS) + $(CPUSRCS) $(ROUTERSRCS) $(EXTRASRCS) $(SLIRP_OBJS) UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \ ../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \ @@ -115,6 +118,9 @@ define UI_SRCS_LIST_TO_OBJS $(basename $(notdir $(file)))))) endef UI_OBJS = $(UI_SRCS_LIST_TO_OBJS) +ifeq ($(USE_BINCUE),yes) +UI_OBJS += bincue.o +endif define DYNGENSRCS_LIST_TO_OBJS $(addprefix $(OBJ_DIR)/, $(addsuffix .ho, $(foreach file, $(DYNGENSRCS), \ diff --git a/SheepShaver/src/Windows/configure.ac b/SheepShaver/src/Windows/configure.ac index 67d4adf2..7064f93a 100644 --- a/SheepShaver/src/Windows/configure.ac +++ b/SheepShaver/src/Windows/configure.ac @@ -16,6 +16,9 @@ AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [defa AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes]) +AC_ARG_WITH(bincue, + AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode])) + dnl Checks for programs. AC_PROG_CC AC_PROG_CPP @@ -199,6 +202,18 @@ cygwin) ;; esac +dnl BINCUE +AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no]) +AS_IF([test "x$have_bincue" = "xyes" ], [ + DEFINES="$DEFINES -DBINCUE" + AC_SUBST(USE_BINCUE, yes) +], [AC_SUBST(USE_BINCUE, no)]) + +dnl BINCUE overrides +if [[ "x$have_bincue" = "xyes" ]]; then + EXTRASRCS="$EXTRASRCS bincue.cpp" +fi + dnl CPU emulator sources CPUSRCS="\ ../kpx_cpu/src/mathlib/ieeefp.cpp \ @@ -278,6 +293,7 @@ AC_SUBST(USE_PREGENERATED_DYNGEN) AC_SUBST(DYNGENSRCS) AC_SUBST(DYNGEN_OP_FLAGS) AC_SUBST(CPUSRCS) +AC_SUBST(EXTRASRCS) AC_OUTPUT([Makefile]) dnl Print summary. @@ -286,6 +302,7 @@ echo SheepShaver configuration summary: echo echo Enable JIT compiler .............. : $WANT_JIT echo GTK user interface ............... : $WANT_GTK +echo BINCUE support ......................... : $have_bincue echo Enable VOSF ...................... : $WANT_VOSF echo echo "Configuration done. Now type \"make\"."