diff options
author | Josh Stone <cuviper@gmail.com> | 2015-05-15 12:01:48 -0700 |
---|---|---|
committer | Josh Stone <cuviper@gmail.com> | 2015-05-15 12:01:48 -0700 |
commit | 4e38dcab448f054d82a346e3c9d21ac78516a416 (patch) | |
tree | 1f6ee3e0d9a588780622b0a351dcf1b1c4fbb5ca | |
parent | ede482b2a6e12a6596a3b14c78babffa715b3a6a (diff) | |
download | rust-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-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 $@ $< |