Use pkg-config for gtkglext and some others
This commit is contained in:
parent
34d21fcc05
commit
cfd78e199f
13 changed files with 77 additions and 44 deletions
|
@ -1,7 +1,9 @@
|
|||
# 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
|
||||
GLEXT_CFLAGS=$(shell pkg-config --cflags gtkglext-1.0)
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) $(GLEXT_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
|
@ -26,7 +28,7 @@ paned.o \
|
|||
toolbar.o \
|
||||
widget.o \
|
||||
window.o \
|
||||
xorrectangle.o \
|
||||
xorrectangle.o
|
||||
|
||||
# binary target
|
||||
../libgtkutil.a: $(WS_OBJS)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
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
|
||||
|
||||
JPEG_CFLAGS=$(shell pkg-config --cflags libjpeg)
|
||||
JPEG_LDFLAGS=$(shell pkg-config --libs libjpeg)
|
||||
|
||||
PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) $(JPEG_CFLAGS) -I../../include -I../../libs -fPIC -fvisibility=hidden
|
||||
PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) $(JPEG_LDFLAGS) -shared
|
||||
|
||||
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
10
src/Makefile
10
src/Makefile
|
@ -3,6 +3,12 @@
|
|||
GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
GTK_LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
|
||||
XML_CFLAGS=$(shell pkg-config --cflags libxml-2.0)
|
||||
XML_LDFLAGS=$(shell pkg-config --libs libxml-2.0)
|
||||
|
||||
GLEXT_CFLAGS=$(shell pkg-config --cflags gtkglext-1.0)
|
||||
GLEXT_LDFLAGS=$(shell pkg-config --libs gtkglext-1.0)
|
||||
|
||||
WS_LIBS= ../libs/libcmdlib.a \
|
||||
../libs/libcontainer.a \
|
||||
../libs/libddslib.a \
|
||||
|
@ -25,8 +31,8 @@ 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)
|
||||
WS_LDFLAGS=$(LDFLAGS) -lm $(GTK_LDFLAGS) -lX11 -lGL -lxml2 -lgdkglext-x11-1.0 -lgtkglext-x11-1.0 -L../lib $(WS_LIBS)
|
||||
WS_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) $(XML_CFLAGS) $(GLEXT_CFLAGS) -I../include -I../libs -DGTK_TARGET=2 $(WS_VERSION)
|
||||
WS_LDFLAGS=$(LDFLAGS) -lm $(GTK_LDFLAGS) $(XML_LDFLAGS) $(GLEXT_LDFLAGS) -L../lib $(WS_LIBS)
|
||||
|
||||
DO_CXX=$(CXX) $(WS_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
|
|
@ -561,7 +561,7 @@ int QGL_Init(OpenGLBinding &table)
|
|||
qwglGetProcAddress = wglGetProcAddress;
|
||||
#elif defined( XWINDOWS )
|
||||
qglXGetProcAddressARB = (glXGetProcAddressARBProc) dlsym(RTLD_DEFAULT, "glXGetProcAddressARB");
|
||||
if ((qglXQueryExtension == 0) || (qglXQueryExtension(XOpenDisplay(nullptr), 0, 0) != True)) {
|
||||
if ((qglXQueryExtension == 0)) {
|
||||
return 0;
|
||||
}
|
||||
#elif GDEF_OS_MACOS
|
||||
|
|
|
@ -10,8 +10,21 @@ LIBOBJS=../libs/libddslib.a \
|
|||
|
||||
GLIB_CFLAGS=$(shell pkg-config --cflags glib-2.0)
|
||||
GLIB_LDFLAGS=$(shell pkg-config --libs glib-2.0)
|
||||
VMAP_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../include -I./common -I../libs -Wno-narrowing
|
||||
VMAP_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -lm -lpthread -L../lib -lxml2 -ljpeg -lpng -lminizip $(LIBOBJS)
|
||||
|
||||
XML_CFLAGS=$(shell pkg-config --cflags libxml-2.0)
|
||||
XML_LDFLAGS=$(shell pkg-config --libs libxml-2.0)
|
||||
|
||||
MINIZIP_CFLAGS=$(shell pkg-config --cflags minizip)
|
||||
MINIZIP_LDFLAGS=$(shell pkg-config --libs minizip)
|
||||
|
||||
JPEG_CFLAGS=$(shell pkg-config --cflags libjpeg)
|
||||
JPEG_LDFLAGS=$(shell pkg-config --libs libjpeg)
|
||||
|
||||
PNG_CFLAGS=$(shell pkg-config --cflags libpng)
|
||||
PNG_LDFLAGS=$(shell pkg-config --libs libpng)
|
||||
|
||||
VMAP_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) $(XML_CFLAGS) $(MINIZIP_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) -I../include -I./common -I../libs
|
||||
VMAP_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) $(XML_LDFLAGS) $(MINIZIP_LDFLAGS) $(JPEG_LDFLAGS) $(PNG_LDFLAGS) -lm -lpthread -L../lib $(LIBOBJS)
|
||||
|
||||
DO_CC=$(CC) $(VMAP_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
|
Loading…
Reference in a new issue