#
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
-CONFIG += qt debug
+CONFIG += qt debug @QWT@
bins.path = /$(DESTDIR)@sbindir@
-bins.files = ./bat
+bins.files = bat
confs.path = /$(DESTDIR)@sysconfdir@
confs.commands = ./install_conf_file
+help.path = /$(DESTDIR)@htmldir@
+help.files = help/*.html images/status.png images/mail-message-new.png
TEMPLATE = app
TARGET = bat
DEPENDPATH += .
INCLUDEPATH += .. . ./console ./restore ./select
-INCLUDEPATH += @QWT_INC@
-LIBS += -L../lib -lbac @OPENSSL_LIBS@
-LIBS += @QWT_LDFLAGS@ -lqwt
+LIBS += -L../lib -lbaccfg -lbac @OPENSSL_LIBS@
+LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
+LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
+QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
+QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m 0754 -p
+QMAKE_CLEAN += .libs/* bat
+
+qwt {
+ INCLUDEPATH += @QWT_INC@
+ LIBS += @QWT_LDFLAGS@ @QWT_LIB@
+}
RESOURCES = main.qrc
MOC_DIR = moc
FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
FORMS += joblog/joblog.ui jobs/jobs.ui
FORMS += help/help.ui
-FORMS += jobgraphs/jobplotcontrols.ui
FORMS += status/dirstat.ui
FORMS += status/clientstat.ui
FORMS += status/storstat.ui
+qwt {
+ FORMS += jobgraphs/jobplotcontrols.ui
+}
# Main directory
HEADERS += mainwin.h bat.h bat_conf.h qstd.h pages.h
# Console
HEADERS += console/console.h
-SOURCES += console/authenticate.cpp console/console.cpp
+SOURCES += console/console.cpp
# Restore
HEADERS += restore/restore.h
SOURCES += restore/restoretree.cpp
## Job Step Graphs
-HEADERS += jobgraphs/jobplot.h
-SOURCES += jobgraphs/jobplot.cpp
+qwt {
+ HEADERS += jobgraphs/jobplot.h
+ SOURCES += jobgraphs/jobplot.cpp
+}
# Help dialog
HEADERS += help/help.h
HEADERS += status/storstat.h
SOURCES += status/storstat.cpp
-INSTALLS += bins
-INSTALLS += confs
+# Utility sources
+HEADERS += util/fmtwidgetitem.h util/comboutil.h
+SOURCES += util/fmtwidgetitem.cpp util/comboutil.cpp
+
+INSTALLS = bins confs help
QMAKE_EXTRA_TARGETS += depend