# $NetBSD: qmake.conf,v 1.17 2004/11/12 06:39:21 jlam Exp $
# $Id: qmake.conf,v 1.17 2004/11/12 06:39:21 jlam Exp $
#
# qmake configuration for netbsd-g++
#

MAKEFILE_GENERATOR	= UNIX
TEMPLATE		= app
CONFIG			+= qt warn_on release

QMAKE_CC		= cc
QMAKE_LEX		= lex
QMAKE_LEXFLAGS		= 
QMAKE_YACC		= 
QMAKE_YACCFLAGS		= -d
QMAKE_CFLAGS		= -O
QMAKE_CFLAGS_DEPS	= -M
QMAKE_CFLAGS_WARN_ON	= 
QMAKE_CFLAGS_WARN_OFF	=
QMAKE_CFLAGS_RELEASE	=
QMAKE_CFLAGS_DEBUG	= -g
QMAKE_CFLAGS_SHLIB	= 
QMAKE_CFLAGS_YACC	= -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD	= -D_REENTRANT

QMAKE_CXX		= CC
QMAKE_CXXFLAGS		= -O -DQ_TRAILING_DIR_SEP
QMAKE_CXXFLAGS_DEPS	= $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON	= $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF	= $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE	= $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG	= $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB	= $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC	= $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD	= $$QMAKE_CFLAGS_THREAD

QMAKE_INCDIR		= /usr/pkg/include
QMAKE_LIBDIR		= /usr/pkg/lib
QMAKE_INCDIR_X11	= /usr/openwin/include
QMAKE_LIBDIR_X11	= /usr/openwin/lib
QMAKE_INCDIR_QT		= $(QTDIR)/include
QMAKE_LIBDIR_QT		= $(QTDIR)/lib
QMAKE_INCDIR_OPENGL	= /usr/pkg/include
QMAKE_LIBDIR_OPENGL	= /usr/pkg/lib

QMAKE_LINK		= /usr/pkg/bin/libtool --mode=link CC
QMAKE_LINK_SHLIB_CMD    = \
	/usr/pkg/bin/libtool --mode=link CC $(LFLAGS) \
		-o $(if $(TARGET0), \
			$(patsubst %.so,%.la,$(DESTDIR)$(TARGET0)), \
			$(patsubst %.so,%.la,$(DESTDIR)$(TARGET))) \
                $(if $(TARGET0), \
                        -version-info $(subst $(TARGET0).,,$(TARGET1)):$(subst $(TARGET1).,,$(TARGET2)), \
                        -module -avoid-version) \
		$(OBJECTS:.o=.lo) $(OBJMOC:.o=.lo) $(LIBS) \
		-rpath $(if $(TARGET0), \
			$(QTPREFIX)/lib, \
			$(subst ../../..,$(QTPREFIX)/plugins,$(DESTDIR)))
QMAKE_LFLAGS		= $(LDFLAGS) -L$(QTDIR)/lib
QMAKE_LFLAGS_RELEASE	=
QMAKE_LFLAGS_DEBUG	=
QMAKE_LFLAGS_SHLIB	= 
QMAKE_LFLAGS_PLUGIN	= $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME	=
QMAKE_RPATH		= -R

QMAKE_RUN_CC		= /usr/pkg/bin/libtool --mode=compile cc -c $(CFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CC_IMP	= /usr/pkg/bin/libtool --mode=compile cc -c $(CFLAGS) $(INCPATH) -o $@ $<
QMAKE_RUN_CXX		= /usr/pkg/bin/libtool --mode=compile CC -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP	= /usr/pkg/bin/libtool --mode=compile CC -c $(CXXFLAGS) $(INCPATH) -o $@ $<

QMAKE_LIBS		=
QMAKE_LIBS_DYNLOAD	= 
QMAKE_LIBS_X11		= -lXext -lX11 -lm -lresolv -lsocket -lnsl -lrt
QMAKE_LIBS_X11SM	= -lICE -lSM
QMAKE_LIBS_QT		= -lqt-mt
QMAKE_LIBS_QT_THREAD	= -lqt-mt
QMAKE_LIBS_THREAD	=  -lpthread -lrt

QMAKE_LIBS_OPENGL	= -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT	= -lGL -lXmu

QMAKE_MOC		= $(QTDIR)/bin/moc
QMAKE_UIC		= $(QTDIR)/bin/uic

QMAKE_AR		= ar ru
QMAKE_RANLIB		= true

QMAKE_TAR		= tar -cf
QMAKE_GZIP		= gzip -9f

QMAKE_COPY		= cp -f
QMAKE_MOVE		= mv
QMAKE_DEL_FILE		= rm -f
QMAKE_DEL_DIR		= rmdir
QMAKE_CHK_DIR_EXISTS	= test -d
QMAKE_MKDIR		= /usr/bin/mkdir -p
