Skip to content

Commit 6eb856e

Browse files
tescanderosslagerwall
authored andcommitted
Makefile: Add EXTRA_CFLAGS to CFLAGS
This patch allows passing of extra compilation flags from command line using 'make EXTRA_CFLAGS=-DFOO'. Signed-off-by: Thierry Escande <[email protected]>
1 parent bc1c3ec commit 6eb856e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ CFLAGS = -I$(shell pwd)/include
1919
# _GNU_SOURCE for asprintf.
2020
CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
2121

22+
# EXTRA_CFLAGS can be set through make command line
23+
CFLAGS += $(EXTRA_CFLAGS)
24+
2225
CFLAGS += $$(pkg-config --cflags libxml-2.0)
2326

2427
CFLAGS += -g -O2 -std=gnu99 \

0 commit comments

Comments
 (0)