pokeruby/tools/rsfont/Makefile
yenatch 2eabe20a65 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.
2016-07-22 00:00:53 -04:00

16 lines
278 B
Makefile

CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
LIBS = -lpng -lz
SRCS = main.c convert_png.c util.c font.c
.PHONY: clean
rsfont: $(SRCS) convert_png.h gfx.h global.h util.h font.h
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LIBS)
clean:
$(RM) rsfont rsfont.exe