parent
8bbc0d40c6
commit
773dd02f59
@ -0,0 +1,100 @@ |
|||||||
|
# Copyright © 2015 Intel Corporation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
# Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
|
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
|
||||||
|
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
|
||||||
|
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR) |
||||||
|
MSG = ^
|
||||||
|
This Makefile is only for Visual Studio 2008 and later.^ |
||||||
|
You need to ensure that the Visual Studio Environment is properly set up^ |
||||||
|
before running this Makefile. |
||||||
|
!error $(MSG) |
||||||
|
!endif |
||||||
|
|
||||||
|
ERRNUL = 2>NUL
|
||||||
|
_HASH=^#
|
||||||
|
|
||||||
|
!if ![echo VCVERSION=_MSC_VER > vercl.x] \
|
||||||
|
&& ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
|
||||||
|
&& ![echo PLAT=Win32 >> vercl.x] \
|
||||||
|
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
|
||||||
|
&& ![echo PLAT=x64 >> vercl.x] \
|
||||||
|
&& ![echo $(_HASH)endif >> vercl.x] \
|
||||||
|
&& ![cl -nologo -TC -P vercl.x $(ERRNUL)]
|
||||||
|
!include vercl.i |
||||||
|
!if ![echo VCVER= ^\> vercl.vc] \
|
||||||
|
&& ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
|
||||||
|
!include vercl.vc |
||||||
|
!endif |
||||||
|
!endif |
||||||
|
!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc] |
||||||
|
!endif |
||||||
|
|
||||||
|
!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600 |
||||||
|
VSVER = 9
|
||||||
|
C99_COMPAT_NEEDED = 1
|
||||||
|
!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700 |
||||||
|
VSVER = 10
|
||||||
|
C99_COMPAT_NEEDED = 1
|
||||||
|
!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800 |
||||||
|
VSVER = 11
|
||||||
|
C99_COMPAT_NEEDED = 1
|
||||||
|
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900 |
||||||
|
VSVER = 12
|
||||||
|
C99_COMPAT_NEEDED = 0
|
||||||
|
!else |
||||||
|
VSVER = 0
|
||||||
|
!endif |
||||||
|
|
||||||
|
!if "$(VSVER)" == "0" |
||||||
|
MSG = ^
|
||||||
|
This NMake Makefile set supports Visual Studio^ |
||||||
|
9 (2008) through 12 (2013). Your Visual Studio^ |
||||||
|
version is not supported. |
||||||
|
!error $(MSG) |
||||||
|
!endif |
||||||
|
|
||||||
|
VALID_CFGSET = FALSE
|
||||||
|
!if "$(CFG)" == "release" || "$(CFG)" == "debug" |
||||||
|
VALID_CFGSET = TRUE
|
||||||
|
!endif |
||||||
|
|
||||||
|
!if "$(VALID_CFGSET)" == "FALSE" |
||||||
|
MSG = ^
|
||||||
|
You need to specify CFG=release or CFG=debug.
|
||||||
|
!error $(MSG) |
||||||
|
!endif |
||||||
|
|
||||||
|
!if "$(CFG)" == "release" |
||||||
|
CFLAGS_ADD = /MD /O2 /Zi /I..\include /I..\..\vs$(VSVER)\$(PLAT)\include
|
||||||
|
EXTRA_LDFLAGS = /opt:ref
|
||||||
|
!else |
||||||
|
CFLAGS_ADD = /MDd /Od /Zi /I..\include /I..\..\vs$(VSVER)\$(PLAT)\include
|
||||||
|
EXTRA_LDFLAGS =
|
||||||
|
!endif |
||||||
|
|
||||||
|
!if "$(PLAT)" == "x64" |
||||||
|
LDFLAGS_ARCH = /machine:x64
|
||||||
|
!else |
||||||
|
LDFLAGS_ARCH = /machine:x86
|
||||||
|
!endif |
||||||
|
|
||||||
|
CFLAGS_C99_COMPAT = /Dinline=__inline
|
@ -0,0 +1,46 @@ |
|||||||
|
# Copyright © 2014 Intel Corporation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
# Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
|
GL_GEN_HEADER = include/epoxy/gl_generated.h
|
||||||
|
|
||||||
|
GLX_GEN_HEADER = include/epoxy/glx_generated.h
|
||||||
|
|
||||||
|
WGL_GEN_HEADER = include/epoxy/wgl_generated.h
|
||||||
|
|
||||||
|
EGL_GEN_HEADER = include/epoxy/egl_generated.h
|
||||||
|
|
||||||
|
GENERATED_GL_SOURCE = gl_generated_dispatch.c
|
||||||
|
|
||||||
|
GENERATED_GLX_SOURCE = glx_generated_dispatch.c
|
||||||
|
|
||||||
|
GENERATED_WGL_SOURCE = wgl_generated_dispatch.c
|
||||||
|
|
||||||
|
GENERATED_EGL_SOURCE = egl_generated_dispatch.c
|
||||||
|
|
||||||
|
EPOXY_C_SRC = dispatch_common.c
|
||||||
|
|
||||||
|
EPOXY_GLX_C_SRC = dispatch_glx.c
|
||||||
|
|
||||||
|
EPOXY_WGL_C_SRC = dispatch_wgl.c
|
||||||
|
|
||||||
|
EPOXY_EGL_C_SRC = dispatch_egl.c
|
||||||
|
|
||||||
|
EPOXY_SRC_HDR = dispatch_common.h
|
@ -0,0 +1,73 @@ |
|||||||
|
# Copyright © 2015 Intel Corporation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
# Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
|
# Note: To build and use libepoxy for Visual Studio prior to Visual Studio 2013,
|
||||||
|
# you need to ensure that you have stdint.h, inttypes.h and stdbool.h
|
||||||
|
# that will work for your installation of Visual Studio, which can be
|
||||||
|
# found by the compiler. One possibility would be to use msinttypes
|
||||||
|
# and adapting gnulib's stdbool.h.in for your use.
|
||||||
|
|
||||||
|
# Adjust this to where your Python interpretor resides in
|
||||||
|
PYTHONDIR=c:\python27
|
||||||
|
|
||||||
|
# Choose whether libtool-style DLL names are desired (set as 1)
|
||||||
|
LIBTOOL_DLL_NAMING = 0
|
||||||
|
|
||||||
|
# Please don't change the following lines
|
||||||
|
EPOXY_BASENAME = epoxy
|
||||||
|
|
||||||
|
!if "$(LIBTOOL_DLL_NAMING)" == "1" |
||||||
|
EPOXY_DLL_BASENAME = lib$(EPOXY_BASENAME)-0
|
||||||
|
!else |
||||||
|
EPOXY_DLL_BASENAME = $(EPOXY_BASENAME)-vs$(VSVER)
|
||||||
|
!endif |
||||||
|
|
||||||
|
!include ..\msvc\detectenv-msvc.mak |
||||||
|
!include Makefile.sources |
||||||
|
|
||||||
|
all: $(EPOXY_DLL_BASENAME).dll |
||||||
|
|
||||||
|
$(EPOXY_DLL_BASENAME).dll: ../$(GL_GEN_HEADER) ../$(WGL_GEN_HEADER) ../$(EGL_GEN_HEADER) $(GENERATED_GL_SOURCE) $(GENERATED_WGL_SOURCE) $(GENERATED_EGL_SOURCE) $(EPOXY_C_SRC) $(EPOXY_WGL_C_SRC) $(EPOXY_EGL_C_SRC) |
||||||
|
$(CC) $(CFLAGS_ADD) $(CFLAGS_C99_COMPAT) $(EPOXY_C_SRC) $(EPOXY_WGL_C_SRC) $(EPOXY_EGL_C_SRC) $(GENERATED_GL_SOURCE) $(GENERATED_WGL_SOURCE) $(GENERATED_EGL_SOURCE) /I c:\opt\Imagination-3_5\PowerVR_Graphics\PowerVR_SDK\SDK_3.5\Builds\Include \
|
||||||
|
/link /DLL /DEBUG $(EXTRA_LDFLAGS) /pdb:$(EPOXY_DLL_BASENAME).pdb /out:$@ /implib:$(EPOXY_BASENAME).lib
|
||||||
|
@if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
||||||
|
|
||||||
|
..\$(GL_GEN_HEADER) $(GENERATED_GL_SOURCE): gen_dispatch.py |
||||||
|
$(PYTHONDIR)\python.exe gen_dispatch.py --dir .. ..\registry\gl.xml
|
||||||
|
|
||||||
|
..\$(WGL_GEN_HEADER) $(GENERATED_WGL_SOURCE): gen_dispatch.py |
||||||
|
$(PYTHONDIR)\python.exe gen_dispatch.py --dir .. ..\registry\wgl.xml
|
||||||
|
|
||||||
|
..\$(EGL_GEN_HEADER) $(GENERATED_EGL_SOURCE): gen_dispatch.py |
||||||
|
$(PYTHONDIR)\python.exe gen_dispatch.py --dir .. ..\registry\egl.xml
|
||||||
|
|
||||||
|
clean: |
||||||
|
@-del *.lib
|
||||||
|
@-del *.exp
|
||||||
|
@-del *.dll
|
||||||
|
@-if exist *.dll.manifest del *.dll.manifest
|
||||||
|
@-del *.ilk
|
||||||
|
@-del *.pdb
|
||||||
|
@-del *.obj
|
||||||
|
@-del ..\include\epoxy\*generated.h
|
||||||
|
@-del $(GENERATED_GL_SOURCE)
|
||||||
|
@-del $(GENERATED_WGL_SOURCE)
|
||||||
|
@-del $(GENERATED_EGL_SOURCE)
|
@ -0,0 +1,73 @@ |
|||||||
|
# Copyright © 2014 Intel Corporation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
# Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
|
EGL_TESTS_PROGS = \
|
||||||
|
egl_has_extension_nocontext \
|
||||||
|
egl_gl \
|
||||||
|
egl_gles1_without_glx \
|
||||||
|
egl_gles2_without_glx
|
||||||
|
|
||||||
|
EGL_GLX_TEST_PROGS = \
|
||||||
|
egl_and_glx_different_pointers_egl_glx \
|
||||||
|
egl_and_glx_different_pointers_egl \
|
||||||
|
egl_and_glx_different_pointers_glx
|
||||||
|
|
||||||
|
GLX_TEST_PROGS = \
|
||||||
|
glx_beginend \
|
||||||
|
glx_public_api \
|
||||||
|
glx_public_api_core \
|
||||||
|
glx_glxgetprocaddress_nocontext \
|
||||||
|
glx_has_extension_nocontext \
|
||||||
|
glx_static
|
||||||
|
|
||||||
|
GLX_NON_APPLE_PROGS = \
|
||||||
|
glx_alias_prefer_same_name \
|
||||||
|
glx_gles2
|
||||||
|
|
||||||
|
WGL_TEST_PROGS = \
|
||||||
|
wgl_core_and_exts$(EXEEXT) \
|
||||||
|
wgl_per_context_funcptrs$(EXEEXT) \
|
||||||
|
wgl_usefontbitmaps$(EXEEXT) \
|
||||||
|
wgl_usefontbitmaps_unicode$(EXEEXT)
|
||||||
|
|
||||||
|
GENERIC_TEST_PROGS = \
|
||||||
|
headerguards$(EXEEXT) \
|
||||||
|
miscdefines$(EXEEXT) \
|
||||||
|
khronos_typedefs$(EXEEXT)
|
||||||
|
|
||||||
|
DLWRAP_SRC = dlwrap.c dlwrap.h
|
||||||
|
|
||||||
|
KHRONOS_TYPEDEF_SRC = \
|
||||||
|
khronos_typedefs.c \
|
||||||
|
khronos_typedefs.h \
|
||||||
|
khronos_typedefs_nonepoxy.c
|
||||||
|
|
||||||
|
EGL_COMMON_SRC = \
|
||||||
|
egl_common.c \
|
||||||
|
egl_common.h
|
||||||
|
|
||||||
|
GLX_COMMON_SRC = \
|
||||||
|
glx_common.c \
|
||||||
|
glx_common.h
|
||||||
|
|
||||||
|
WGL_COMMON_SRC = \
|
||||||
|
wgl_common.c \
|
||||||
|
wgl_common.h
|
@ -0,0 +1,68 @@ |
|||||||
|
# Copyright © 2015 Intel Corporation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice (including the next
|
||||||
|
# paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
# Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
|
# Note: To build and use libepoxy for Visual Studio prior to Visual Studio 2013,
|
||||||
|
# you need to ensure that you have stdint.h, inttypes.h and stdbool.h
|
||||||
|
# that will work for your installation of Visual Studio, which can be
|
||||||
|
# found by the compiler. One possibility would be to use msinttypes
|
||||||
|
# and adapting gnulib's stdbool.h.in for your use.
|
||||||
|
|
||||||
|
!include ..\msvc\detectenv-msvc.mak |
||||||
|
!include Makefile.sources |
||||||
|
|
||||||
|
EXEEXT = .exe
|
||||||
|
|
||||||
|
all: config.h wgl_common.lib $(GENERIC_TEST_PROGS) $(WGL_TEST_PROGS) |
||||||
|
|
||||||
|
LD_CFLAGS = /link
|
||||||
|
LDFLAGS = /libpath:..\src epoxy.lib gdi32.lib user32.lib $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
|
CFLAGS_INCLUDES_TESTS = /I.
|
||||||
|
|
||||||
|
khronos_typedefs.exe: $(KHRONOS_TYPEDEF_SRC) config.h |
||||||
|
$(CC) $(CFLAGS_ADD) $(CFLAGS_INCLUDES_TESTS) $(CFLAGS_C99_COMPAT) khronos_typedefs.c khronos_typedefs_nonepoxy.c /c
|
||||||
|
link /DEBUG $(EXTRA_LDFLAGS) $*.obj $*_nonepoxy.obj /out:$@
|
||||||
|
@if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||||
|
|
||||||
|
wgl_usefontbitmaps_unicode.exe: wgl_usefontbitmaps.c wgl_common.lib config.h |
||||||
|
$(CC) $(CFLAGS_ADD) $(CFLAGS_INCLUDES_TESTS) $(CFLAGS_C99_COMPAT) /DUNICODE wgl_usefontbitmaps.c /Fe$@ $(LD_CFLAGS) $(LDFLAGS) wgl_common.lib
|
||||||
|
@if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||||
|
|
||||||
|
wgl_common.lib: $(WGL_COMMON_SRC) |
||||||
|
$(CC) $(CFLAGS_ADD) $(CFLAGS_INCLUDES_TESTS) $(CFLAGS_C99_COMPAT) /c wgl_common.c
|
||||||
|
lib wgl_common.obj /out:$@
|
||||||
|
|
||||||
|
.c$(EXEEXT): |
||||||
|
$(CC) $(CFLAGS_ADD) $(CFLAGS_INCLUDES_TESTS) $(CFLAGS_C99_COMPAT) $< $(LD_CFLAGS) $(LDFLAGS) wgl_common.lib
|
||||||
|
@if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||||
|
|
||||||
|
config.h: |
||||||
|
@echo #define BUILD_WGL 1 > config.h
|
||||||
|
|
||||||
|
clean: |
||||||
|
@-del *.lib
|
||||||
|
@-del *.exp
|
||||||
|
@-del *.exe
|
||||||
|
@-if exist *.exe.manifest del *.exe.manifest
|
||||||
|
@-del *.ilk
|
||||||
|
@-del *.pdb
|
||||||
|
@-del *.obj
|
||||||
|
@-del config.h
|
Loading…
Reference in new issue