# your project only builds in one or the other then this should be overridden
# accordingly.
#
-ALL_TOOLCHAINS ?= pnacl newlib glibc
ifneq ($(ENABLE_BIONIC),)
-ALL_TOOLCHAINS += bionic
+ALL_TOOLCHAINS ?= pnacl newlib glibc bionic
+else
+ALL_TOOLCHAINS ?= pnacl newlib glibc
endif
VALID_TOOLCHAINS ?= $(ALL_TOOLCHAINS)
NACL_CONFIG := python $(NACL_SDK_ROOT)/tools/nacl_config.py
FIXDEPS := python $(NACL_SDK_ROOT)/tools/fix_deps.py -c
OSNAME := $(shell $(GETOS))
-GDB_PATH := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=gdb)
#
NULL :=
SPACE := $(NULL) # one space after NULL is required
CHROME_PATH_ESCAPE := $(subst $(SPACE),\ ,$(CHROME_PATH))
+GDB_PATH := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=gdb)
.PHONY: check_for_chrome
check_for_chrome:
$(CHROME_PATH_ESCAPE) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS)
GDB_ARGS += -D $(GDB_PATH)
+# PNaCl's nexe is acquired with "remote get nexe <path>" instead of the NMF.
+ifeq (,$(findstring $(TOOLCHAIN),pnacl))
GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf"
GDB_ARGS += -D $(GDB_DEBUG_TARGET)
+endif
.PHONY: debug
debug: check_for_chrome all $(PAGE)