Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: native_client_sdk/src/tools/host_vc.mk

Issue 12395032: [NaCl SDK] Handle sources outside root in example build system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/tools/host_vc.mk
diff --git a/native_client_sdk/src/tools/host_vc.mk b/native_client_sdk/src/tools/host_vc.mk
index d1b45cdc85fb35fd5c0609fa5d45bd0e43343aac..fb62167c6a8c916e8b75544f3ef4eea1a5b51e95 100644
--- a/native_client_sdk/src/tools/host_vc.mk
+++ b/native_client_sdk/src/tools/host_vc.mk
@@ -43,14 +43,12 @@ WIN_FLAGS?=-D WIN32 -D _WIN32 -D PTW32_STATIC_LIB
# $2 = Compile Flags
#
define C_COMPILER_RULE
--include $(OUTDIR)/$(basename $(1)).d
-$(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1)))dir.stamp
+$(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.stamp
$(call LOG,CC,$$@,$(HOST_CC) /Fo$$@ /c $$< $(WIN_OPT_FLAGS) $(2) $(WIN_FLAGS))
endef
define CXX_COMPILER_RULE
--include $(OUTDIR)/$(basename $(1)).d
-$(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1)))dir.stamp
+$(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.stamp
$(call LOG,CXX,$$@,$(HOST_CXX) /Fo$$@ -c $$< $(WIN_OPT_FLAGS) $(2) $(WIN_FLAGS))
endef
@@ -60,7 +58,7 @@ endef
# $3 = VC Compile Flags
#
define COMPILE_RULE
-ifeq ('.c','$(suffix $(1))')
+ifeq ($(suffix $(1)),.c)
$(call C_COMPILER_RULE,$(1),$(3) $(foreach inc,$(INC_PATHS),/I$(inc)))
else
$(call CXX_COMPILER_RULE,$(1),$(3) $(foreach inc,$(INC_PATHS),/I$(inc)))

Powered by Google App Engine
This is Rietveld 408576698