summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2017-10-10 13:43:40 +0100
committerAdam Jackson <ajax@redhat.com>2017-12-13 11:32:53 -0500
commit3265d0c81f7a501258fa91e49fcc137714b4af5e (patch)
treef884fb0b815a97faf9b4dff0615abaef14c4295f /hw
parentedda951fa5145a50915611ee0e9e459074117700 (diff)
meson: Add dependency on generated code fragments in hw/xwin/glx/
Somehow I'd managed to write this with this dependency missing, so this only works correctly when the generated files already exist and the correct automatic dependencies generated, but fails on a clean build. Including generated files with a .c extension into the sources for a target causes meson to want to compile them (and it seems to be hard to say "make the directory containing this generated file available to include"). So, change the extension of included generated C fragments to .ic Update the autotools build to align. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwin/glx/Makefile.am8
-rw-r--r--hw/xwin/glx/glshim.c2
-rw-r--r--hw/xwin/glx/glthunk.c2
-rw-r--r--hw/xwin/glx/meson.build9
-rw-r--r--hw/xwin/glx/wgl_ext_api.c2
5 files changed, 13 insertions, 10 deletions
diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am
index f19995086..1fc57f239 100644
--- a/hw/xwin/glx/Makefile.am
+++ b/hw/xwin/glx/Makefile.am
@@ -51,20 +51,20 @@ else
GENGLWRAPPERSOPTS="-nodebug"
endif
-generated_wgl_wrappers.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py
+generated_wgl_wrappers.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py
$(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/wgl.xml -prefix wgl -wrapper -preresolve $(GENGLWRAPPERSOPTS) -outfile $@
-generated_gl_shim.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
+generated_gl_shim.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
$(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -shim $(GENGLWRAPPERSOPTS) -outfile $@
-generated_gl_thunks.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
+generated_gl_thunks.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
$(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunk $(GENGLWRAPPERSOPTS) -outfile $@
generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py
$(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@
endif
-BUILT_SOURCES = generated_gl_shim.c generated_gl_thunks.c generated_gl_thunks.def generated_wgl_wrappers.c
+BUILT_SOURCES = generated_gl_shim.ic generated_gl_thunks.ic generated_gl_thunks.def generated_wgl_wrappers.ic
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = gen_gl_wrappers.py
diff --git a/hw/xwin/glx/glshim.c b/hw/xwin/glx/glshim.c
index df5a932ff..a27040257 100644
--- a/hw/xwin/glx/glshim.c
+++ b/hw/xwin/glx/glshim.c
@@ -106,7 +106,7 @@ int glWinSelectImplementation(int native)
#define RESOLVED_PROC proc
/* Include generated shims for direct linkage to GL functions which are in the ABI */
-#include "generated_gl_shim.c"
+#include "generated_gl_shim.ic"
/*
Special wrapper for glAddSwapHintRectWIN for copySubBuffers
diff --git a/hw/xwin/glx/glthunk.c b/hw/xwin/glx/glthunk.c
index d49fe487c..3d2702ddb 100644
--- a/hw/xwin/glx/glthunk.c
+++ b/hw/xwin/glx/glthunk.c
@@ -84,4 +84,4 @@ glWinResolveHelper(PROC * cache, const char *symbol)
found using wglGetProcAddress(), but also stdcall so still need wrappers...
*/
-#include "generated_gl_thunks.c"
+#include "generated_gl_thunks.ic"
diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build
index 7843a5f00..e9969536d 100644
--- a/hw/xwin/glx/meson.build
+++ b/hw/xwin/glx/meson.build
@@ -15,7 +15,7 @@ wgl_wrappers = custom_target(
'gen_wgl_wrappers',
command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-prefix', 'wgl', '-wrapper', '-preresolve', '-outfile', '@OUTPUT@'],
input: join_paths(khronos_spec_dir, 'wgl.xml'),
- output: 'generated_wgl_wrappers.c',
+ output: 'generated_wgl_wrappers.ic',
depend_files: join_paths(khronos_spec_dir, 'reg.py'),
)
@@ -23,7 +23,7 @@ gl_shim = custom_target(
'gen_gl_shim',
command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-shim', '-outfile', '@OUTPUT@'],
input: join_paths(khronos_spec_dir, 'gl.xml'),
- output: 'generated_gl_shim.c',
+ output: 'generated_gl_shim.ic',
depend_files: join_paths(khronos_spec_dir, 'reg.py'),
)
@@ -31,7 +31,7 @@ gl_thunks = custom_target(
'gen_gl_thunks',
command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunk', '-outfile', '@OUTPUT@'],
input: join_paths(khronos_spec_dir, 'gl.xml'),
- output: 'generated_gl_thunks.c',
+ output: 'generated_gl_thunks.ic',
depend_files: join_paths(khronos_spec_dir, 'reg.py'),
)
@@ -48,9 +48,11 @@ srcs_windows_glx = [
'winpriv.h',
'glwindows.h',
'glshim.c',
+ gl_shim,
'indirect.c',
'indirect.h',
'wgl_ext_api.c',
+ wgl_wrappers,
'wgl_ext_api.h',
]
@@ -79,6 +81,7 @@ xwin_glx = static_library(
srcs_wgl_thunk = [
'glthunk.c',
+ gl_thunks,
]
WGLthunk = shared_library(
diff --git a/hw/xwin/glx/wgl_ext_api.c b/hw/xwin/glx/wgl_ext_api.c
index 78b6e2a02..61cfe8003 100644
--- a/hw/xwin/glx/wgl_ext_api.c
+++ b/hw/xwin/glx/wgl_ext_api.c
@@ -69,4 +69,4 @@
* systems...
*/
-#include "generated_wgl_wrappers.c"
+#include "generated_wgl_wrappers.ic"