gdk: select pixelops sources by target architecture
This commit is contained in:
parent
699d5777f2
commit
1c3b48d6e6
4 changed files with 36 additions and 1 deletions
14
configure.ac
14
configure.ac
|
|
@ -117,6 +117,20 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
|||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
gdk_pixelops_i386=no
|
||||
|
||||
case "$host_cpu" in
|
||||
i?86)
|
||||
gdk_pixelops_i386=yes
|
||||
AC_DEFINE([HAVE_GDK_PIXELOPS_INIT], [1],
|
||||
[Define if GDK pixel operations require runtime dispatch initialization])
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(GDK_PIXELOPS_I386,
|
||||
test "$gdk_pixelops_i386" = yes)
|
||||
|
||||
|
||||
MATH_LIB=-lm
|
||||
AC_MSG_CHECKING([for native Win32])
|
||||
LIB_EXE_MACHINE_FLAG=X86
|
||||
|
|
|
|||
|
|
@ -119,8 +119,15 @@ gdk_private_headers = \
|
|||
gdkpoly-generic.h \
|
||||
gdkregion-generic.h
|
||||
|
||||
gdk_pixelops_arch_sources =
|
||||
|
||||
if GDK_PIXELOPS_I386
|
||||
gdk_pixelops_arch_sources += gdkpixelops-x86.c
|
||||
endif
|
||||
|
||||
gdk_pixelops_private_sources = \
|
||||
gdkpixelops-generic.c
|
||||
gdkpixelops-generic.c \
|
||||
$(gdk_pixelops_arch_sources)
|
||||
|
||||
gdk_c_sources = \
|
||||
$(medialib_sources) \
|
||||
|
|
|
|||
13
gdk/gdkpixelops-x86.c
Normal file
13
gdk/gdkpixelops-x86.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* GDK - The GIMP Drawing Kit
|
||||
*
|
||||
* x86 pixel operation backend.
|
||||
*
|
||||
* This file is selected at build time only for x86 targets.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(__i386__) && !defined(__x86_64__) && \
|
||||
!defined(_M_IX86) && !defined(_M_X64)
|
||||
#error "gdkpixelops-x86.c must only be built for an x86 target"
|
||||
#endif
|
||||
|
|
@ -74,6 +74,7 @@ gdk_OBJECTS = \
|
|||
gdkdraw.obj \
|
||||
gdkpixelops.obj \
|
||||
gdkpixelops-generic.obj \
|
||||
gdkpixelops-x86.obj \
|
||||
gdkenumtypes.obj \
|
||||
gdkevents.obj \
|
||||
gdkfont.obj \
|
||||
|
|
|
|||
Loading…
Reference in a new issue