From dee8ed76ab943f6fae46ab9d6738182e352e931c Mon Sep 17 00:00:00 2001 From: Jeffrey Bush Date: Fri, 18 Aug 2017 17:52:58 -0400 Subject: [PATCH] Fixing bincue support when compiling --with-bincue and --enable-standalone-gui in both SheepSaver and BasiliskII by adding bincue_unix.o to list of objects compiled with the GUI application and adjusting the libs slightly (note that having extra libs listed should't neagtively effect anything). Without these changes those command line arguments cannot both be used. --- BasiliskII/src/Unix/Makefile.in | 10 +++++++--- BasiliskII/src/Unix/configure.ac | 4 +++- SheepShaver/src/Unix/Makefile.in | 7 ++++++- SheepShaver/src/Unix/configure.ac | 4 +++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/BasiliskII/src/Unix/Makefile.in b/BasiliskII/src/Unix/Makefile.in index 8ce51385..42f1b049 100644 --- a/BasiliskII/src/Unix/Makefile.in +++ b/BasiliskII/src/Unix/Makefile.in @@ -37,6 +37,8 @@ SLIRP_CFLAGS = @SLIRP_CFLAGS@ SLIRP_SRCS = @SLIRP_SRCS@ SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o) +USE_BINCUE = @USE_BINCUE@ + STANDALONE_GUI = @STANDALONE_GUI@ GUI_CFLAGS = @GUI_CFLAGS@ GUI_LIBS = @GUI_LIBS@ @@ -72,7 +74,6 @@ GUI_APP_APP = $(GUI_APP).app PROGS += $(GUI_APP)$(EXEEXT) else CXXFLAGS += $(GUI_CFLAGS) -LIBS += $(GUI_LIBS) endif ## Rules @@ -98,6 +99,9 @@ define GUI_SRCS_LIST_TO_OBJS $(basename $(notdir $(file)))))) endef GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) +ifeq ($(USE_BINCUE),yes) +GUI_OBJS += bincue_unix.o +endif GUI_SRCS := $(GUI_SRCS:%=@top_srcdir@/%) SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) @@ -108,11 +112,11 @@ VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(S OSX_DOCS = ../MacOSX/Credits.html ../MacOSX/ToDo.html ../MacOSX/HowTo.html ../MacOSX/Versions.html $(APP)$(EXEEXT): $(OBJ_DIR) $(OBJS) - $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) + $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(GUI_LIBS) $(BLESS) $(APP)$(EXEEXT) $(GUI_APP)$(EXEEXT): $(OBJ_DIR) $(GUI_OBJS) - $(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS) + $(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS) $(LIBS) $(APP)_app: $(APP) $(OSX_DOCS) ../../README ../MacOSX/Info.plist ../MacOSX/$(APP).icns rm -rf $(APP_APP)/Contents diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index c634da92..8a34ac9c 100644 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -329,10 +329,12 @@ AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no]) AS_IF([test "x$have_bincue" = "xyes" ], [ if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then DEFINES="$DEFINES -DBINCUE" + AC_SUBST(USE_BINCUE, yes) else AC_MSG_ERROR([You need SDL Audio to use BINCUE support.]) + AC_SUBST(USE_BINCUE, no) fi -]) +], [AC_SUBST(USE_BINCUE, no)]) dnl LIBVHD AS_IF([test "x$with_libvhd" = "xyes" ], [have_libvhd=yes], [have_libvhd=no]) diff --git a/SheepShaver/src/Unix/Makefile.in b/SheepShaver/src/Unix/Makefile.in index b2c3b892..96d63236 100644 --- a/SheepShaver/src/Unix/Makefile.in +++ b/SheepShaver/src/Unix/Makefile.in @@ -42,6 +42,8 @@ SLIRP_CFLAGS = @SLIRP_CFLAGS@ SLIRP_SRCS = @SLIRP_SRCS@ SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o) +USE_BINCUE = @USE_BINCUE@ + STANDALONE_GUI = @STANDALONE_GUI@ GUI_CFLAGS = @GUI_CFLAGS@ GUI_LIBS = @GUI_LIBS@ @@ -102,6 +104,9 @@ define GUI_SRCS_LIST_TO_OBJS $(basename $(notdir $(file)))))) endef GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) +ifeq ($(USE_BINCUE),yes) +GUI_OBJS += bincue_unix.o +endif define DYNGENSRCS_LIST_TO_OBJS $(addprefix $(OBJ_DIR)/, $(addsuffix .dgo, $(foreach file, $(DYNGENSRCS), \ @@ -118,7 +123,7 @@ $(APP_EXE): $(OBJ_DIR) $(OBJS) $(BLESS) $(APP_EXE) $(GUI_APP_EXE): $(OBJ_DIR) $(GUI_OBJS) - $(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS) + $(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS) $(LIBS) $(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns rm -rf $(APP_APP)/Contents diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 11e4c10a..fbb86c3f 100644 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -657,10 +657,12 @@ AS_IF([test "x$with_bincue" = "xyes" ], [have_bincue=yes], [have_bincue=no]) AS_IF([test "x$have_bincue" = "xyes" ], [ if [[ "xOSX_CORE_AUDIO" = "xno" -a "x$WANT_SDL_AUDIO"="xno" ]]; then AC_MSG_ERROR([You need SDL or OSX Core Audio to use BINCUE support.]) + AC_SUBST(USE_BINCUE, no) else CPPFLAGS="$CPPFLAGS -DBINCUE $OSX_CORE_AUDIO" + AC_SUBST(USE_BINCUE, yes) fi -]) +], [AC_SUBST(USE_BINCUE, no)]) dnl LIBVHD AS_IF([test "x$with_libvhd" = "xyes" ], [have_libvhd=yes], [have_libvhd=no])