mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
initial Cocoa support (Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1313 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
+8
-1
@@ -346,6 +346,10 @@ endif
|
||||
ifdef CONFIG_SDL
|
||||
VL_OBJS+=sdl.o
|
||||
endif
|
||||
ifdef CONFIG_COCOA
|
||||
VL_OBJS+=cocoa.o
|
||||
COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa
|
||||
endif
|
||||
ifdef CONFIG_SLIRP
|
||||
DEFINES+=-I$(SRC_PATH)/slirp
|
||||
SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
|
||||
@@ -373,7 +377,10 @@ VL_LDFLAGS+=-p
|
||||
endif
|
||||
|
||||
$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
|
||||
$(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VL_LIBS)
|
||||
$(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
|
||||
|
||||
cocoa.o: cocoa.m
|
||||
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
sdl.o: sdl.c keymaps.c sdl_keysym.h
|
||||
$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
|
||||
|
||||
@@ -83,6 +83,7 @@ fmod_inc=""
|
||||
linux="no"
|
||||
kqemu="no"
|
||||
kernel_path=""
|
||||
cocoa="no"
|
||||
|
||||
# OS specific
|
||||
targetos=`uname -s`
|
||||
@@ -178,6 +179,8 @@ for opt do
|
||||
;;
|
||||
--kernel-path=*) kernel_path=${opt#--kernel-path=}
|
||||
;;
|
||||
--enable-cocoa) cocoa="yes" ; sdl="no"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -403,6 +406,9 @@ echo "host big endian $bigendian"
|
||||
echo "target list $target_list"
|
||||
echo "gprof enabled $gprof"
|
||||
echo "static build $static"
|
||||
if test "$darwin" = "yes" ; then
|
||||
echo "Cocoa support $cocoa"
|
||||
fi
|
||||
echo "SDL support $sdl"
|
||||
echo "SDL static link $sdl_static"
|
||||
echo "mingw32 support $mingw32"
|
||||
@@ -676,6 +682,11 @@ if test "$target_user_only" = "no"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$cocoa" = "yes" ; then
|
||||
echo "#define CONFIG_COCOA 1" >> $config_h
|
||||
echo "CONFIG_COCOA=yes" >> $config_mak
|
||||
fi
|
||||
|
||||
done # for target in $targets
|
||||
|
||||
# build tree in object directory if source path is different from current one
|
||||
|
||||
@@ -72,6 +72,11 @@
|
||||
#endif
|
||||
#endif /* CONFIG_SDL */
|
||||
|
||||
#ifdef CONFIG_COCOA
|
||||
#undef main
|
||||
#define main qemu_main
|
||||
#endif /* CONFIG_COCOA */
|
||||
|
||||
#include "disas.h"
|
||||
|
||||
#include "exec-all.h"
|
||||
@@ -3554,8 +3559,10 @@ int main(int argc, char **argv)
|
||||
if (nographic) {
|
||||
dumb_display_init(ds);
|
||||
} else {
|
||||
#ifdef CONFIG_SDL
|
||||
#if defined(CONFIG_SDL)
|
||||
sdl_display_init(ds, full_screen);
|
||||
#elif defined(CONFIG_COCOA)
|
||||
cocoa_display_init(ds, full_screen);
|
||||
#else
|
||||
dumb_display_init(ds);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user