aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi')
-rw-r--r--mesalib/src/mapi/glapi/gen/Makefile.am16
-rw-r--r--mesalib/src/mapi/glapi/gen/glapi_gen.mk4
2 files changed, 12 insertions, 8 deletions
diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am
index 499ec09a8..40aaf51cd 100644
--- a/mesalib/src/mapi/glapi/gen/Makefile.am
+++ b/mesalib/src/mapi/glapi/gen/Makefile.am
@@ -38,10 +38,18 @@ MESA_GLAPI_OUTPUTS = \
$(MESA_GLAPI_DIR)/glapitable.h \
$(MESA_GLAPI_DIR)/glapi_gentable.c
-MESA_GLAPI_ASM_OUTPUTS = \
- $(MESA_GLAPI_DIR)/glapi_x86.S \
- $(MESA_GLAPI_DIR)/glapi_x86-64.S \
- $(MESA_GLAPI_DIR)/glapi_sparc.S
+MESA_GLAPI_ASM_OUTPUTS =
+if HAVE_X86_ASM
+MESA_GLAPI_ASM_OUTPUTS += $(MESA_GLAPI_DIR)/glapi_x86.S
+endif
+
+if HAVE_X86_64_ASM
+MESA_GLAPI_ASM_OUTPUTS += $(MESA_GLAPI_DIR)/glapi_x86-64.S
+endif
+
+if HAVE_SPARC_ASM
+MESA_GLAPI_ASM_OUTPUTS += $(MESA_GLAPI_DIR)/glapi_sparc.S
+endif
MESA_OUTPUTS = \
$(MESA_GLAPI_OUTPUTS) \
diff --git a/mesalib/src/mapi/glapi/gen/glapi_gen.mk b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
index eab8eb40c..f65286fbd 100644
--- a/mesalib/src/mapi/glapi/gen/glapi_gen.mk
+++ b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
@@ -1,9 +1,5 @@
# Helpers for glapi header generation
-ifndef top_srcdir
-$(error top_srcdir must be defined.)
-endif
-
glapi_gen_common_deps := \
$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \
$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py)