Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile.am

    r796aa6 r255971  
    22# Also indentation by a single tab
    33
    4 SUBDIRS = Actions UIElements
    5 
    6 # this includes source files that need to be present at multiple points
    7 HELPERSOURCE =  \
    8   Helpers/Assert.cpp \
    9   Helpers/MemDebug.cpp
    10  
    11 BASESOURCE = \
    12   ${HELPERSOURCE} \
    13   Space.cpp \
    14   vector.cpp
    15  
    16 BASEHEADER = \
    17   ${HELPERHEADER} \
    18   Space.hpp \
    19   vector.hpp
     4SUBDIRS = Actions Exceptions Helpers LinearAlgebra Parser UIElements
     5
    206                       
    217ATOMSOURCE = \
     
    4026  atom_trajectoryparticleinfo.hpp
    4127
    42 LINALGSOURCE = \
    43   gslmatrix.cpp \
    44   gslvector.cpp \
    45   linearsystemofequations.cpp
    46                            
    47 LINALGHEADER = \
    48   gslmatrix.hpp \
    49   gslvector.hpp \
    50   linearsystemofequations.hpp
    51                            
    5228ANALYSISSOURCE = \
    5329  analysis_bonds.cpp \
     
    8157  Actions/MethodAction.hpp \
    8258  Actions/Process.hpp
    83 
    84 EXCEPTIONSOURCE = \
    85   Exceptions/CustomException.cpp \
    86   Exceptions/IllegalTypeException.cpp \
    87   Exceptions/LinearDependenceException.cpp \
    88   Exceptions/MathException.cpp \
    89   Exceptions/MissingValueException.cpp \
    90   Exceptions/NotInvertibleException.cpp \
    91   Exceptions/ParseError.cpp \
    92   Exceptions/SkewException.cpp \
    93   Exceptions/ZeroVectorException.cpp
    94                                  
    95 EXCEPTIONHEADER = \
    96   Exceptions/CustomException.hpp \
    97   Exceptions/IllegalTypeException.hpp \
    98   Exceptions/LinearDependenceException.hpp \
    99   Exceptions/MathException.hpp \
    100   Exceptions/MissingValueException.hpp \
    101   Exceptions/NotInvertibleException.hpp \
    102   Exceptions/ParseError.hpp \
    103   Exceptions/SkewException.hpp \
    104   Exceptions/ZeroVectorException.hpp
    105 
    106 PARSERSOURCE = \
    107   Parser/ChangeTracker.cpp \
    108   Parser/FormatParser.cpp \
    109   Parser/FormatParserStorage.cpp \
    110   Parser/MpqcParser.cpp \
    111   Parser/PcpParser.cpp \
    112   Parser/TremoloParser.cpp \
    113   Parser/XyzParser.cpp
    114 
    115 PARSERHEADER = \
    116   Parser/ChangeTracker.hpp \
    117   Parser/FormatParser.hpp \
    118   Parser/FormatParserStorage.hpp \
    119   Parser/MpqcParser.hpp \
    120   Parser/PcpParser.hpp \
    121   Parser/TremoloParser.hpp \
    122   Parser/XyzParser.hpp
    12359
    12460PATTERNSOURCE = \
     
    13773  Shapes/Shape.hpp \
    13874  Shapes/ShapeOps.hpp
    139 
    14075 
     76
     77QTUIMOC_HEADER = UIElements/QT4/QTDialog.hpp \
     78        UIElements/QT4/QTMainWindow.hpp \
     79        UIElements/Menu/QT4/QTMenu.hpp \
     80        UIElements/Views/QT4/QTWorldView.hpp \
     81        UIElements/Views/QT4/GLMoleculeView.hpp \
     82        UIElements/Views/QT4/QTMoleculeView.hpp \
     83        UIElements/Views/QT4/QTStatusBar.hpp
     84 
     85QTUIMOC_TARGETS = QTMainWindow.moc.cpp \
     86        QTMenu.moc.cpp\
     87        QTDialog.moc.cpp \
     88        QTWorldView.moc.cpp \
     89        GLMoleculeView.moc.cpp \
     90        QTMoleculeView.moc.cpp \
     91        QTStatusBar.moc.cpp
     92
    14193DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp \
    14294  Descriptors/AtomIdDescriptor.cpp \
     
    161113  Descriptors/MoleculePtrDescriptor.hpp \
    162114  Descriptors/MoleculeSelectionDescriptor.cpp
    163 
    164 
    165 QTUIMOC_HEADER = UIElements/QT4/QTDialog.hpp \
    166         UIElements/QT4/QTMainWindow.hpp \
    167         UIElements/Menu/QT4/QTMenu.hpp \
    168         UIElements/Views/QT4/QTWorldView.hpp \
    169         UIElements/Views/QT4/GLMoleculeView.hpp \
    170         UIElements/Views/QT4/QTMoleculeView.hpp \
    171         UIElements/Views/QT4/QTStatusBar.hpp
    172115                                 
    173 QTUISOURCE = allmocs.moc.cpp \
     116QTUISOURCE = ${QTUIMOC_TARGETS} \
    174117        UIElements/QT4/QTMainWindow.cpp \
    175118        UIElements/QT4/QTDialog.cpp \
     
    185128QTUI_DEFS =
    186129
    187 SOURCE = \
     130MOLECUILDERSOURCE = \
    188131  ${ANALYSISSOURCE} \
    189132  ${ACTIONSSOURCE} \
    190133  ${ATOMSOURCE} \
    191   ${EXCEPTIONSOURCE} \
    192134  ${PATTERNSOURCE} \
    193135  ${PARSERSOURCE} \
    194136  ${SHAPESOURCE} \
    195137  ${DESCRIPTORSOURCE} \
     138  ${HELPERSOURCE} \
    196139  bond.cpp \
    197140  bondgraph.cpp \
     
    204147  elements_db.cpp \
    205148  ellipsoid.cpp \
    206   errorlogger.cpp \
    207149  Formula.cpp \
    208150  graph.cpp \
    209   helpers.cpp \
    210   info.cpp \
    211151  leastsquaremin.cpp \
    212   Line.cpp \
    213152  linkedcell.cpp \
    214   log.cpp \
    215   logger.cpp \
    216   Matrix.cpp \
    217153  moleculelist.cpp \
    218154  molecule.cpp \
     
    224160  parser.cpp \
    225161  periodentafel.cpp \
    226   Plane.cpp \
    227162  tesselation.cpp \
    228163  tesselationhelpers.cpp \
     
    231166  UIElements/UIFactory.cpp \
    232167  vector_ops.cpp \
    233   verbose.cpp \
    234168  World.cpp
    235169
    236 HEADER = \
     170MOLECUILDERHEADER = \
    237171  ${ANALYSISHEADER} \
    238172  ${ACTIONSHEADER} \
    239173  ${ATOMHEADER} \
    240   ${EXCEPTIONHEADER} \
    241174  ${PARSERHEADER} \
    242175  ${PATTERNHEADER} \
     
    254187  elements_db.hpp \
    255188  ellipsoid.hpp \
    256   errorlogger.hpp \
    257189  Formula.hpp \
    258190  graph.hpp \
    259   helpers.hpp \
    260   info.hpp \
    261191  leastsquaremin.hpp \
    262   Line.hpp \
    263192  linkedcell.hpp \
    264193  lists.hpp \
    265   log.hpp \
    266   logger.hpp \
    267   Matrix.hpp \
    268194  molecule.hpp \
    269195  molecule_template.hpp \
    270196  parser.hpp \
    271197  periodentafel.hpp \
    272   Plane.hpp \
    273198  stackclass.hpp \
    274199  tesselation.hpp \
     
    277202  triangleintersectionlist.hpp \
    278203  UIElements/UIFactory.hpp \
    279   verbose.hpp \
    280204  vector_ops.hpp \
    281205  World.hpp
    282206
    283 # the following files are no longer used:
    284 #  memoryallocator.hpp \
    285 #  memoryallocator.cpp \
    286 #  memoryusageobserver.hpp \
    287 #  memoryusageobserver.cpp
     207lib_LTLIBRARIES = libMolecuilder-@MOLECUILDER_API_VERSION@.la
     208libMolecuilder_includedir = $(includedir)/molecuilder-$(MOLECUILDER_API_VERSION)/Actions/
     209libMolecuilder_LIBS = \
     210        LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \
     211        ${BOOST_PROGRAM_OPTIONS_LIB}
     212
     213#       UIElements/libMolecuilderUI.a \
     214        Actions/libMolecuilderActions-@MOLECUILDER_API_VERSION@.la \
     215        Parser/libMolecuilderParser-@MOLECUILDER_API_VERSION@.la \
     216        Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \
     217        Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
     218        $(BOOST_LIB) \
     219        ${BOOST_THREAD_LIB}
     220
     221nobase_libMolecuilder_include_HEADERS = ${MOLECUILDERHEADER}
     222
     223## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
     224## target.  Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
     225## will therefore be treated as if it were literally part of the target name,
     226## and the variable name derived from that.
     227## The file extension .cc is recognized by Automake, and makes it produce
     228## rules which invoke the C++ compiler to produce a libtool object file (.lo)
     229## from each source file.  Note that it is not necessary to list header files
     230## which are already listed elsewhere in a _HEADERS variable assignment.
     231libMolecuilder_@MOLECUILDER_API_VERSION@_la_SOURCES = ${MOLECUILDERSOURCE}  $(srcdir)/version.c
     232
     233## Instruct libtool to include ABI version information in the generated shared
     234## library file (.so).  The library ABI version is defined in configure.ac, so
     235## that all version information is kept in one place.
     236libMolecuilder_@MOLECUILDER_API_VERSION@_la_LDFLAGS = -version-info $(MOLECUILDER_SO_VERSION)
     237
     238## The generated configuration header is installed in its own subdirectory of
     239## $(libdir).  The reason for this is that the configuration information put
     240## into this header file describes the target platform the installed library
     241## has been built for.  Thus the file must not be installed into a location
     242## intended for architecture-independent files, as defined by the Filesystem
     243## Hierarchy Standard (FHS).
     244## The nodist_ prefix instructs Automake to not generate rules for including
     245## the listed files in the distribution on 'make dist'.  Files that are listed
     246## in _HEADERS variables are normally included in the distribution, but the
     247## configuration header file is generated at configure time and should not be
     248## shipped with the source tarball.
     249libMolecuilder_libincludedir = $(libdir)/molecuilder-$(MOLECUILDER_API_VERSION)/include
     250nodist_libMolecuilder_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
     251
     252## Install the generated pkg-config file (.pc) into the expected location for
     253## architecture-dependent package configuration information.  Occasionally,
     254## pkg-config files are also used for architecture-independent data packages,
     255## in which case the correct install location would be $(datadir)/pkgconfig.
     256pkgconfigdir = $(libdir)/pkgconfig
     257pkgconfig_DATA = $(top_builddir)/molecuilder-$(MOLECUILDER_API_VERSION).pc
     258
    288259
    289260BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB)
     
    291262INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements
    292263
    293 noinst_LIBRARIES = libmolecuilderbase.a libmolecuilder.a libgslwrapper.a libmenu.a libparser.a
     264noinst_LIBRARIES = libmenu.a
    294265bin_PROGRAMS = molecuilder molecuildergui joiner analyzer
    295 EXTRA_PROGRAMS = unity
    296266
    297267molecuilderdir = ${bindir}
    298268
    299 libmolecuilderbase_a_SOURCES = ${BASESOURCE} ${BASEHEADER}
    300 libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER}
    301269libmenu_a_SOURCES = ${UISOURCE} ${UIHEADER}
    302 libparser_a_SOURCES = ${PARSERSOURCE} ${PARSERHEADER}
    303 libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER}
    304270
    305271molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
     
    308274#molecuilder_CXXFLAGS += -DNO_CACHING
    309275molecuilder_LDFLAGS = $(BOOST_LIB)
    310 molecuilder_SOURCES = ${LEGACYSOURCE} builder.cpp
    311 molecuilder_SOURCES += $(srcdir)/version.c
    312 molecuilder_LDADD = UIElements/libMolecuilderUI.a Actions/libMolecuilderActions.a libmolecuilderbase.a libmolecuilder.a libparser.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB}
     276molecuilder_SOURCES = builder.cpp
     277molecuilder_LDADD = \
     278        UIElements/libMolecuilderUI-@MOLECUILDER_API_VERSION@.la \
     279        Actions/libMolecuilderActions-@MOLECUILDER_API_VERSION@.la \
     280        libMolecuilder-@MOLECUILDER_API_VERSION@.la \
     281        Parser/libMolecuilderParser-@MOLECUILDER_API_VERSION@.la \
     282        LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \
     283        Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \
     284        Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
     285        $(BOOST_LIB) \
     286        ${BOOST_THREAD_LIB} \
     287        ${BOOST_PROGRAM_OPTIONS_LIB}
     288
    313289
    314290#Stuff for building the GUI using QT
    315 molecuildergui_SOURCES = ${QTUISOURCE} ${LEGACYSOURCE} builder.cpp
    316 molecuildergui_SOURCES += $(srcdir)/version.c
     291molecuildergui_SOURCES = ${QTUISOURCE} builder.cpp
    317292molecuildergui_CXXFLAGS = ${QT_CXXFLAGS} ${GLU_CXXFLAGS} -DUSE_GUI_QT
    318293molecuildergui_LDFLAGS = $(BOOST_LIB) ${QT_LDFLAGS} ${GLU_LDFLAGS}
    319 molecuildergui_LDADD = UIElements/libMolecuilderUI.a Actions/libMolecuilderActions.a libmolecuilderbase.a libmolecuilder.a libparser.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB}  ${GUI_LIBS}
    320 
    321 joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp
    322 joiner_LDADD = libmolecuilder.a libmolecuilderbase.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    323 
    324 analyzer_SOURCES = analyzer.cpp datacreator.cpp parser.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp
    325 analyzer_LDADD = libmolecuilder.a libmolecuilderbase.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    326 
    327 unity_SOURCES = unity.cpp $(srcdir)/version.c
    328 unity_LDADD = $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB}
     294molecuildergui_LDADD = \
     295        UIElements/libMolecuilderUI-@MOLECUILDER_API_VERSION@.la \
     296        Actions/libMolecuilderActions-@MOLECUILDER_API_VERSION@.la \
     297        libMolecuilder-@MOLECUILDER_API_VERSION@.la \
     298        Parser/libMolecuilderParser-@MOLECUILDER_API_VERSION@.la \
     299        LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \
     300        Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \
     301        Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
     302        $(BOOST_LIB) \
     303        ${BOOST_THREAD_LIB} \
     304        ${BOOST_PROGRAM_OPTIONS_LIB} \
     305        ${GUI_LIBS}
     306
     307joiner_SOURCES = joiner.cpp datacreator.cpp datacreator.hpp periodentafel.hpp
     308joiner_LDADD = \
     309        libMolecuilder-@MOLECUILDER_API_VERSION@.la \
     310        LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \
     311        Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \
     312        Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
     313        $(BOOST_LIB) \
     314        ${BOOST_THREAD_LIB} \
     315        ${BOOST_PROGRAM_OPTIONS_LIB}
     316
     317analyzer_SOURCES = analyzer.cpp datacreator.cpp periodentafel.hpp datacreator.hpp
     318analyzer_LDADD = \
     319        libMolecuilder-@MOLECUILDER_API_VERSION@.la \
     320        LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \
     321        Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \
     322        Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \
     323        $(BOOST_LIB) \
     324        ${BOOST_THREAD_LIB} \
     325        ${BOOST_PROGRAM_OPTIONS_LIB}
    329326
    330327#Rules needed for QT4
     
    332329# Therfore `%'-rules do not seem to work
    333330#Quick fix to get it done otherwise
    334 allmocs.moc.cpp: ${QTUIMOC_HEADER}
    335         echo "" > allmocs.moc.cpp;\
     331${QTUIMOC_TARGETS}: ${QTUIMOC_HEADER}
    336332        list='$(QTUIMOC_HEADER)'; for header in $$list; do \
    337333        echo "Making mocfile for $$header"; \
     
    339335        $(MOC) $(srcdir)/$$header -o $$target \
    340336        || eval $$failcom; \
    341         echo "#include \"$$target\"" >> allmocs.moc.cpp; \
    342337        done;
    343338
    344 unity.cpp: ${LINALGSOURCE} ${LINALGHEADER} ${SOURCE} ${HEADER}
    345         echo "" >  unity.cpp; \
    346         list='$(BASESOURCE)'; for file in $$list; do \
    347           echo "#include \"$(srcdir)/$$file\"" >> unity.cpp; \
    348         done; \
    349         list='$(LINALGSOURCE)'; for file in $$list; do \
    350           echo "#include \"$(srcdir)/$$file\"" >> unity.cpp; \
    351         done; \
    352         list='$(SOURCE)'; for file in $$list; do \
    353           echo "#include \"$(srcdir)/$$file\"" >> unity.cpp; \
    354         done; \
    355         subdirs='$(SUBDIRS)';for directory in $$subdirs; do\
    356                 olddir=$$PWD;\
    357                 cd $$directory && make unity.cpp;\
    358                 cd $$olddir;\
    359                 echo "#include \"$$directory/unity.cpp\"" >> unity.cpp;\
    360         done;\
    361         echo "#include \"$(srcdir)/builder.cpp\"" >> unity.cpp;
    362 
    363 MOSTLYCLEANFILES = allmocs.moc.cpp unity.cpp
     339MOSTLYCLEANFILES = ${QTUIMOC_TARGETS}
    364340       
    365341#EXTRA_DIST = ${molecuilder_DATA}
Note: See TracChangeset for help on using the changeset viewer.