[41e8e2] | 1 | # PLEASE adhere to the alphabetical ordering in this Makefile!
|
---|
| 2 | # Also indentation by a single tab
|
---|
| 3 |
|
---|
| 4 | AM_LDFLAGS = $(BOOST_THREAD_LDFLAGS) -ldl
|
---|
| 5 | AM_CPPFLAGS = -I$(top_srcdir)/src/ $(BOOST_CPPFLAGS)
|
---|
| 6 |
|
---|
| 7 | SUBDIRS = Helpers Patterns Observer unittests
|
---|
| 8 |
|
---|
| 9 | ## config utility ###
|
---|
| 10 |
|
---|
| 11 | bin_PROGRAMS = codepatterns-config codepatterns-debug-config
|
---|
| 12 |
|
---|
| 13 | CONFIGSOURCES = \
|
---|
| 14 | codepatterns-config-main.cpp \
|
---|
| 15 | codepatterns-config.hpp \
|
---|
| 16 | version.hpp
|
---|
| 17 |
|
---|
| 18 | codepatterns_config_SOURCES = \
|
---|
| 19 | $(CONFIGSOURCES) \
|
---|
| 20 | codepatterns-config.cpp
|
---|
| 21 | codepatterns_config_CPPFLAGS = \
|
---|
| 22 | $(AM_CPPFLAGS) \
|
---|
| 23 | $(BOOST_CPPFLAGS)
|
---|
| 24 | codepatterns_config_LDFLAGS = \
|
---|
| 25 | $(AM_LDFLAGS) \
|
---|
| 26 | $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
|
---|
| 27 | $(BOOST_PROGRAM_OPTIONS_LIBS)
|
---|
| 28 | codepatterns_config_LDADD = \
|
---|
| 29 | libcodepatterns.la
|
---|
| 30 |
|
---|
| 31 | codepatterns_debug_config_SOURCES = \
|
---|
| 32 | $(CONFIGSOURCES) \
|
---|
| 33 | codepatterns-debug-config.cpp
|
---|
| 34 | codepatterns_debug_config_CPPFLAGS = \
|
---|
| 35 | $(AM_CPPFLAGS) \
|
---|
| 36 | $(BOOST_CPPFLAGS)
|
---|
| 37 | codepatterns_debug_config_LDFLAGS = \
|
---|
| 38 | $(AM_LDFLAGS) \
|
---|
| 39 | $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
|
---|
| 40 | $(BOOST_PROGRAM_OPTIONS_LIBS)
|
---|
| 41 | codepatterns_debug_config_LDADD = \
|
---|
| 42 | libcodepatterns.la
|
---|
| 43 |
|
---|
| 44 | dist_man_MANS = \
|
---|
| 45 | manpages/codepatterns-config.1 \
|
---|
| 46 | manpages/codepatterns-debug-config.1
|
---|
| 47 |
|
---|
| 48 | include_HEADERS = \
|
---|
| 49 | version.hpp
|
---|
| 50 |
|
---|
| 51 | CLEANFILES = \
|
---|
| 52 | codepatterns-config.cpp \
|
---|
| 53 | codepatterns-debug-config.cpp
|
---|
| 54 |
|
---|
| 55 | # this includes source files that need to be present at multiple points
|
---|
| 56 | SOURCE = \
|
---|
| 57 | version.cpp
|
---|
| 58 | SOURCEDEBUG = \
|
---|
| 59 | $(SOURCE)
|
---|
| 60 |
|
---|
| 61 | HEADER = \
|
---|
| 62 | version.hpp
|
---|
| 63 |
|
---|
| 64 | ##-@CODEPATTERNS_API_VERSION@
|
---|
| 65 | lib_LTLIBRARIES = libcodepatterns.la libcodepatterns-debug.la
|
---|
| 66 | libcodepatterns_la_LDFLAGS = \
|
---|
| 67 | $(AM_LDFLAGS) \
|
---|
| 68 | $(LIBRT)
|
---|
| 69 | libcodepatterns_debug_la_LDFLAGS = \
|
---|
| 70 | $(AM_LDFLAGS) \
|
---|
| 71 | $(LIBRT)
|
---|
| 72 | libcodepatterns_la_LIBADD = \
|
---|
| 73 | Patterns/libcodepatterns-Patterns.la \
|
---|
| 74 | Observer/libcodepatterns-Observer.la \
|
---|
| 75 | Helpers/libcodepatterns-Helpers.la
|
---|
| 76 | libcodepatterns_debug_la_LIBADD = \
|
---|
| 77 | Patterns/libcodepatterns-Patterns-debug.la \
|
---|
| 78 | Observer/libcodepatterns-Observer-debug.la \
|
---|
| 79 | Helpers/libcodepatterns-Helpers-debug.la
|
---|
| 80 |
|
---|
| 81 | libcodepatterns_la_CPPFLAGS = -DNDEBUG -DNO_MEMDEBUG $(AM_CPPFLAGS)
|
---|
| 82 | libcodepatterns_debug_la_CPPFLAGS = -DMEMDEBUG -DLOG_OBSERVER $(AM_CPPFLAGS)
|
---|
| 83 |
|
---|
| 84 | ## Define the source file list for the "libexample-@CODEPATTERNS_API_VERSION@.la"
|
---|
| 85 | ## target. Note that @CODEPATTERNS_API_VERSION@ is not interpreted by Automake and
|
---|
| 86 | ## will therefore be treated as if it were literally part of the target name,
|
---|
| 87 | ## and the variable name derived from that.
|
---|
| 88 | ## The file extension .cc is recognized by Automake, and makes it produce
|
---|
| 89 | ## rules which invoke the C++ compiler to produce a libtool object file (.lo)
|
---|
| 90 | ## from each source file. Note that it is not necessary to list header files
|
---|
| 91 | ## which are already listed elsewhere in a _HEADERS variable assignment.
|
---|
| 92 | #-$(CODEPATTERNS_API_VERSION)
|
---|
| 93 | libcodepatterns_la_SOURCES = $(SOURCE)
|
---|
| 94 | libcodepatterns_debug_la_SOURCES = $(SOURCEDEBUG)
|
---|
| 95 |
|
---|
| 96 | ## Instruct libtool to include ABI version information in the generated shared
|
---|
| 97 | ## library file (.so). The library ABI version is defined in configure.ac, so
|
---|
| 98 | ## that all version information is kept in one place.
|
---|
| 99 | #-$(CODEPATTERNS_API_VERSION)
|
---|
| 100 | libcodepatterns_la_LDFLAGS += -version-info $(CODEPATTERNS_SO_VERSION)
|
---|
| 101 | libcodepatterns_debug_la_LDFLAGS += -version-info $(CODEPATTERNS_SO_VERSION)
|
---|
| 102 |
|
---|
| 103 | ## The generated configuration header is installed in its own subdirectory of
|
---|
| 104 | ## $(libdir). The reason for this is that the configuration information put
|
---|
| 105 | ## into this header file describes the target platform the installed library
|
---|
| 106 | ## has been built for. Thus the file must not be installed into a location
|
---|
| 107 | ## intended for architecture-independent files, as defined by the Filesystem
|
---|
| 108 | ## Hierarchy Standard (FHS).
|
---|
| 109 | ## The nodist_ prefix instructs Automake to not generate rules for including
|
---|
| 110 | ## the listed files in the distribution on 'make dist'. Files that are listed
|
---|
| 111 | ## in _HEADERS variables are normally included in the distribution, but the
|
---|
| 112 | ## configuration header file is generated at configure time and should not be
|
---|
| 113 | ## shipped with the source tarball.
|
---|
| 114 | libcodepatterns_libincludedir = $(includedir)/CodePatterns/
|
---|
| 115 | #-$(CODEPATTERNS_API_VERSION)
|
---|
| 116 | libcodepatterns_libinclude_HEADERS = $(HEADER) $(top_builddir)/libcodepatterns_config.h
|
---|
| 117 |
|
---|
| 118 | ## Install the generated pkg-config file (.pc) into the expected location for
|
---|
| 119 | ## architecture-dependent package configuration information. Occasionally,
|
---|
| 120 | ## pkg-config files are also used for architecture-independent data packages,
|
---|
| 121 | ## in which case the correct install location would be $(datadir)/pkgconfig.
|
---|
| 122 | pkgconfigdir = $(libdir)/pkgconfig
|
---|
| 123 | pkgconfig_DATA = $(top_builddir)/libcodepatterns.pc $(top_builddir)/libcodepatterns-debug.pc
|
---|
| 124 |
|
---|
| 125 | FORCE:
|
---|
| 126 |
|
---|
| 127 | $(srcdir)/.git-version: FORCE
|
---|
[3dd6a5] | 128 | @if (test -d $(top_srcdir)/../../.git && cd $(srcdir) \
|
---|
[41e8e2] | 129 | && { git describe --abbrev=0 | sed -e "s#^v##" ; } ) > .git-version-t 2>/dev/null \
|
---|
| 130 | && ! diff .git-version-t $(srcdir)/.git-version >/dev/null 2>&1; then \
|
---|
| 131 | mv -f .git-version-t $(srcdir)/.git-version; \
|
---|
| 132 | else \
|
---|
| 133 | rm -f .git-version-t; \
|
---|
| 134 | fi
|
---|
| 135 |
|
---|
| 136 | EXTRA_DIST = $(srcdir)/.git-version
|
---|
| 137 |
|
---|
| 138 | version.cpp: $(srcdir)/.git-version
|
---|
| 139 | echo -e "const char *CODEPATTERNSVERSION = \"`cat <$(srcdir)/.git-version`\";\nconst char *CODEPATTERNSFULLVERSION = \"$(PACKAGE_NAME) version "`cat $(srcdir)/.git-version`"\";\n" > $@
|
---|
| 140 |
|
---|
| 141 | codepatterns-config.cpp:
|
---|
| 142 | echo -e "const char *CODEPATTERNSCFLAGS=\"-I$(includedir) ${BOOST_CPPFLAGS}\";\nconst char *CODEPATTERNSLDFLAGS=\"-L$(libdir) $(BOOST_LDFLAGS)\";\nconst char *CODEPATTERNSLIBS=\"-lcodepatterns $(BOOST_THREAD_LIB)\";\n" > $@
|
---|
| 143 |
|
---|
| 144 | codepatterns-debug-config.cpp:
|
---|
| 145 | echo -e "const char *CODEPATTERNSCFLAGS=\"-I$(includedir) ${BOOST_CPPFLAGS}\";\nconst char *CODEPATTERNSLDFLAGS=\"-L$(libdir) $(BOOST_LDFLAGS)\";\nconst char *CODEPATTERNSLIBS=\"-lcodepatterns-debug $(BOOST_THREAD_LIB)\";\n" > $@
|
---|