[PATCH v3 6/7] Makefile: Define CFLAGS_FORCE_C_SOURCE macro
Kevin Locke <[email protected]> Wed, 28 Sep 2016 18:44:47 -0600
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <3c34ab90ca8a21768ec863afb29ebff14a814f48.1475109043.git.kevin@kevinlocke.name> |
This macro holds the C compiler flag(s) to force input files to be recognized as C sources regardless of extension. It is defined to allow overriding on the make command line. Signed-off-by: Kevin Locke <[email protected]> --- Makefile | 2 +- Makefile-ccan | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 127b875..37ff17d 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ summary-fastcheck/%: tools/ccanlint/ccanlint $(OBJFILES) $(CCANLINT_FAST) -s ccan/$* ccan/%/info: ccan/%/_info config.h - $(CC) $(CCAN_CFLAGS) -I. -o $@ -x c $< + $(CC) $(CCAN_CFLAGS) -I. -o $@ $(CFLAGS_FORCE_C_SOURCE) $< all_info: $(MODS:%=ccan/%/info) diff --git a/Makefile-ccan b/Makefile-ccan index 5c8dea2..d4a5528 100644 --- a/Makefile-ccan +++ b/Makefile-ccan @@ -5,6 +5,7 @@ #CCAN_CFLAGS=-g -O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -Wundef -DCCAN_STR_DEBUG=1 CCAN_CFLAGS=-g3 -ggdb -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -Wundef -DCCAN_STR_DEBUG=1 CFLAGS = $(CCAN_CFLAGS) -I. $(DEPGEN) +CFLAGS_FORCE_C_SOURCE = -x c MODS := a_star \ aga \ -- 2.9.3 _______________________________________________ ccan mailing list [email protected] https://lists.ozlabs.org/listinfo/ccan