diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2011-10-31 13:36:50 -0700 |
---|---|---|
committer | Ben Widawsky <ben@bwidawsk.net> | 2011-10-31 17:34:16 -0700 |
commit | 15830ea54be914b1f4005154b2dcba52fa6b6120 (patch) | |
tree | 0df8cf67ee927e2b1b4aa07b653cb72776950217 | |
parent | 32910231514d938be269c3b087f0d444709b0466 (diff) |
i-g-t/debugger: Only allow the shader debugger if the user has specified a gen4asm
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | debugger/system_routine/Makefile | 9 |
2 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 4629decf..92b2372f 100644 --- a/configure.ac +++ b/configure.ac @@ -93,7 +93,12 @@ AC_ARG_ENABLE(shader-debugger, [SHADER_DEBUGGER=no]) AM_CONDITIONAL(HAVE_SHADER_DEBUGGER, [test "x$SHADER_DEBUGGER" = xyes]) if test "x$SHADER_DEBUGGER" = xyes; then - AC_DEFINE(HAVE_SHADER_DEBUGGER, 1, [Have shader debugging support]) + AC_CHECK_PROG([GEN4ASM], intel-gen4asm, intel-gen4asm) + if test -z "$GEN4ASM"; then + AC_MSG_ERROR([Cannot find intel-gen4asm in your path; please set GEN4ASM env variable]) + else + AC_DEFINE(HAVE_SHADER_DEBUGGER, 1, [Have shader debugging support]) + fi fi m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])]) diff --git a/debugger/system_routine/Makefile b/debugger/system_routine/Makefile index 3b071e03..8cb43c63 100644 --- a/debugger/system_routine/Makefile +++ b/debugger/system_routine/Makefile @@ -27,8 +27,7 @@ OBJCOPY?=objcopy PRECPP=./pre_cpp.py CPP_FLAGS=-x assembler-with-cpp -P -GEN_AS?=~/intel-gfx/intel-gen4asm/src/intel-gen4asm -GEN_AS_FLAGS?=-g6 -a -b +GEN4ASM_FLAGS?=-g6 -a -b TEMP:=$(shell mktemp) TEMP2:=$(shell mktemp) @@ -41,7 +40,7 @@ all: sr sr.c: sr.g4a eviction_macro evict.h $(PRECPP) $^ > $(TEMP) $(CPP) $(CPP_FLAGS) $(DEFINES) -o $(TEMP2) $(TEMP) - $(GEN_AS) $(GEN_AS_FLAGS) $(TEMP2) -o $@ + $(GEN4ASM) $(GEN4ASM_FLAGS) $(TEMP2) -o $@ sr : sr.o $(OBJCOPY) -O binary -K gen_eu_bytes $^ $@ @@ -51,7 +50,7 @@ sr : sr.o test.c: test.g4a $(PRECPP) $^ > $(TEMP) $(CPP) $(CPP_FLAGS) $(DEFINES) -o $(TEMP2) $(TEMP) - $(GEN_AS) $(GEN_AS_FLAGS) $(TEMP2) -o $@ + $(GEN4ASM) $(GEN4ASM_FLAGS) $(TEMP2) -o $@ test : test.o $(OBJCOPY) -O binary -K gen_eu_bytes $^ $@ @@ -59,7 +58,7 @@ test : test.o helper: sr.g4a eviction_macro $(PRECPP) $^ > help $(CPP) $(CPP_FLAGS) $(DEFINES) -o help2 help - $(GEN_AS) $(GEN_AS_FLAGS) help2 -o $@ + $(GEN4ASM) $(GEN4ASM_FLAGS) help2 -o $@ eviction_macro : |