summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-02 12:57:47 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-02 12:57:47 -0600
commit5fa621f8dfe2ccd674d8d94eb148c10b52b4fca0 (patch)
tree37ef5cf831ee18d02d44bc9a7021905bf4f5e823 /Makefile
parentee165667d271b29eef70c9726bf6af45778cb470 (diff)
Turn on C warnings/errors
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 32cf638..492bb7a 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@ systemddir = $(libdir)/systemd
GOPATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
+CFLAGS = -std=c99 -Wall -Wextra -Werror -pedantic
+CGO_CFLAGS = $(CFLAGS) -Wno-unused-parameter
+
deps = gopkg.in/yaml.v2
subdirs = src/nslcd_proto
@@ -38,7 +41,7 @@ $(foreach d,$(deps),$(eval src/$d: NET; GOPATH='$(GOPATH)' go get -d -u $d))
.PHONY: NET
bin/nshd: $(download) $(generate) $(shell find src -name .git -prune -o -print)
- GOPATH='$(GOPATH)' go install nshd
+ GOPATH='$(GOPATH)' CGO_CFLAGS='$(CGO_CFLAGS)' go install nshd
$(DESTDIR)$(bindir)/%: bin/%
install -Dm755 $< $@