From 2d4ad537adfee320e2982d2afda0969386f16353 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 19 Mar 2017 09:03:30 +0100 Subject: [PATCH] Haiku: use pkg-config to find lua The Lua package for Haiku now comes with a pkg-config file, and the includes were moved around, so get things working again. --- src/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Makefile b/src/Makefile index 48ed839f..ec935ce9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -210,13 +210,14 @@ endif CP = cp BIN = ../bin/grafx2 PLATFORMOBJ = $(OBJDIR)/haiku.o - ifeq ($(NOLUA),1) - LUACOPT = - LUALOPT = - else - LUACOPT = -D__ENABLE_LUA__ - LUALOPT = -llua - endif + ifeq ($(NOLUA),1) + LUACOPT = + LUALOPT = + else + LUAPKG=lua + LUACOPT = -D__ENABLE_LUA__ $(shell pkg-config $(LUAPKG) --cflags) + LUALOPT = $(shell pkg-config $(LUAPKG) --libs) + endif COPT = -W -Wall -c -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT) COPT += -DENABLE_FILENAMES_ICONV LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv