mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 02:29:49 +00:00
slirp now works on windows
This commit is contained in:
parent
08b783d52b
commit
08a6e383e8
@ -21,16 +21,26 @@ WANT_GTK = @WANT_GTK@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
|
||||
SLIRP_CFLAGS = @SLIRP_CFLAGS@
|
||||
SLIRP_SRCS = \
|
||||
../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \
|
||||
../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \
|
||||
../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \
|
||||
../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \
|
||||
../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \
|
||||
../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c
|
||||
SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=$(OBJ_DIR)/slirp-%.o)
|
||||
|
||||
LN_S = @LN_S@
|
||||
WINDRES = @WINDRES@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CFLAGS = @CFLAGS@ $(SDL_CFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS)
|
||||
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
|
||||
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ -I../slirp
|
||||
DEFS = @DEFS@ @DEFINES@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
LIBS = @LIBS@ -lwsock32 -liphlpapi
|
||||
CPUSRCS = @CPUSRCS@
|
||||
|
||||
HOST_CC = gcc
|
||||
@ -58,7 +68,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 kernel_windows.cpp \
|
||||
../dummy/prefs_editor_dummy.cpp BasiliskII.rc \
|
||||
$(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS)
|
||||
$(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) $(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 \
|
||||
@ -130,6 +140,8 @@ $(OBJ_DIR)/%.ho : %.c
|
||||
$(HOST_CC) $(CPPFLAGS) $(DEFS) $(HOST_CFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/%.ho : %.cpp
|
||||
$(HOST_CXX) $(CPPFLAGS) $(DEFS) $(HOST_CXXFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/slirp-%.o : ../slirp/%.c
|
||||
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/%.o : %.c
|
||||
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
|
||||
$(OBJ_DIR)/%.o : %.cpp
|
||||
|
@ -105,6 +105,9 @@ AC_CHECK_TYPES(loff_t)
|
||||
AC_CHECK_TYPES(caddr_t)
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(strdup strerror)
|
||||
|
||||
dnl Define a macro that translates a yesno-variable into a C macro definition
|
||||
dnl to be put into the config.h file
|
||||
dnl $1 -- the macro to define
|
||||
@ -259,6 +262,19 @@ AC_EGREP_CPP(xyes,
|
||||
#endif
|
||||
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
|
||||
|
||||
dnl Add -fno-strict-aliasing for slirp sources
|
||||
if [[ "x$HAVE_GCC30" = "xyes" ]]; then
|
||||
SAVED_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
|
||||
ac_cv_gcc_no_strict_aliasing, [
|
||||
AC_TRY_COMPILE([],[],
|
||||
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")],
|
||||
[ac_cv_gcc_no_strict_aliasing=no])
|
||||
])
|
||||
CFLAGS="$SAVED_CFLAGS"
|
||||
fi
|
||||
|
||||
dnl Select appropriate CPU source and REGPARAM define.
|
||||
ASM_OPTIMIZATIONS=none
|
||||
CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@
|
||||
#ifndef _ETHER_WINDOWS_H_
|
||||
#define _ETHER_WINDOWS_H_
|
||||
|
||||
void enqueue_packet( uint8 *buf, int sz );
|
||||
|
||||
#ifdef SHEEPSHAVER
|
||||
extern uint8 ether_addr[6];
|
||||
#endif
|
||||
|
||||
#endif // _ETHER_WINDOWS_H_
|
||||
#ifndef _ETHER_WINDOWS_H_
|
||||
#define _ETHER_WINDOWS_H_
|
||||
|
||||
void enqueue_packet( const uint8 *buf, int sz );
|
||||
|
||||
#ifdef SHEEPSHAVER
|
||||
extern uint8 ether_addr[6];
|
||||
#endif
|
||||
|
||||
#endif // _ETHER_WINDOWS_H_
|
||||
|
@ -36,6 +36,7 @@ user_string_def platform_strings[] = {
|
||||
{STR_VOSF_INIT_ERR, "Cannot initialize Video on SEGV signals."},
|
||||
{STR_SIG_INSTALL_ERR, "Cannot install %s handler (%s)."},
|
||||
{STR_TICK_THREAD_ERR, "Cannot create 60Hz thread (%s)."},
|
||||
{STR_SLIRP_NO_DNS_FOUND_WARN, "Cannot get DNS address. Ethernet will not be available."},
|
||||
{STR_NO_AUDIO_WARN, "No audio device found, audio output will be disabled."},
|
||||
{STR_KEYCODE_FILE_WARN, "Cannot open keycode translation file %s (%s)."},
|
||||
{STR_KEYCODE_VENDOR_WARN, "Cannot find vendor '%s' in keycode translation file %s."},
|
||||
|
@ -26,6 +26,7 @@ enum {
|
||||
STR_VOSF_INIT_ERR,
|
||||
STR_SIG_INSTALL_ERR,
|
||||
STR_TICK_THREAD_ERR,
|
||||
STR_SLIRP_NO_DNS_FOUND_WARN,
|
||||
STR_NO_AUDIO_WARN,
|
||||
STR_KEYCODE_FILE_WARN,
|
||||
STR_KEYCODE_VENDOR_WARN,
|
||||
|
Loading…
Reference in New Issue
Block a user