1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
# ****************************************************************************
# Project: GUYMAGER
# ****************************************************************************
# Programmer: Guy Voncken
# Police Grand-Ducale
# Service de Police Judiciaire
# Section Nouvelles Technologies
# ****************************************************************************
# Qt project file
# ****************************************************************************
# Command line configuration options
# ----------------------------------
# These options are thought to behave like the classical ./configure options, i.e. they
# allow for using different paths and such things. Currently, there's only one pre-compiler
# definition:
# SPLASH_DIR Defines where to look for the splash image (splash.png)
# Example:
# qmake DEFINES+="SPLASH_DIR=\'\\\"/usr/share/guymager\\\"\'"
# Remark: The backslash-tick-quote-nightmare comes from the fact,
# that bash eats some part of, qmake some more and finally again
# bash when Makefile calls g++.
#
# LANGUAGE_DIR Tells Guymager where to look for the language files. Usually the
# same than SPLASH_DIR.
#
# LANGUAGE_DIR_QT The location of Qt's language files (i.e. the files qhere Qt
# stores language dependent texts fot its dialogs, messages, etc.)
# On a Debian system, this usually is /usr/share/qt4/translations.
# qmake DEFINES+="LANGUAGE_DIR_QT=\'\\\"/usr/share/qt4/translations\\\"\'"
TEMPLATE = app
CONFIG = qt release warn_on qdbus
TARGET = guymager
MOC_DIR = ./moc
INCLUDEPATH += /usr/include/libguytools1
# LIBEWF_VERSION only must be defined for compiling with libewf before 20080309
# Newer libewf version already include this macro in file definitions.h.
# DEFINES += LIBEWF_VERSION=20071111
# Add compile time information
# ----------------------------
# Compile time information is written to compileinfo.cpp by means of the date command. The command in QMAKE_PRE_LINK ensures that
# compileinfo.cpp is rewritten and compiled whenever a new exe needs to be created. In order not to get a qmake error because of
# the missing compileinfo.o (the very first time when it is compiled), the line starting with 'DummyResult' creates a dummy
# compileinfo.o whenever qmake is called.
#QMAKE_PRE_LINK = echo \'// Automatically generated file. See project file for further information.\' > compileinfo.cpp
#QMAKE_PRE_LINK += && date \'+const char *pCompileInfoTimestamp = \"%Y-%m-%d-%H.%M.%S\";\' >> compileinfo.cpp
QMAKE_PRE_LINK = ./compileinfo.sh > compileinfo.cpp
QMAKE_PRE_LINK += && $(CXX) -c $(CXXFLAGS) compileinfo.cpp
DummyResult = $$system(echo DummyCompileInfoPunktO > compileinfo.o)
OBJECTS += compileinfo.o
SOURCES += aaff.cpp
SOURCES += config.cpp
SOURCES += device.cpp
SOURCES += dlgabort.cpp
SOURCES += dlgacquire.cpp
SOURCES += dlgdirsel.cpp
SOURCES += dlgmessage.cpp
SOURCES += dlgwait.cpp
SOURCES += error.cpp
SOURCES += fifo.cpp
SOURCES += file.cpp
SOURCES += hash.cpp
SOURCES += info.cpp
SOURCES += infofield.cpp
SOURCES += itemdelegate.cpp
SOURCES += main.cpp
SOURCES += mainwindow.cpp
SOURCES += md5.c
SOURCES += memwatch.c
SOURCES += qtutil.cpp
#SOURCES += sha256.cpp
SOURCES += table.cpp
SOURCES += threadcompress.cpp
SOURCES += threadhash.cpp
SOURCES += threadread.cpp
SOURCES += threadscan.cpp
SOURCES += threadwrite.cpp
SOURCES += util.cpp
HEADERS += config.h
HEADERS += devicelistmodel.h
HEADERS += dlgabort.h
HEADERS += dlgacquire.h
HEADERS += dlgacquire_private.h
HEADERS += dlgdirsel.h
HEADERS += dlgdirsel_private.h
HEADERS += dlgmessage.h
HEADERS += dlgwait.h
HEADERS += infofield.h
HEADERS += itemdelegate.h
HEADERS += mainwindow.h
HEADERS += memwatch.h
HEADERS += table.h
HEADERS += threadcompress.h
HEADERS += threadhash.h
HEADERS += threadread.h
HEADERS += threadscan.h
HEADERS += threadwrite.h
HEADERS += util.h
QMAKE_CXXFLAGS_WARN_ON += -fmessage-length=0 # Tell g++ not to split messages into different lines
QMAKE_CXXFLAGS_WARN_ON += -fno-strict-aliasing # Avoid strange error messages when using QVarLengthArray
QMAKE_CXXFLAGS_RELEASE += -ggdb
QMAKE_CFLAGS_RELEASE += -ggdb
QMAKE_LFLAGS_RELEASE += -ggdb -rdynamic # -rdynamic is necessary in order to have the backtrace handler in toolsignal show all information
# -----------------------------------------------------------------------------------------------------------------
# sha256.cpp, which contains part of manually optimised assembler code, runs faster when compiling with -O1 option.
# As qmake does not allow to specify individual compiler options for files, we add an "extra compiler" statement
# here in order to compile the file correctly. At the same time, grep removes out the silly "matching constraint"
# warning spit out by g++.
# The pipe to cat at the end of the compile gives us an exit code 0, as grep may return values <> 0 depending
# whether there is an output or not. The disadvantage is, that compile errrors cannot be detected by make (Tests
# have been made with the PIPESTATUS variable, but that didn't work).
# -----------------------------------------------------------------------------------------------------------------
FAST_ASM_FILES = sha256.cpp
FAST_ASM_CXXFLAGS = $$QMAKE_CXXFLAGS_RELEASE $$QMAKE_CXXFLAGS_WARN_ON
FAST_ASM_CXXFLAGS -= -O0
FAST_ASM_CXXFLAGS -= -O2
FAST_ASM_CXXFLAGS -= -O3
FAST_ASM_CXXFLAGS += -O1
fastasm.name = Compile file containing inline assembler statements with -O1 option for faster code
fastasm.input = FAST_ASM_FILES
fastasm.output = ${QMAKE_FILE_BASE}.o
fastasm.commands = g++ -c $$FAST_ASM_CXXFLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}.o 2>&1 | grep -vE \"matching constraint does not allow a register|In function |At global scope:\" | cat
QMAKE_EXTRA_COMPILERS += fastasm
LIBS += -lguytoollog
LIBS += -lguytoolerror
LIBS += -lguytoolcfg
LIBS += -lguytoolsignal
LIBS += -lguytoolsysinfo
LIBS += -lproc
LIBS += -lewf
#LIBS += -lz
TRANSLATIONS = guymager_en.ts
TRANSLATIONS += guymager_de.ts
TRANSLATIONS += guymager_fr.ts
TRANSLATIONS += guymager_it.ts
TRANSLATIONS += guymager_nl.ts
|