summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-03-13 21:04:44 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-03-13 21:04:44 -0400
commit297fe5de717870601dd0f0a5dad778027bc5729e (patch)
tree6dd1f05944eaec1c9c28ed741f1e0518006ff801
parentcd1ea8629e5e9c3f647b4a7f7840f66dfe649662 (diff)
downloadkd-forest-297fe5de717870601dd0f0a5dad778027bc5729e.tar.xz
Put -lm -lpng at the end of the command line.
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 582b209..7a23863 100644
--- a/Makefile
+++ b/Makefile
@@ -11,15 +11,18 @@
CC ?= gcc
CFLAGS ?= -std=c99 -pipe -O2 -Werror -Wall -Wpedantic -Wextra -Wno-sign-compare -Wno-unused-parameter -Wunreachable-code -Wshadow -Wpointer-arith -Wwrite-strings -Wcast-align -Wstrict-prototypes
-LDFLAGS ?= -lm -lpng
+LDFLAGS ?= -Wl,-O1,--sort-common,--as-needed,-z,relro
+LIBS ?= -lm -lpng
RM ?= rm -f
kd-forest: kd-forest.c kd-forest.h util.c util.h color.c color.h main.c
- $(CC) $(CFLAGS) $(LDFLAGS) -o kd-forest kd-forest.c util.c color.c main.c
+ $(CC) $(CFLAGS) $(LDFLAGS) kd-forest.c util.c color.c main.c $(LIBS) -o kd-forest
-image: kd-forest
+kd-forest.png: kd-forest
./kd-forest
+image: kd-forest.png
+
clean:
$(RM) kd-forest