aboutsummaryrefslogtreecommitdiff
path: root/template/Makefile.am
blob: f39fbadf0503c0d9e8a2eceef30b72379e02aea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# file      : template/Makefile.am
# copyright : not copyrighted - public domain

EXTRA_DIST = __file__(extra_dist)

noinst_PROGRAMS = driver
driver_SOURCES = driver.cxx database.hxx __path__(extra_sources) __path__(extra_headers)

AM_CPPFLAGS = -I'$(builddir)' -I'$(srcdir)'

if DATABASE_MYSQL
AM_CPPFLAGS += -DDATABASE_MYSQL
endif

if DATABASE_SQLITE
AM_CPPFLAGS += -DDATABASE_SQLITE
endif

if DATABASE_PGSQL
AM_CPPFLAGS += -DDATABASE_PGSQL
endif

if DATABASE_ORACLE
AM_CPPFLAGS += -DDATABASE_ORACLE
endif

if DATABASE_MSSQL
AM_CPPFLAGS += -DDATABASE_MSSQL
endif

TESTS=$(top_builddir)/tester
TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;

# ODB compilation.
#
driver_SOURCES += __path__(odb_header_stem).hxx
nodist_driver_SOURCES = __path__(odb_header_stem)-odb.cxx
BUILT_SOURCES = __path__(odb_header_stem)-odb.hxx
CLEANFILES = __path__(odb_header_stem)-odb.hxx __path__(odb_header_stem)-odb.ixx __path__(odb_header_stem)-odb.cxx

ODB = @ODB@
ODBFLAGS = @ODBFLAGS@
ODBCPPFLAGS = @ODBCPPFLAGS@

if HAVE_CXX11
ODBFLAGS += --std c++11
endif

__path__(odb_header_stem)-odb.hxx: __path__(odb_header_stem).hxx
	$(ODB) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS)  __value__(odb_options) $<