diff --git a/GL/Makefile.am b/GL/Makefile.am index b9337ba69..df9f533e2 100644 --- a/GL/Makefile.am +++ b/GL/Makefile.am @@ -1,16 +1,16 @@ -SUBDIRS = glx mesa - # someone could get really crazy someday and add support for the SI... # xwin/darwin/xfree86 have their accel support under the DDX -APPLE_EXTRAS = \ - apple/aglGlx.c \ - apple/indirect.c +if BUILD_DARWIN +DARWIN_SUBDIRS = apple +endif +SUBDIRS = glx mesa $(DARWIN_SUBDIRS) + WINDOWS_EXTRAS = \ windows/ChangeLog \ windows/glwindows.h \ windows/glwrap.c \ windows/indirect.c -EXTRA_DIST = symlink-mesa.sh $(APPLE_EXTRAS) $(WINDOWS_EXTRAS) +EXTRA_DIST = symlink-mesa.sh $(WINDOWS_EXTRAS) diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am new file mode 100644 index 000000000..2b2d10cbc --- /dev/null +++ b/GL/apple/Makefile.am @@ -0,0 +1,15 @@ +AM_CFLAGS = -I$(top_srcdir) \ + -I$(top_srcdir)/hw/darwin/quartz \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/hw/darwin/quartz/cr \ + -I$(top_srcdir)/GL/include + +if HAVE_AGL_FRAMEWORK +noinst_LIBRARIES = libAGLcore.a +libAGLcore_a_SOURCES = aglGlx.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-list.h \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.c \ + $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \ + $(top_srcdir)/hw/dmx/glxProxy/compsize.c +endif diff --git a/GL/glx/glxbyteorder.h b/GL/glx/glxbyteorder.h index b9d738dba..cdf6b15f0 100644 --- a/GL/glx/glxbyteorder.h +++ b/GL/glx/glxbyteorder.h @@ -39,6 +39,11 @@ #include #elif defined(USE_SYS_ENDIAN_H) #include +#elif defined(__APPLE__) +#include +#define bswap_16 OSSwapInt16 +#define bswap_32 OSSwapInt32 +#define bswap_64 OSSwapInt64 #else #define bswap_16(value) \ ((((value) & 0xff) << 8) | ((value) >> 8))