diff options
Diffstat (limited to 'src/mesa/glapi/Makefile')
-rw-r--r-- | src/mesa/glapi/Makefile | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile index 6520f75e134..adc53d92494 100644 --- a/src/mesa/glapi/Makefile +++ b/src/mesa/glapi/Makefile @@ -7,27 +7,43 @@ TOP = ../../.. include $(TOP)/configs/current -GLX_DIR = ../../glx/x11 - OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h dispatch.h \ ../main/enums.c \ ../x86/glapi_x86.S \ ../x86-64/glapi_x86-64.S \ ../sparc/glapi_sparc.S \ ../drivers/dri/common/extension_helper.h \ - $(GLX_DIR)/indirect.c \ - $(GLX_DIR)/indirect.h \ - $(GLX_DIR)/indirect_init.c \ - $(GLX_DIR)/indirect_size.h \ - $(GLX_DIR)/indirect_size.c \ + ../../glx/x11/indirect.c \ + ../../glx/x11/indirect.h \ + ../../glx/x11/indirect_init.c \ + ../../glx/x11/indirect_size.h \ + ../../glx/x11/indirect_size.c + + +GLX_DIR = $(XORG_BASE)/glx + +SERVER_GLAPI_FILES = \ + $(GLX_DIR)/glapi.h \ + $(GLX_DIR)/glapi.c \ + $(GLX_DIR)/glthread.c \ + $(GLX_DIR)/glthread.h + +SERVER_OUTPUTS = \ $(GLX_DIR)/indirect_dispatch.c \ $(GLX_DIR)/indirect_dispatch_swap.c \ $(GLX_DIR)/indirect_dispatch.h \ $(GLX_DIR)/indirect_reqsize.c \ $(GLX_DIR)/indirect_reqsize.h \ + $(GLX_DIR)/indirect_size.h \ $(GLX_DIR)/indirect_size_get.c \ $(GLX_DIR)/indirect_size_get.h \ - $(GLX_DIR)/indirect_table.c + $(GLX_DIR)/indirect_table.c \ + $(GLX_DIR)/glapitemp.h \ + $(GLX_DIR)/glapitable.h \ + $(GLX_DIR)/glapioffsets.h \ + $(GLX_DIR)/glprocs.h \ + $(GLX_DIR)/dispatch.h \ + $(SERVER_GLAPI_FILES) API_XML = gl_API.xml \ EXT_framebuffer_object.xml \ @@ -36,21 +52,33 @@ API_XML = gl_API.xml \ COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py -all: $(OUTPUTS) +all: check-xorg-source $(OUTPUTS) $(SERVER_OUTPUTS) + +check-xorg-source: + @if ! test -d $(GLX_DIR); then \ + echo "ERROR: Must specify path to xserver checkout; set XORG_BASE."; \ + exit 1; \ + fi + +$(GLX_DIR)/%.c: %.c + cp $< $@ + +$(GLX_DIR)/%.h: %.h + cp $< $@ -glprocs.h: gl_procs.py $(COMMON) +glprocs.h $(GLX_DIR)/glprocs.h: gl_procs.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ -glapitemp.h: gl_apitemp.py $(COMMON) +glapitemp.h $(GLX_DIR)/glapitemp.h: gl_apitemp.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ -glapioffsets.h: gl_offsets.py $(COMMON) +glapioffsets.h $(GLX_DIR)/glapioffsets.h: gl_offsets.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ -glapitable.h: gl_table.py $(COMMON) +glapitable.h $(GLX_DIR)/glapitable.h: gl_table.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ -dispatch.h: gl_table.py $(COMMON) +dispatch.h $(GLX_DIR)/dispatch.h: gl_table.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@ ../main/enums.c: gl_enums.py $(COMMON) @@ -69,20 +97,20 @@ dispatch.h: gl_table.py $(COMMON) ../drivers/dri/common/extension_helper.h: extension_helper.py $(COMMON) $(PYTHON2) $(PYTHON_FLAGS) $< > $@ -$(GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX) +../../glx/x11/indirect.c: glX_proto_send.py $(COMMON_GLX) $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@ -$(GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX) +../../glx/x11/indirect.h: glX_proto_send.py $(COMMON_GLX) $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@ -$(GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX) +../../glx/x11/indirect_init.c: glX_proto_send.py $(COMMON_GLX) $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@ -$(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX) +../../glx/x11/indirect_size.h $(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX) $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \ | $(INDENT) $(INDENT_FLAGS) > $@ -$(GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX) +../../glx/x11/indirect_size.c: glX_proto_size.py $(COMMON_GLX) $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \ | $(INDENT) $(INDENT_FLAGS) > $@ @@ -113,5 +141,5 @@ $(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@ clean: - rm -f *~ *.pyo - rm -f $(OUTPUTS) + -rm -f *~ *.pyo + -rm -f $(OUTPUTS) |