enhanced Makefile targets

pull/1/head
Sebastian Held 2012-03-01 22:24:49 +01:00
parent 4690e6a5b9
commit 12e9d62bc2
2 changed files with 70 additions and 67 deletions

View File

@ -1,23 +1,21 @@
TARGET = nf2ff
CONFIG += console
CONFIG -= app_bundle qt CONFIG -= app_bundle qt
TEMPLATE = app TEMPLATE = app
OBJECTS_DIR = obj OBJECTS_DIR = obj
INCLUDEPATH += .
INCLUDEPATH += ../../tinyxml INCLUDEPATH += ../../tinyxml
CONFIG += debug_and_release CONFIG += debug_and_release
win32 { win32 {
CONFIG += console
QMAKE_CXXFLAGS += -DH5_USE_16_API QMAKE_CXXFLAGS += -DH5_USE_16_API
INCLUDEPATH += ../../hdf5/include ../../hdf5/include/cpp ../../boost/include/boost-1_42 INCLUDEPATH += ../../hdf5/include ../../hdf5/include/cpp ../../boost/include/boost-1_42
LIBS += ../../hdf5/lib/hdf5.lib LIBS += ../../hdf5/lib/hdf5.lib
LIBS += ../../boost/lib/libboost_thread-mgw44-mt.lib LIBS += ../../boost/lib/libboost_thread-mgw44-mt.lib
LIBS += ../../tinyxml/release/libtinyxml2.a LIBS += ../../tinyxml/release/libtinyxml2.a
} }
!win32 { !win32 {
LIBS += -lboost_thread LIBS += -lboost_thread
LIBS += -lhdf5 LIBS += -lhdf5
LIBS += ../../tinyxml/libtinyxml.so LIBS += ../../tinyxml/libtinyxml.so
} }
QMAKE_LFLAGS += \'-Wl,-rpath,\$$ORIGIN/../../tinyxml\' QMAKE_LFLAGS += \'-Wl,-rpath,\$$ORIGIN/../../tinyxml\'
@ -59,3 +57,21 @@ QMAKE_CXXFLAGS_DEBUG = -O0 \
# QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\" # QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\"
#
# INSTALL (only the nf2ff executable)
#
install.target = install
install.commands = mkdir -p \"$(INSTALL_ROOT)/usr/bin\"
install.commands += && cp -at \"$(INSTALL_ROOT)/usr/bin/\" nf2ff
QMAKE_EXTRA_TARGETS += install
#
# create .PHONY target
#
phony.target = .PHONY
phony.depends = $$QMAKE_EXTRA_TARGETS
QMAKE_EXTRA_TARGETS += phony

View File

@ -13,6 +13,13 @@ INCLUDEPATH += ../CSXCAD \
LIBS += -L../CSXCAD -lCSXCAD LIBS += -L../CSXCAD -lCSXCAD
CONFIG += debug_and_release CONFIG += debug_and_release
#
# VERSION
#
VERSION=0.0.27
############################################################################### ###############################################################################
# CONFIG SECTION # CONFIG SECTION
@ -50,14 +57,17 @@ win32 {
$$WIN32_LIB_ROOT\vtk\bin\libvtkzlib.dll $$WIN32_LIB_ROOT\vtk\bin\libvtkzlib.dll
} }
!win32 { !win32 {
LIBS += ../fparser/libfparser.so LIBS += -L../fparser -lfparser
LIBS += ../tinyxml/libtinyxml.so LIBS += -L../tinyxml -ltinyxml
LIBS += -lboost_thread LIBS += -lboost_thread
LIBS += -lhdf5 -lhdf5_cpp LIBS += -lhdf5 -lhdf5_cpp
### vtk ### ### vtk ###
INCLUDEPATH += /usr/include/vtk-5.2 \ INCLUDEPATH += /usr/include/vtk-5.2 \
/usr/include/vtk-5.4 \ /usr/include/vtk-5.4 \
/usr/include/vtk-5.6 /usr/include/vtk-5.6 \
/usr/include/vtk-5.8 \
/usr/include/vtk
INCLUDEPATH += /usr/include/CSXCAD
LIBS += -lvtkCommon \ LIBS += -lvtkCommon \
-lvtkIO \ -lvtkIO \
-lvtksys \ -lvtksys \
@ -203,8 +213,10 @@ QMAKE_CXXFLAGS_DEBUG = -O0 \
MPI_SUPPORT { MPI_SUPPORT {
DEFINES += MPI_SUPPORT DEFINES += MPI_SUPPORT
INCLUDEPATH += /usr/include/mpi QMAKE_CC = mpicc
LIBS += -lmpi -lmpi++ QMAKE_CXX = mpicxx
QMAKE_LINK = mpicxx
QMAKE_LINK_C = mpicc
HEADERS += FDTD/operator_mpi.h \ HEADERS += FDTD/operator_mpi.h \
FDTD/engine_mpi.h \ FDTD/engine_mpi.h \
FDTD/openems_fdtd_mpi.h FDTD/openems_fdtd_mpi.h
@ -218,58 +230,33 @@ MPI_SUPPORT {
# add git revision # add git revision
QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\" QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\"
# to use ABI2 target:
# qmake CONFIG+="ABI2 bits64" -o Makefile.ABI2-64 openEMS.pro
# make -fMakefile.ABI2-64
ABI2 {
CONFIG -= debug \ #
debug_and_release # create tar file (for the whole openEMS project)
CONFIG += release #
QMAKE_CFLAGS_RELEASE = -O2 \ tarball.target = tarball
-fabi-version=2 tarball.commands = git archive --format=tar --prefix=openEMS-$$VERSION/ HEAD | bzip2 > openEMS-$${VERSION}.tar.bz2
QMAKE_CXXFLAGS_RELEASE = -O2 \ QMAKE_EXTRA_TARGETS += tarball
-fabi-version=2
QMAKE_CC = apgcc
QMAKE_CXX = apg++ #
QMAKE_LINK = apg++ # INSTALL (only the openEMS executable and matlab scripts)
QMAKE_LINK_SHLIB = apg++ #
QMAKE_LFLAGS_RPATH = install.target = install
QMAKE_LFLAGS = \'-Wl,-rpath,\$$ORIGIN/lib\' install.commands = mkdir -p \"$(INSTALL_ROOT)/usr/bin\"
} install.commands += && mkdir -p \"$(INSTALL_ROOT)/usr/share/openEMS/matlab\"
bits64 { install.commands += && cp -at \"$(INSTALL_ROOT)/usr/bin/\" openEMS.sh openEMS_MPI.sh openEMS
QMAKE_CXXFLAGS_RELEASE += -m64 \ install.commands += && cp -at \"$(INSTALL_ROOT)/usr/share/openEMS/\" matlab/
-march=athlon64 QMAKE_EXTRA_TARGETS += install
QMAKE_LFLAGS_RELEASE += -m64 \
-march=athlon64
OBJECTS_DIR = ABI2-64 #
LIBS = ../CSXCAD/ABI2-64/libCSXCAD.so # create .PHONY target
LIBS += ../fparser/ABI2-64/libfparser.so #
LIBS += ../tinyxml/ABI2-64/libtinyxml.so phony.target = .PHONY
LIBS += $$WIN32_LIB_ROOT/boost-64/lib/libboost_thread.so phony.depends = $$QMAKE_EXTRA_TARGETS
LIBS += $$WIN32_LIB_ROOT/hdf5-64/lib/libhdf5.so QMAKE_EXTRA_TARGETS += phony
LIBS += $$WIN32_LIB_ROOT/hdf5-64/lib/libhdf5_cpp.so \
-lpthread
INCLUDEPATH += $$WIN32_LIB_ROOT/hdf5-64/include
INCLUDEPATH += $$WIN32_LIB_ROOT/boost-64/include
}
bits32 {
QMAKE_CXXFLAGS_RELEASE += -m32 \
-march=pentium3
QMAKE_LFLAGS_RELEASE += -m32 \
-march=pentium3
OBJECTS_DIR = ABI2-32
LIBS = ../CSXCAD/ABI2-32/libCSXCAD.so
LIBS += ../fparser/ABI2-32/libfparser.so
LIBS += ../tinyxml/ABI2-32/libtinyxml.so
LIBS += $$WIN32_LIB_ROOT/boost-32/lib/libboost_thread.so
LIBS += $$WIN32_LIB_ROOT/hdf5-32/lib/libhdf5.so
LIBS += $$WIN32_LIB_ROOT/hdf5-32/lib/libhdf5_cpp.so
INCLUDEPATH += $$WIN32_LIB_ROOT/hdf5-32/include
INCLUDEPATH += $$WIN32_LIB_ROOT/boost-32/include
}
ABI2 {
DESTDIR = $$OBJECTS_DIR
MOC_DIR = $$OBJECTS_DIR
UI_DIR = $$OBJECTS_DIR
RCC_DIR = $$OBJECTS_DIR
}