From 1b24c055a75ae231e2634a5aa4faa62113d60d53 Mon Sep 17 00:00:00 2001 From: Douglas Johnson Date: Sat, 20 Apr 2013 16:47:42 -0600 Subject: [PATCH] If global CFLAGS not set use -O2 as a default for submodules Issue #168 --- Makefile.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 13e96c37d95..3e733b9f915 100644 --- a/Makefile.in +++ b/Makefile.in @@ -92,8 +92,16 @@ endif rust: $(CFG_RUSTC) define DEF_SUBMODULE_VARS + +#defaults DEPS_$(1) = -CFLAGS_$(1) = $$(CFLAGS) +CFLAGS_$(1) = -O2 + +#if global cflags set, inherit that +ifneq ($$(CFLAGS),) + CFLAGS_$(1) = $$(CFLAGS) +endif + # any "done" dummy files must be named libSOMETHING.dummy. # # We can't auto-compute this, because some modules have lib* prefix in