2010-02-28 21:48:03 +00:00
|
|
|
# -------------------------------------------------
|
|
|
|
# Project created by QtCreator 2010-02-26T22:34:51
|
|
|
|
# -------------------------------------------------
|
|
|
|
TARGET = openEMS
|
2010-04-17 19:54:47 +00:00
|
|
|
CONFIG -= app_bundle qt
|
2012-10-06 18:56:51 +00:00
|
|
|
CONFIG += rtti exceptions
|
2010-02-28 21:48:03 +00:00
|
|
|
TEMPLATE = app
|
|
|
|
OBJECTS_DIR = obj
|
2012-04-23 07:37:07 +00:00
|
|
|
INCLUDEPATH += .
|
2011-10-27 11:35:02 +00:00
|
|
|
CONFIG += debug_and_release
|
2010-04-28 09:15:59 +00:00
|
|
|
|
2012-03-01 21:24:49 +00:00
|
|
|
#
|
|
|
|
# VERSION
|
|
|
|
#
|
2012-12-14 12:13:16 +00:00
|
|
|
VERSION=0.0.30
|
2012-03-01 21:24:49 +00:00
|
|
|
|
2012-12-04 15:47:01 +00:00
|
|
|
# add git revision
|
|
|
|
GITREV = $$system(git describe --tags)
|
|
|
|
isEmpty(GITREV):GITREV=$$VERSION
|
|
|
|
DEFINES += GIT_VERSION=\\\"$$GITREV\\\"
|
|
|
|
|
|
|
|
# remove unnecessary webkit define
|
|
|
|
DEFINES -= QT_WEBKIT
|
|
|
|
|
|
|
|
exists(localPathes.pri) {
|
|
|
|
include(localPathes.pri)
|
|
|
|
}
|
2012-03-01 21:24:49 +00:00
|
|
|
|
2010-07-15 10:58:48 +00:00
|
|
|
###############################################################################
|
|
|
|
# CONFIG SECTION
|
|
|
|
|
2010-07-13 08:47:40 +00:00
|
|
|
# the SSE engine defaults to flush-to-zero mode, because of speed advantages
|
|
|
|
# to restore the correct handling of denormals and to comply to IEEE 754 uncomment:
|
|
|
|
# DEFINES += SSE_CORRECT_DENORMALS
|
|
|
|
|
2010-07-15 10:58:48 +00:00
|
|
|
# openEMS defaults to output length in unit meters; to recover the old behaviour
|
|
|
|
# to output length in terms of the drawing unit, uncomment:
|
|
|
|
# DEFINES += OUTPUT_IN_DRAWINGUNITS
|
|
|
|
|
|
|
|
# CONFIG SECTION
|
|
|
|
###############################################################################
|
|
|
|
|
2010-04-28 09:15:59 +00:00
|
|
|
win32 {
|
2012-03-02 19:26:36 +00:00
|
|
|
CONFIG += console
|
2012-12-03 13:22:25 +00:00
|
|
|
isEmpty(WIN32_LIB_ROOT) {
|
|
|
|
WIN32_LIB_ROOT = ..
|
|
|
|
}
|
|
|
|
isEmpty(CSXCAD_ROOT) {
|
2012-12-08 14:08:17 +00:00
|
|
|
CSXCAD_ROOT = $$WIN32_LIB_ROOT/CSXCAD
|
2012-12-03 13:22:25 +00:00
|
|
|
}
|
2012-05-24 07:55:48 +00:00
|
|
|
# CSXCAD
|
2012-12-03 13:22:25 +00:00
|
|
|
INCLUDEPATH += $$CSXCAD_ROOT/include/CSXCAD
|
|
|
|
LIBS += -L$$CSXCAD_ROOT/lib -lCSXCAD0
|
2012-09-14 13:14:26 +00:00
|
|
|
|
|
|
|
# #3rd party libraries#
|
|
|
|
# tinyxml
|
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/tinyxml/include
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/tinyxml/bin -ltinyxml2
|
2012-12-14 12:13:16 +00:00
|
|
|
DEFINES += TIXML_USE_STL
|
2012-09-14 13:14:26 +00:00
|
|
|
# fparser
|
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/fparser/include
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/fparser/bin -lfparser4
|
2012-05-24 07:55:48 +00:00
|
|
|
# hdf5
|
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/hdf5/include $$WIN32_LIB_ROOT/hdf5/include/cpp
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/hdf5/lib -lhdf5
|
2012-10-23 07:51:16 +00:00
|
|
|
# zlib
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/zlib/lib -lz
|
2012-05-24 07:55:48 +00:00
|
|
|
# boost
|
|
|
|
DEFINES += BOOST_THREAD_USE_LIB
|
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/boost/include
|
2012-10-11 07:43:25 +00:00
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/boost/lib -lboost_thread -lboost_chrono -lboost_system
|
2012-05-24 07:55:48 +00:00
|
|
|
# vtk
|
2012-09-14 13:14:26 +00:00
|
|
|
INCLUDEPATH += $$WIN32_LIB_ROOT/vtk/include/vtk-5.10
|
|
|
|
LIBS += -L$$WIN32_LIB_ROOT/vtk/bin -lvtkCommon -lvtkIO -lvtkFiltering
|
2010-04-28 09:15:59 +00:00
|
|
|
}
|
|
|
|
!win32 {
|
2012-12-03 13:22:25 +00:00
|
|
|
# CSXCAD
|
|
|
|
isEmpty(CSXCAD_ROOT) {
|
2012-12-08 14:08:17 +00:00
|
|
|
CSXCAD_ROOT = /usr
|
|
|
|
} else {
|
|
|
|
QMAKE_LFLAGS += \'-Wl,-rpath,$$CSXCAD_ROOT/lib\'
|
2012-12-03 13:22:25 +00:00
|
|
|
}
|
|
|
|
INCLUDEPATH += $$CSXCAD_ROOT/include/CSXCAD
|
|
|
|
LIBS += -L$$CSXCAD_ROOT/lib -lCSXCAD
|
|
|
|
|
|
|
|
# #3rd party libraries#
|
2012-08-01 11:54:29 +00:00
|
|
|
LIBS += -lfparser
|
2012-04-11 09:43:30 +00:00
|
|
|
LIBS += -ltinyxml
|
2012-12-08 14:08:17 +00:00
|
|
|
DEFINES += TIXML_USE_STL
|
2012-03-02 19:26:36 +00:00
|
|
|
LIBS += -lboost_thread-mt
|
2012-11-13 08:38:23 +00:00
|
|
|
# hdf5 (and mpi for parallel hdf5)
|
|
|
|
LIBS += -lhdf5_hl -lhdf5
|
|
|
|
LIBS += -lmpi -lmpi_cxx
|
|
|
|
INCLUDEPATH += /usr/include/mpi
|
2012-06-17 18:29:31 +00:00
|
|
|
### vtk ###
|
2011-04-01 13:08:56 +00:00
|
|
|
INCLUDEPATH += /usr/include/vtk-5.2 \
|
|
|
|
/usr/include/vtk-5.4 \
|
2012-03-01 21:24:49 +00:00
|
|
|
/usr/include/vtk-5.6 \
|
|
|
|
/usr/include/vtk-5.8 \
|
2012-06-13 09:00:14 +00:00
|
|
|
/usr/include/vtk-5.10 \
|
2012-03-01 21:24:49 +00:00
|
|
|
/usr/include/vtk
|
2011-04-01 13:08:56 +00:00
|
|
|
LIBS += -lvtkCommon \
|
|
|
|
-lvtkIO \
|
2012-06-17 18:29:31 +00:00
|
|
|
-lvtksys \
|
|
|
|
-lvtkFiltering
|
2010-04-28 09:15:59 +00:00
|
|
|
}
|
2012-06-17 18:29:31 +00:00
|
|
|
|
|
|
|
# vtk includes deprecated header files; silence the corresponding warning
|
|
|
|
QMAKE_CXXFLAGS += -Wno-deprecated
|
2010-12-06 14:30:47 +00:00
|
|
|
|
2012-03-02 19:26:36 +00:00
|
|
|
# hdf5 compat
|
|
|
|
DEFINES += H5_USE_16_API
|
|
|
|
|
|
|
|
|
2011-04-01 13:08:56 +00:00
|
|
|
#### SOURCES ################################################################
|
2010-02-28 21:48:03 +00:00
|
|
|
SOURCES += main.cpp \
|
2012-06-06 08:25:40 +00:00
|
|
|
openems.cpp
|
2011-04-01 13:08:56 +00:00
|
|
|
|
|
|
|
# FDTD
|
|
|
|
SOURCES += FDTD/engine.cpp \
|
2010-03-01 13:56:27 +00:00
|
|
|
FDTD/operator.cpp \
|
2010-04-09 13:51:37 +00:00
|
|
|
FDTD/engine_multithread.cpp \
|
|
|
|
FDTD/operator_cylinder.cpp \
|
2012-06-06 08:25:40 +00:00
|
|
|
FDTD/engine_cylinder.cpp \
|
2010-05-03 16:33:14 +00:00
|
|
|
FDTD/engine_sse.cpp \
|
|
|
|
FDTD/operator_sse.cpp \
|
2010-05-19 09:41:35 +00:00
|
|
|
FDTD/operator_sse_compressed.cpp \
|
2010-05-20 20:02:06 +00:00
|
|
|
FDTD/engine_sse_compressed.cpp \
|
2010-05-28 13:13:14 +00:00
|
|
|
FDTD/operator_multithread.cpp \
|
2010-12-06 14:30:47 +00:00
|
|
|
FDTD/excitation.cpp \
|
2010-09-08 05:36:32 +00:00
|
|
|
FDTD/operator_cylindermultigrid.cpp \
|
|
|
|
FDTD/engine_cylindermultigrid.cpp \
|
2012-06-17 18:29:31 +00:00
|
|
|
FDTD/engine_interface_fdtd.cpp \
|
|
|
|
FDTD/engine_interface_sse_fdtd.cpp \
|
|
|
|
FDTD/engine_interface_cylindrical_fdtd.cpp
|
2010-12-06 14:30:47 +00:00
|
|
|
|
|
|
|
# FDTD/extensions source files
|
|
|
|
SOURCES += FDTD/extensions/engine_extension.cpp \
|
|
|
|
FDTD/extensions/operator_ext_dispersive.cpp \
|
|
|
|
FDTD/extensions/operator_ext_lorentzmaterial.cpp \
|
2012-05-08 11:58:20 +00:00
|
|
|
FDTD/extensions/operator_ext_conductingsheet.cpp \
|
2010-12-06 14:30:47 +00:00
|
|
|
FDTD/extensions/engine_ext_dispersive.cpp \
|
|
|
|
FDTD/extensions/engine_ext_lorentzmaterial.cpp \
|
|
|
|
FDTD/extensions/operator_ext_pml_sf.cpp \
|
|
|
|
FDTD/extensions/engine_ext_pml_sf.cpp \
|
|
|
|
FDTD/extensions/engine_ext_cylindermultigrid.cpp \
|
|
|
|
FDTD/extensions/operator_ext_upml.cpp \
|
|
|
|
FDTD/extensions/engine_ext_upml.cpp \
|
|
|
|
FDTD/extensions/operator_extension.cpp \
|
|
|
|
FDTD/extensions/engine_ext_mur_abc.cpp \
|
|
|
|
FDTD/extensions/operator_ext_mur_abc.cpp \
|
|
|
|
FDTD/extensions/operator_ext_cylinder.cpp \
|
2011-03-16 15:26:01 +00:00
|
|
|
FDTD/extensions/engine_ext_cylinder.cpp \
|
|
|
|
FDTD/extensions/operator_ext_excitation.cpp \
|
2012-07-18 11:12:25 +00:00
|
|
|
FDTD/extensions/engine_ext_excitation.cpp \
|
|
|
|
FDTD/extensions/operator_ext_tfsf.cpp \
|
|
|
|
FDTD/extensions/engine_ext_tfsf.cpp
|
2010-12-06 14:30:47 +00:00
|
|
|
|
2010-12-06 09:44:25 +00:00
|
|
|
# Common source files
|
|
|
|
SOURCES += Common/operator_base.cpp \
|
2010-12-02 12:51:34 +00:00
|
|
|
Common/engine_interface_base.cpp \
|
2010-12-06 09:44:25 +00:00
|
|
|
Common/processmodematch.cpp \
|
|
|
|
Common/processvoltage.cpp \
|
|
|
|
Common/processing.cpp \
|
|
|
|
Common/processintegral.cpp \
|
|
|
|
Common/processfields.cpp \
|
|
|
|
Common/processfields_td.cpp \
|
2011-01-31 11:25:55 +00:00
|
|
|
Common/processcurrent.cpp \
|
|
|
|
Common/processfields_fd.cpp \
|
2012-03-02 19:26:36 +00:00
|
|
|
Common/processfieldprobe.cpp \
|
|
|
|
Common/processfields_sar.cpp
|
2010-12-06 09:44:25 +00:00
|
|
|
|
2011-04-01 13:08:56 +00:00
|
|
|
# tools
|
2012-06-17 18:29:31 +00:00
|
|
|
SOURCES += tools/global.cpp \
|
|
|
|
tools/useful.cpp \
|
|
|
|
tools/array_ops.cpp \
|
|
|
|
tools/ErrorMsg.cpp \
|
|
|
|
tools/AdrOp.cpp \
|
2012-11-29 15:45:48 +00:00
|
|
|
tools/sar_calculation.cpp \
|
2012-06-17 18:29:31 +00:00
|
|
|
tools/vtk_file_writer.cpp \
|
|
|
|
tools/hdf5_file_writer.cpp
|
2011-04-01 13:08:56 +00:00
|
|
|
|
|
|
|
#### HEADERS ################################################################
|
|
|
|
HEADERS += openems.h
|
|
|
|
|
|
|
|
# FDTD
|
|
|
|
HEADERS += FDTD/engine.h \
|
2010-03-01 13:56:27 +00:00
|
|
|
FDTD/operator.h \
|
2010-04-09 13:51:37 +00:00
|
|
|
FDTD/engine_multithread.h \
|
|
|
|
FDTD/operator_cylinder.h \
|
2012-06-06 08:25:40 +00:00
|
|
|
FDTD/engine_cylinder.h \
|
2010-05-03 16:33:14 +00:00
|
|
|
FDTD/engine_sse.h \
|
|
|
|
FDTD/operator_sse.h \
|
2010-05-06 20:55:59 +00:00
|
|
|
FDTD/excitation.h \
|
2010-05-19 09:41:35 +00:00
|
|
|
FDTD/operator_sse_compressed.h \
|
2010-05-20 20:02:06 +00:00
|
|
|
FDTD/engine_sse_compressed.h \
|
2010-05-28 13:13:14 +00:00
|
|
|
FDTD/operator_multithread.h \
|
2010-09-08 05:36:32 +00:00
|
|
|
FDTD/operator_cylindermultigrid.h \
|
|
|
|
FDTD/engine_cylindermultigrid.h \
|
2012-03-02 19:26:36 +00:00
|
|
|
FDTD/engine_interface_fdtd.h \
|
|
|
|
FDTD/engine_interface_sse_fdtd.h \
|
|
|
|
FDTD/engine_interface_cylindrical_fdtd.h
|
2010-12-06 14:30:47 +00:00
|
|
|
|
2010-12-19 19:41:08 +00:00
|
|
|
# FDTD/extensions header files
|
2011-03-16 15:26:01 +00:00
|
|
|
HEADERS += FDTD/extensions/operator_extension.h \
|
2010-12-06 14:30:47 +00:00
|
|
|
FDTD/extensions/engine_extension.h \
|
|
|
|
FDTD/extensions/engine_ext_mur_abc.h \
|
|
|
|
FDTD/extensions/operator_ext_mur_abc.h \
|
|
|
|
FDTD/extensions/operator_ext_cylinder.h \
|
|
|
|
FDTD/extensions/engine_ext_cylinder.h \
|
|
|
|
FDTD/extensions/operator_ext_dispersive.h \
|
|
|
|
FDTD/extensions/operator_ext_lorentzmaterial.h \
|
2012-05-08 11:58:20 +00:00
|
|
|
FDTD/extensions/operator_ext_conductingsheet.h \
|
|
|
|
FDTD/extensions/cond_sheet_parameter.h \
|
2010-12-06 14:30:47 +00:00
|
|
|
FDTD/extensions/engine_ext_dispersive.h \
|
|
|
|
FDTD/extensions/engine_ext_lorentzmaterial.h \
|
|
|
|
FDTD/extensions/operator_ext_pml_sf.h \
|
|
|
|
FDTD/extensions/engine_ext_pml_sf.h \
|
|
|
|
FDTD/extensions/engine_ext_cylindermultigrid.h \
|
|
|
|
FDTD/extensions/operator_ext_upml.h \
|
2011-03-16 15:26:01 +00:00
|
|
|
FDTD/extensions/engine_ext_upml.h \
|
|
|
|
FDTD/extensions/operator_ext_excitation.h \
|
2012-07-18 11:12:25 +00:00
|
|
|
FDTD/extensions/engine_ext_excitation.h \
|
|
|
|
FDTD/extensions/operator_ext_tfsf.h \
|
|
|
|
FDTD/extensions/engine_ext_tfsf.h
|
2010-12-06 14:30:47 +00:00
|
|
|
|
2010-12-06 09:44:25 +00:00
|
|
|
# Common header files
|
|
|
|
HEADERS += Common/operator_base.h \
|
2010-12-02 12:51:34 +00:00
|
|
|
Common/engine_interface_base.h \
|
2010-12-06 09:44:25 +00:00
|
|
|
Common/processvoltage.h \
|
|
|
|
Common/processing.h \
|
|
|
|
Common/processintegral.h \
|
|
|
|
Common/processfields.h \
|
|
|
|
Common/processfields_td.h \
|
|
|
|
Common/processcurrent.h \
|
2011-01-31 11:25:55 +00:00
|
|
|
Common/processmodematch.h \
|
|
|
|
Common/processfields_fd.h \
|
2011-04-01 13:08:56 +00:00
|
|
|
Common/processfieldprobe.h \
|
2012-03-02 19:26:36 +00:00
|
|
|
Common/processfields_sar.h
|
2011-04-01 13:08:56 +00:00
|
|
|
|
|
|
|
# tools
|
|
|
|
HEADERS += tools/ErrorMsg.h \
|
2012-06-17 18:29:31 +00:00
|
|
|
tools/AdrOp.h \
|
|
|
|
tools/constants.h \
|
|
|
|
tools/array_ops.h \
|
|
|
|
tools/global.h \
|
|
|
|
tools/useful.h \
|
|
|
|
tools/aligned_allocator.h \
|
2012-11-29 15:45:48 +00:00
|
|
|
tools/sar_calculation.h \
|
2012-06-17 18:29:31 +00:00
|
|
|
tools/vtk_file_writer.h \
|
|
|
|
tools/hdf5_file_writer.h
|
2010-12-06 09:44:25 +00:00
|
|
|
|
2012-03-02 19:26:36 +00:00
|
|
|
!packaging {
|
2012-06-17 18:29:31 +00:00
|
|
|
# if packaging is not set in CONFIG, set some default flags
|
|
|
|
# if packaging is enabled, give the flags on the qmake comandline
|
|
|
|
QMAKE_CXXFLAGS_RELEASE = -O3 -g -march=native
|
|
|
|
QMAKE_CXXFLAGS_DEBUG = -O0 -g -march=native
|
2012-03-02 19:26:36 +00:00
|
|
|
}
|
2011-03-08 13:44:19 +00:00
|
|
|
|
|
|
|
MPI_SUPPORT {
|
2012-03-02 19:26:36 +00:00
|
|
|
DEFINES += MPI_SUPPORT
|
|
|
|
QMAKE_CC = mpicc
|
|
|
|
QMAKE_CXX = mpicxx
|
|
|
|
QMAKE_LINK = mpicxx
|
|
|
|
QMAKE_LINK_C = mpicc
|
2011-02-08 13:08:58 +00:00
|
|
|
HEADERS += FDTD/operator_mpi.h \
|
2012-03-02 19:26:36 +00:00
|
|
|
FDTD/engine_mpi.h \
|
|
|
|
FDTD/openems_fdtd_mpi.h
|
2011-02-08 13:08:58 +00:00
|
|
|
SOURCES += FDTD/operator_mpi.cpp \
|
2012-03-02 19:26:36 +00:00
|
|
|
FDTD/engine_mpi.cpp \
|
|
|
|
FDTD/openems_fdtd_mpi.cpp
|
2011-02-08 13:08:58 +00:00
|
|
|
|
2012-03-02 19:26:36 +00:00
|
|
|
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter #needed because mpich2 produces tons of unused parameter
|
2011-03-08 13:44:19 +00:00
|
|
|
}
|
2010-05-04 07:31:10 +00:00
|
|
|
|
2012-03-01 21:24:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# create tar file (for the whole openEMS project)
|
|
|
|
#
|
|
|
|
tarball.target = tarball
|
|
|
|
tarball.commands = git archive --format=tar --prefix=openEMS-$$VERSION/ HEAD | bzip2 > openEMS-$${VERSION}.tar.bz2
|
|
|
|
QMAKE_EXTRA_TARGETS += tarball
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# INSTALL (only the openEMS executable and matlab scripts)
|
|
|
|
#
|
2012-12-04 15:47:01 +00:00
|
|
|
isEmpty(PREFIX) {
|
2012-12-08 14:08:17 +00:00
|
|
|
PREFIX = /usr/local
|
2012-12-04 15:47:01 +00:00
|
|
|
}
|
2012-03-01 21:24:49 +00:00
|
|
|
install.target = install
|
2012-12-04 15:47:01 +00:00
|
|
|
install.commands = mkdir -p \"$$PREFIX/bin\"
|
|
|
|
install.commands += && mkdir -p \"$$PREFIX/share/openEMS/matlab\"
|
|
|
|
unix:install.commands += && cp -at \"$$PREFIX/bin/\" openEMS.sh openEMS_MPI.sh openEMS
|
|
|
|
win32:install.commands += && cp -at \"$$PREFIX/bin/\" release/openEMS.exe
|
|
|
|
install.commands += && cp -at \"$$PREFIX/share/openEMS/\" matlab/
|
2012-03-01 21:24:49 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += install
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# create .PHONY target
|
|
|
|
#
|
|
|
|
phony.target = .PHONY
|
|
|
|
phony.depends = $$QMAKE_EXTRA_TARGETS
|
|
|
|
QMAKE_EXTRA_TARGETS += phony
|