1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 # GNU Make based build file. For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html
10 # Always use cmd.exe as the shell on Windows. Otherwise Make may try to search
11 # the path for sh.exe. If it is found in a path with a space, the command will
13 ifeq ($(OS),Windows_NT)
18 [[for project in projects:]]
22 [[for dep,vals in deps.iteritems():]]
23 {{dep}}_DEPS:={{'_ALL_TARGET '.join(vals) + '_ALL_TARGET'}}
26 HTTPD_PY := python {{rel_sdk}}/tools/httpd.py
28 ifeq ($(TOOLCHAIN),all)
29 TOOLCHAIN_ARG:=TOOLCHAIN=all
32 # Define the default target
38 # Macro defines a phony target for each example, and adds it to a list of
41 # Note: We use targets for each project (instead of an explicit recipe) so
42 # each project can be built in parallel.
45 ALL_TARGET_LIST+=$(1)_ALL_TARGET
46 .PHONY: $(1)_ALL_TARGET
47 $(1)_ALL_TARGET: $$($(1)_DEPS)
48 +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) all
50 CLEAN_TARGET_LIST+=$(1)_CLEAN_TARGET
51 .PHONY: $(1)_CLEAN_TARGET
53 +$(MAKE) -C $(1) $(TOOLCHAIN_ARG) clean
57 # Define the various targets via the Macro
58 $(foreach proj,$(PROJECTS),$(eval $(call TARGET,$(proj))))
61 all: $(ALL_TARGET_LIST)
62 @echo Done building targets.
65 clean: $(CLEAN_TARGET_LIST)
66 @echo Done cleaning targets.
70 @echo Starting up python webserver.
73 # Phony aliases for backward compatibility
78 +$(MAKE) TOOLCHAIN=all
80 .PHONY: RUN all_versions