#
# qmake configuration for pkgsrc
#

MAKEFILE_GENERATOR	= UNIX
CONFIG += qt warn_on release link_prl incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib



include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
include(../common/unix.conf)

QMAKE_COMPILER		= gcc

QMAKE_CC		= gcc
QMAKE_CXX		= c++
QMAKE_CFLAGS		= -O2  -D_NETBSD_SOURCE -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/pkg/lib/dbus-1.0/include/dbus -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/freetype2 -I/usr/pkg/include/python3.13 -I/usr/X11R7/include -I/usr/X11R7/include/libdrm
QMAKE_CXXFLAGS		= -O2 -D_NETBSD_SOURCE -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/pkg/lib/dbus-1.0/include/dbus -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/freetype2 -I/usr/pkg/include/python3.13 -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -Wno-register
QMAKE_LEX		= lex
QMAKE_YACC		= 

QMAKE_INCDIR		= /usr/pkg/include
QMAKE_LIBDIR		= /usr/pkg/lib
QMAKE_INCDIR_X11	= /usr/X11R7/include
QMAKE_LIBDIR_X11	= /usr/X11R7/lib
QMAKE_INCDIR_OPENGL	= /usr/X11R7/include
QMAKE_LIBDIR_OPENGL	= /usr/X11R7/lib

QMAKE_LINK_SHLIB_CMD	= $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)

QMAKE_LFLAGS		=  -lexecinfo -Wl,-R/usr/pkg/qt6/lib -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -latomic
QMAKE_LFLAGS_GCSECTIONS	= -Wl,--gc-sections
QMAKE_LFLAGS_RPATHLINK	=
QMAKE_LFLAGS_THREAD	=  -pthread

QMAKE_LIBS		=
QMAKE_LIBS_DYNLOAD	=
QMAKE_LIBS_X11		= -lXext -lX11 -lm 
QMAKE_LIBS_OPENGL	= -lGL
QMAKE_LIBS_OPENGL_QT	= -lGL
QMAKE_LIBS_THREAD	= 
QMAKE_LIBS_NETWORK	= 

QMAKE_AR		= ar cqs
QMAKE_OBJCOPY           = objcopy
QMAKE_NM		= nm -P
QMAKE_RANLIB		= ranlib

QMAKE_MOC		= $(QTDIR)/bin/moc
QMAKE_UIC		= $(QTDIR)/bin/uic
QMAKE_UIC3		= $(QTDIR)/bin/uic3
QMAKE_RCC		= $(QTDIR)/bin/rcc

QMAKE_MKDIR		= /bin/mkdir -p

load(qt_config)
