Changeset 115378 for src/Makefile.am


Ignore:
Timestamp:
Dec 22, 2010, 9:16:51 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
9098f9
Parents:
1d77e1a
git-author:
Frederik Heber <heber@…> (12/22/10 08:22:13)
git-committer:
Frederik Heber <heber@…> (12/22/10 09:16:51)
Message:

Changes to allow for (re-)incorporation of CodePatterns into MoleCuilder.

library:

  • no more suffixed with version, this should be dealt by pkg-config (.pc) or a contained version information.
  • corrected and extended .pc file
  • m4 macro ax_codepatterns.m4 created to allow for easy checking with autotools

codepatterns-config:

  • if pkg-config fails there is a small tool that tells about necessary cflags and the likes to compile with CodePatterns library (this was developed before we noticed we had a (half-)working pkg-config present).

smaller changes:

  • moved all Helpers files to src/Helpers (again).
  • changed include paths for Assert.hpp, ... accordingly.
  • version is not prefixed with "v" anymore.
  • small stuff in fast_functions.hpp is absolete (stl::algorithms)
  • Helpers/enumeration.hpp contains enumeration class ("iterable enum")
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile.am

    r1d77e1a r115378  
    11# PLEASE adhere to the alphabetical ordering in this Makefile!
    22# Also indentation by a single tab
    3 
    4 SUBDIRS = Patterns
    53
    64INCLUDES = -I$(top_srcdir)/src
     
    119AM_CPPFLAGS = ${BOOST_CPPFLAGS}
    1210
     11BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_THREAD_LIB)
     12
     13
     14## config utility ###
     15
     16bin_PROGRAMS = codepatterns-config
     17
     18codepatterns_config_SOURCES = \
     19        codepatterns-config-main.cpp \
     20        codepatterns-config.cpp \
     21        codepatterns-config.hpp \
     22        version.hpp
     23codepatterns_config_LDFLAGS = \
     24        $(BOOST_LDFLAGS) \
     25        $(BOOST_PROGRAM_OPTIONS_LIB) \
     26        $(BOOST_THREAD_LIB) \
     27        libCodePatterns.la
     28
     29
     30### PATTERNS ###
     31
     32nobase_include_HEADERS = $(PATTERNSOURCE) $(PATTERNHEADER)
     33
     34PATTERNSOURCE = \
     35        Patterns/ObservedContainer_impl.hpp \
     36        Patterns/Registry_impl.hpp \
     37        Patterns/Singleton_impl.hpp
     38PATTERNHEADER = \
     39        Patterns/Cacheable.hpp \
     40        Patterns/ObservedContainer.hpp \
     41        Patterns/ObservedIterator.hpp \
     42        Patterns/Observer.hpp \
     43        Patterns/Registry.hpp \
     44        Patterns/Singleton.hpp
     45
     46### HELPERS ###
     47
     48include_HEADERS = \
     49        $(srcdir)/version.hpp
     50
    1351# this includes source files that need to be present at multiple points
    1452HELPERSSOURCE =  \
    15   Assert.cpp \
    16   errorlogger.cpp \
    17   Info.cpp \
    18   Log.cpp \
    19   logger.cpp \
    20   MemDebug.cpp \
    21   Verbose.cpp \
    22   $(srcdir)/version.cpp
     53        Patterns/Observer.cpp \
     54        Helpers/Assert.cpp \
     55        Helpers/errorlogger.cpp \
     56        Helpers/Info.cpp \
     57        Helpers/Log.cpp \
     58        Helpers/logger.cpp \
     59        Helpers/MemDebug.cpp \
     60        Helpers/Verbose.cpp \
     61        $(srcdir)/version.cpp
    2362
    2463HELPERSHEADER =  \
    25   Assert.hpp \
    26   errorlogger.hpp \
    27   Info.hpp \
    28   Log.hpp \
    29   logger.hpp \
    30   MemDebug.hpp \
    31   Verbose.hpp \
    32   $(srcdir)/version.hpp
     64        Helpers/Assert.hpp \
     65        Helpers/enumeration.hpp \
     66        Helpers/errorlogger.hpp \
     67        Helpers/Info.hpp \
     68        Helpers/Log.hpp \
     69        Helpers/logger.hpp \
     70        Helpers/MemDebug.hpp \
     71        Helpers/Range.hpp \
     72        Helpers/toString.hpp \
     73        Helpers/Verbose.hpp \
     74        $(srcdir)/version.hpp
    3375
    34 lib_LTLIBRARIES = libCodePatterns-@CODEPATTERNS_API_VERSION@.la
    35 libCodePatterns_includedir = $(includedir)/CodePatterns-$(CODEPATTERNS_API_VERSION)/
    36 nobase_libCodePatterns_include_HEADERS = ${HELPERSHEADER}
     76##-@CODEPATTERNS_API_VERSION@
     77lib_LTLIBRARIES = libCodePatterns.la
     78libCodePatterns_LIBS = $(BOOST_THREAD_LIB)
    3779
    3880## Define the source file list for the "libexample-@CODEPATTERNS_API_VERSION@.la"
     
    4486## from each source file.  Note that it is not necessary to list header files
    4587## which are already listed elsewhere in a _HEADERS variable assignment.
    46 libCodePatterns_@CODEPATTERNS_API_VERSION@_la_SOURCES = ${HELPERSSOURCE}
     88#-$(CODEPATTERNS_API_VERSION)
     89libCodePatterns_la_SOURCES = ${HELPERSSOURCE}
    4790
    4891## Instruct libtool to include ABI version information in the generated shared
    4992## library file (.so).  The library ABI version is defined in configure.ac, so
    5093## that all version information is kept in one place.
    51 libCodePatterns_@CODEPATTERNS_API_VERSION@_la_LDFLAGS = -version-info $(CODEPATTERNS_SO_VERSION)
     94#-$(CODEPATTERNS_API_VERSION)
     95libCodePatterns_la_LDFLAGS = -version-info $(CODEPATTERNS_SO_VERSION)
    5296
    5397## The generated configuration header is installed in its own subdirectory of
     
    62106## configuration header file is generated at configure time and should not be
    63107## shipped with the source tarball.
    64 libCodePatterns_libincludedir = $(libdir)/CodePatterns-$(CODEPATTERNS_API_VERSION)/include
    65 nodist_libCodePatterns_libinclude_HEADERS = $(top_builddir)/libCodePatterns_config.h
     108libCodePatterns_libincludedir = $(includedir)/Helpers/
     109#-$(CODEPATTERNS_API_VERSION)
     110nodist_libCodePatterns_libinclude_HEADERS = $(HELPERSHEADER) $(top_builddir)/libCodePatterns_config.h
    66111
    67112## Install the generated pkg-config file (.pc) into the expected location for
     
    70115## in which case the correct install location would be $(datadir)/pkgconfig.
    71116pkgconfigdir = $(libdir)/pkgconfig
    72 pkgconfig_DATA = $(top_builddir)/CodePatterns-$(CODEPATTERNS_API_VERSION).pc
     117pkgconfig_DATA = $(top_builddir)/CodePatterns.pc
    73118
    74119FORCE:
     
    76121$(srcdir)/.git-version: FORCE
    77122        @if (test -d $(top_srcdir)/.git && cd $(srcdir) \
    78              && { git describe --dirty --always || git describe; } ) > .git-version-t 2>/dev/null \
     123             && { git describe | sed -e "s#^v##" ; } ) > .git-version-t 2>/dev/null \
    79124          && ! diff .git-version-t $(srcdir)/.git-version >/dev/null 2>&1; then \
    80125          mv -f .git-version-t $(srcdir)/.git-version; \
     
    86131
    87132$(srcdir)/version.cpp: $(srcdir)/.git-version
    88         echo "const char *MOLECUILDERVERSION = \"$(PACKAGE_NAME) version "`cat $(srcdir)/.git-version`"\";" > $@
     133        echo -e "const char *CODEPATTERNSVERSION = \"`cat $(srcdir)/.git-version`\";\nconst char *CODEPATTERNSFULLVERSION = \"$(PACKAGE_NAME) version "`cat $(srcdir)/.git-version`"\";\n" > $@
     134
     135$(srcdir)/codepatterns-config.cpp:
     136        echo -e "const char *CODEPATTERNSCFLAGS=\"-I$(includedir) ${BOOST_CPPFLAGS}\";\nconst char *CODEPATTERNSLDFLAGS=\"-L$(libdir) $(BOOST_LDFLAGS)\";\nconst char *CODEPATTERNSLIBS=\"-lCodePatterns $(BOOST_THREAD_LIB)\";\n" > $@
     137
Note: See TracChangeset for help on using the changeset viewer.