| Index: native_client_sdk/src/examples/Makefile
|
| diff --git a/native_client_sdk/src/examples/Makefile b/native_client_sdk/src/examples/Makefile
|
| index 6ca12be8a48d0d3466b70947babf863baeb1f9cd..e21cbe814de267ba8cf196fe887d3b4ed6fdc1f6 100644
|
| --- a/native_client_sdk/src/examples/Makefile
|
| +++ b/native_client_sdk/src/examples/Makefile
|
| @@ -14,6 +14,10 @@ PROJECTS:= \
|
|
|
| HTTPD:={{rel_sdk}}/tools/httpd.py
|
|
|
| +ifeq ($(TOOLCHAIN),all)
|
| +TOOLCHAIN_ARG:=TOOLCHAIN=all
|
| +endif
|
| +
|
| # Define the default target
|
| all:
|
|
|
| @@ -23,41 +27,37 @@ all:
|
| # Macro defines a phony target for each example, and adds it to a list of
|
| # targets.
|
| #
|
| +# Note: We use targets for each project (instead of an explicit recipe) so
|
| +# each project can be built in parallel.
|
| +#
|
| define TARGET
|
| TARGET_LIST+=$(1)_TARGET
|
| .PHONY: $(1)_TARGET
|
| $(1)_TARGET:
|
| - +$(MAKE) -C $(1)
|
| -
|
| -VERSIONS_LIST+=$(1)_VERSIONS
|
| -.PHONY: $(1)_VERSIONS
|
| -$(1)_VERSIONS:
|
| - +$(MAKE) -C $(1) all_versions
|
| -
|
| -CLEAN_LIST+=$(1)_CLEAN
|
| -.PHONY: $(1)_CLEAN
|
| -$(1)_CLEAN:
|
| - +$(MAKE) -C $(1) clean
|
| + +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) $(MAKECMDGOALS)
|
| endef
|
|
|
|
|
| # Define the various targets via the Macro
|
| $(foreach proj,$(PROJECTS),$(eval $(call TARGET,$(proj))))
|
|
|
| +.PHONY: all
|
| all: $(TARGET_LIST)
|
| @echo Done building targets.
|
|
|
| -all_versions: $(VERSIONS_LIST)
|
| - @echo Done building all versions.
|
| -
|
| -clean: $(CLEAN_LIST)
|
| +.PHONY: clean
|
| +clean: $(TARGET_LIST)
|
| @echo Done cleaning targets.
|
|
|
| +.PHONY: run
|
| run: all
|
| @echo Starting up python webserver.
|
| python $(HTTPD)
|
|
|
| -# uppercase aliases (for backward compatibility)
|
| +# Phony aliases for backward compatibility
|
| RUN: run
|
|
|
| -.PHONY: RUN run
|
| +all_versions:
|
| + +$(MAKE) TOOLCHAIN=all
|
| +
|
| +.PHONY: RUN all_versions
|
|
|