blob: b36925f422b2758f9270ad8783bb34edb64334da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- jq-jq-1.2/Makefile
+++ jq-jq-1.2/Makefile
@@ -1,5 +1,5 @@
-CC=gcc
-CFLAGS=-Wextra -Wall -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu99 -ggdb -Wno-unused-function $(EXTRA_CFLAGS)
+CC?=gcc
+CFLAGS+=-Wextra -Wall -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu99 -Wno-unused-function $(EXTRA_CFLAGS)
prefix=/usr/local
mandir=$(prefix)/share/man
@@ -28,11 +28,10 @@
jq_test: CFLAGS += -DJQ_DEBUG=1
jq_test: $(JQ_SRC) jq_test.c
- $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) $(CFLAGS_DEBUG) -o $@ $^
-jq: CFLAGS += -O -DJQ_DEBUG=0
jq: $(JQ_SRC) main.c
- $(CC) $(CFLAGS) $(CFLAGS_OPT) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) $(CFLAGS_OPT) -o $@ $^
test: jq_test
valgrind --error-exitcode=1 -q --leak-check=full ./jq_test >/dev/null
|