#-*- mode: makefile; tab-width: 4; -*-
#
######### fwbuilder/qmake.inc.in
#
QTDIR = $$(QTDIR)
TEMPLATE = app
SO_VERSION = @LIBFWBUILDER_SOLIB_VERSION@
DEFINES += $$(DEFINES)
LANGUAGE = C++
UI_DIR = ui
MANDIR = /usr/share/man/
DOCDIR = /usr/share/doc/fwbuilder-3.0.6

HAVE_ANTLR_RUNTIME = 1
HAVE_EXTERNAL_ANTLR = 0

unix {
    PREFIX = /usr

    ANTLR_INCLUDEPATH =  /mnt/fwb/build_root/fwbuilder/src/
    ANTLR_LIBS =  /mnt/fwb/build_root/fwbuilder/src/antlr/libantlr.a
    FWBPARSER_LIB = ../parsers/libfwbparser.a

    QMAKE_CXX = /usr/bin/ccache g++

    !macx {

        UI_DIR = .ui
        MOC_DIR = .moc
        OBJECTS_DIR = .obj

        exec_prefix = @EXEC_PREFIX@
        DESTDIR =
        ICONSDIR = /usr/share//icons/hicolor/

        INCLUDEPATH += .. ../.. $$(INCLUDEPATH) /usr/include/fwb-3 /usr/include/libxml2

        LIBS_FWCOMPILER = -Wl,-Bsymbolic-functions -pthread -lfwcompiler -lfwbuilder -lz -lxslt -lxml2 -lnetsnmp
        LIBS_FWBUILDER = -Wl,-Bsymbolic-functions -pthread -lfwbuilder -lz -lxslt -lxml2 -lnetsnmp

        target.path = $$PREFIX/bin
        dtd.path = @TEMPLATE_DIR@/
        migration.path = @TEMPLATE_DIR@/migration
        doc.path = /usr/share/doc/fwbuilder-3.0.6
        datadir.path   = /usr/share/

        res.path = /usr/share/fwbuilder-3.0.6
        res_os.path = /usr/share/fwbuilder-3.0.6/os/
        res_platform.path = /usr/share/fwbuilder-3.0.6/platform/
        res_help.path = /usr/share/fwbuilder-3.0.6/help/
        res_desktop.path = /usr/share//applications/

        INSTALLS += res 
        INSTALLS += res_os
        INSTALLS += res_platform
        # INSTALLS += icns
        LIBS += $$LIBS_FWBUILDER -lutil 

        PKGLOCALEDIR = $$res.path/locale

        CONFIG += warn_on debug
        QMAKE_CFLAGS_DEBUG += -Wno-unused-parameter
        QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
        QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter -g -O2
        QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter -g -O2
    }
}

win32 {
    CONFIG -= debug
}

exists(qmake2.inc) {
  include(qmake2.inc)
}

INSTALLS += target
