summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Stone <cuviper@gmail.com>2015-05-15 12:01:48 -0700
committerJosh Stone <cuviper@gmail.com>2015-05-15 12:01:48 -0700
commit4e38dcab448f054d82a346e3c9d21ac78516a416 (patch)
tree1f6ee3e0d9a588780622b0a351dcf1b1c4fbb5ca
parentede482b2a6e12a6596a3b14c78babffa715b3a6a (diff)
downloadrust-hoedown-4e38dcab448f054d82a346e3c9d21ac78516a416.tar.gz
Support command-line override of CFLAGS
Most of the CFLAGS options can reasonably be changed at will, but a few are necessary. Move those few into HOEDOWN_CFLAGS, so the rest can be overridden, e.g. by distro policy.
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 497b67c..e77613a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
-CFLAGS = -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter -Isrc
+CFLAGS = -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter
PREFIX = /usr/local
+HOEDOWN_CFLAGS = $(CFLAGS) -Isrc
ifneq ($(OS),Windows_NT)
- CFLAGS += -fPIC
+ HOEDOWN_CFLAGS += -fPIC
endif
HOEDOWN_SRC=\
@@ -77,7 +78,7 @@ install:
# Generic object compilations
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(HOEDOWN_CFLAGS) -c -o $@ $<
src/html_blocks.o: src/html_blocks.c
- $(CC) $(CFLAGS) -Wno-static-in-inline -c -o $@ $<
+ $(CC) $(HOEDOWN_CFLAGS) -Wno-static-in-inline -c -o $@ $<