Skip to content

Commit

Permalink
Support command-line override of CFLAGS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cuviper committed May 15, 2015
1 parent ede482b commit 4e38dca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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=\
Expand Down Expand Up @@ -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 $@ $<

0 comments on commit 4e38dca

Please sign in to comment.