summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/resources/Makefile_gyp
blob: 84b0cf4b632021b0f4117e0c5ce27f7e6baf5f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

#
# GNU Make based build file.  For details on GNU Make see:
#   http://www.gnu.org/software/make/manual/make.html
#

__PROJECT_LIST__

# Define the default target
all:

CONFIG=debug

#
# Target Macro
#
# Macro defines a phony target for each example, and adds it to a list of
# targets.
#
define TARGET
TARGET_LIST+=$(1)_TARGET
.PHONY: $(1)_TARGET
$(1)_TARGET:
	+$(MAKE) BUILDTYPE=glibc-$(CONFIG) -C $(1)
	+$(MAKE) BUILDTYPE=newlib-$(CONFIG) -C $(1)
	+$(MAKE) BUILDTYPE=host-$(CONFIG) -C $(1)

CLEAN_LIST+=$(1)_CLEAN
.PHONY: $(1)_CLEAN
$(1)_CLEAN:
	+$(MAKE) -C $(1) clean
endef


# Define the various targets via the Macro
$(foreach proj,$(PROJECTS),$(eval $(call TARGET,$(proj))))

__DEPENDENCIES__

all: $(TARGET_LIST)
	echo "Done building targets."

clean: $(CLEAN_LIST)
	echo "Done cleaning targets."

RUN: all
	echo "Staring up python webserver."
	python httpd.py