summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2016-07-22 00:00:53 -0400
committeryenatch <yenatch@gmail.com>2016-07-22 00:00:53 -0400
commit2eabe20a6527b91b9cec295c0981dc87508381e8 (patch)
tree8d60e3ca35da3e6ecec5dca397dc4d185323942b /tools
parent62ccb5d82819a554b95baf32fb94c28e6b8b2562 (diff)
Reorder LIBS in rsfont and gbagfx.
20:48 asperguy| Also, the order of LIBS is wrong in the rsfont and gbagfx makefiles. It should be -lpng -lz. 20:50 asperguy| I get undefined references unless I swap them. Order does matter. See this stackoverflow post for an explanation. http://stackoverflow.com/questions/2395355/linking-with-libpng-zlib In case the stackoverflow link dies, it says the linker will not realize zlib is actually needed unless libpng comes first, because they are static archives.
Diffstat (limited to 'tools')
-rw-r--r--tools/gbagfx/Makefile2
-rw-r--r--tools/rsfont/Makefile2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile
index 3eb7f0b22..6c8e5e1fa 100644
--- a/tools/gbagfx/Makefile
+++ b/tools/gbagfx/Makefile
@@ -2,7 +2,7 @@ CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
-LIBS = -lz -lpng
+LIBS = -lpng -lz
SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c util.c font.c
diff --git a/tools/rsfont/Makefile b/tools/rsfont/Makefile
index 9ad47cfcf..d2a88c46d 100644
--- a/tools/rsfont/Makefile
+++ b/tools/rsfont/Makefile
@@ -2,7 +2,7 @@ CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
-LIBS = -lz -lpng
+LIBS = -lpng -lz
SRCS = main.c convert_png.c util.c font.c