Fix the Linux build.

This commit is contained in:
Adrien Destugues 2017-05-06 14:57:25 +02:00
parent a8c7cdff15
commit c0e625fdef

View File

@ -384,18 +384,25 @@ endif
BIN = ../bin/grafx2 BIN = ../bin/grafx2
COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM) COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
COPT += $(shell pkg-config --cflags libpng) COPT += $(shell pkg-config --cflags libpng)
ifneq ($(PLATFORM), FreeBSD) ifneq ($(PLATFORM), FreeBSD)
COPT += -D_XOPEN_SOURCE=700 COPT += -D_XOPEN_SOURCE=700
endif endif
LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT)
LOPT += $(shell pkg-config --libs libpng) LOPT += $(shell pkg-config --libs libpng)
LOPT += $(LUALOPT) -lm LOPT += $(LUALOPT) -lm
LOPT += -liconv
CC = gcc CC = gcc
OBJDIR = ../obj/unix OBJDIR = ../obj/unix
FCLOPT = -lfontconfig FCLOPT = -lfontconfig
# enable UTF8 filename translation # enable UTF8 filename translation
# For Linux (GLibc), iconv is built into the C library so no LOPT needed.
COPT += -DENABLE_FILENAMES_ICONV COPT += -DENABLE_FILENAMES_ICONV
ifneq ($(PLATFORM),Linux)
LOPT += -liconv
endif
endif endif
endif endif
endif endif