From 16811dcf6cc0bf4cbc812dcbd90acab6ec126471 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sun, 6 Jun 2021 19:16:11 +0200 Subject: [PATCH] Get rid of -DXWINDOWS in the Makefiles --- libs/globaldefs.h | 2 ++ libs/gtkutil/Makefile | 2 +- libs/uilib/Makefile | 2 +- libs/xml/Makefile | 2 +- plugins/brushexport/Makefile | 2 +- plugins/entity/Makefile | 2 +- plugins/image/Makefile | 2 +- plugins/iqmmodel/Makefile | 2 +- plugins/mapq3/Makefile | 2 +- plugins/model/Makefile | 2 +- plugins/prtview/Makefile | 2 +- plugins/shaders/Makefile | 2 +- plugins/vfspk3/Makefile | 2 +- src/Makefile | 2 +- 14 files changed, 15 insertions(+), 13 deletions(-) diff --git a/libs/globaldefs.h b/libs/globaldefs.h index 316bfcc..19c4623 100644 --- a/libs/globaldefs.h +++ b/libs/globaldefs.h @@ -27,8 +27,10 @@ #if defined(POSIX) || defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) #define GDEF_OS_POSIX 1 +#define XWINDOWS 1 #else #define GDEF_OS_POSIX 0 +#define XWINDOWS 0 #endif #if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) diff --git a/libs/gtkutil/Makefile b/libs/gtkutil/Makefile index 1e28f85..d9b1754 100644 --- a/libs/gtkutil/Makefile +++ b/libs/gtkutil/Makefile @@ -1,7 +1,7 @@ # WorldSpawn Makefile GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include/ -I../../libs -DGTK_TARGET=2 -DXWINDOWS +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include/ -I../../libs -DGTK_TARGET=2 DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< .cpp.o: diff --git a/libs/uilib/Makefile b/libs/uilib/Makefile index f963178..63739b2 100644 --- a/libs/uilib/Makefile +++ b/libs/uilib/Makefile @@ -1,7 +1,7 @@ # WorldSpawn Makefile GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DXWINDOWS +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< .cpp.o: diff --git a/libs/xml/Makefile b/libs/xml/Makefile index de9d084..85b35f4 100644 --- a/libs/xml/Makefile +++ b/libs/xml/Makefile @@ -1,7 +1,7 @@ # WorldSpawn Makefile GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DXWINDOWS +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< .cpp.o: diff --git a/plugins/brushexport/Makefile b/plugins/brushexport/Makefile index 26aeeb0..4ee1c4c 100644 --- a/plugins/brushexport/Makefile +++ b/plugins/brushexport/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Plugin Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/entity/Makefile b/plugins/entity/Makefile index ef3c86b..50b8886 100644 --- a/plugins/entity/Makefile +++ b/plugins/entity/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/image/Makefile b/plugins/image/Makefile index 062db16..658433a 100644 --- a/plugins/image/Makefile +++ b/plugins/image/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared -ljpeg diff --git a/plugins/iqmmodel/Makefile b/plugins/iqmmodel/Makefile index 2670e88..933fe0f 100644 --- a/plugins/iqmmodel/Makefile +++ b/plugins/iqmmodel/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/mapq3/Makefile b/plugins/mapq3/Makefile index 62beeeb..a10fce1 100644 --- a/plugins/mapq3/Makefile +++ b/plugins/mapq3/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/model/Makefile b/plugins/model/Makefile index 02658ef..9f7f7bc 100644 --- a/plugins/model/Makefile +++ b/plugins/model/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/prtview/Makefile b/plugins/prtview/Makefile index d205f7c..9576ed0 100644 --- a/plugins/prtview/Makefile +++ b/plugins/prtview/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Plugin Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/shaders/Makefile b/plugins/shaders/Makefile index 0482421..1dc49d1 100644 --- a/plugins/shaders/Makefile +++ b/plugins/shaders/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/plugins/vfspk3/Makefile b/plugins/vfspk3/Makefile index 1703bcd..475033d 100644 --- a/plugins/vfspk3/Makefile +++ b/plugins/vfspk3/Makefile @@ -1,6 +1,6 @@ # WorldSpawn Makefile -GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared diff --git a/src/Makefile b/src/Makefile index 71014a9..7503504 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,7 +25,7 @@ WS_LIBS= ../libs/libcmdlib.a \ ../libs/libuilib.a \ ../libs/libxmllib.a -WS_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../include -I../libs -DGTK_TARGET=2 $(WS_VERSION) -DXWINDOWS +WS_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../include -I../libs -DGTK_TARGET=2 $(WS_VERSION) WS_LDFLAGS=$(LDFLAGS) -lm $(GTK_LDFLAGS) -lX11 -lGL -lxml2 -lgdkglext-x11-1.0 -lgtkglext-x11-1.0 -L../lib $(WS_LIBS) DO_CXX=$(CXX) $(WS_CFLAGS) -o $@ -c $<