summaryrefslogtreecommitdiff
path: root/games/xnethack/files/patch-sys-unix-Makefile.utl
blob: 10fd6bc5aa425cbbdea6b30a723393498d61c238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- sys/unix/Makefile.utl.orig	2021-03-22 22:28:14 UTC
+++ sys/unix/Makefile.utl
@@ -93,18 +93,25 @@ NHSROOT=..
 # flags for debugging:
 # CFLAGS = -g -I../include
 
-#CFLAGS = -O -I../include
-#LFLAGS =
+CFLAGS += -I../include -I${LUA_INCDIR}
+ifeq ("$(GRAPHICS)","X11_GRAPHICS")
+CFLAGS += -DX11_GRAPHICS
+endif
+ifeq ("$(GRAPHICS)","QT_GRAPHICS")
+CFLAGS += -DQT_GRAPHICS
+endif
+ifeq ("$(GRAPHICS)","GNOME_GRAPHICS")
+CFLAGS += -DGNOME_GRAPHICS
+endif
 
-# -lm required by lua
-LFLAGS += -lm
+LFLAGS = -L${LUA_LIBDIR}
 
 # we specify C preprocessor flags via CFLAGS; files built with default rules
 # might include $(CPPFLAGS) which could get a value from user's environment;
 # we avoid that by forcing it empty rather than by overriding default rules
 CPPFLAGS =
 
-LIBS =
+LIBS = -llua-${LUA_VER} -lm
 
 OBJDIR = ../src