~drizzle-trunk/drizzle/development

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# vim:ft=automake
# Copyright (C) 2000-2006 MySQL AB
# Copyright (C) 2010 Brian Aker
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

MESSAGE_DIR=drizzled/message
MESSAGE_LDADD= \
	       ${MESSAGE_DIR}/libdrizzledmessage.la \
	       ${LIBPROTOBUF} \
	       ${LIBUUID} \
	       ${LTLIBINTL} \
	       $(GCOV_LIBS) \
		drizzled/internal/libinternal.la

MESSAGE_AM_CXXFLAGS = ${AM_CXXFLAGS} ${PROTOSKIP_WARNINGS}

noinst_PROGRAMS+= \
		  drizzled/message/schema_reader \
		  drizzled/message/schema_writer \
		  drizzled/message/table_raw_reader \
		  drizzled/message/table_reader \
		  drizzled/message/table_writer \
		  drizzled/message/transaction_reader \
		  drizzled/message/transaction_writer

lib_LTLIBRARIES += drizzled/message/libdrizzledmessage.la

drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR}

drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc
drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} $(GCOV_LIBS) drizzled/libcharset.la

nobase_dist_include_HEADERS+= drizzled/message/statement_transform.h

nodist_drizzled_message_libdrizzledmessage_la_SOURCES = \
							drizzled/message/engine.pb.cc \
							drizzled/message/transaction.pb.cc \
							drizzled/message/schema.pb.cc \
                                                        drizzled/message/resultset.pb.cc \
							drizzled/message/table.pb.cc

nobase_nodist_include_HEADERS+= \
				drizzled/message/engine.pb.h \
				drizzled/message/transaction.pb.h \
				drizzled/message/schema.pb.h \
                                drizzled/message/resultset.pb.h \
				drizzled/message/table.pb.h 

noinst_HEADERS+= \
		drizzled/message/ioutil.h \
		drizzled/message/all.h


drizzled_message_schema_reader_SOURCES =  drizzled/message/schema_reader.cc
drizzled_message_schema_reader_LDADD = ${MESSAGE_LDADD}
drizzled_message_schema_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS}

drizzled_message_schema_writer_SOURCES =  drizzled/message/schema_writer.cc
drizzled_message_schema_writer_LDADD = ${MESSAGE_LDADD}
drizzled_message_schema_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS}

drizzled_message_table_reader_SOURCES =  drizzled/message/table_reader.cc
drizzled_message_table_reader_LDADD = ${MESSAGE_LDADD}
drizzled_message_table_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS}

drizzled_message_table_raw_reader_SOURCES =  drizzled/message/table_raw_reader.cc
drizzled_message_table_raw_reader_LDADD = ${MESSAGE_LDADD}
drizzled_message_table_raw_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS}

drizzled_message_table_writer_SOURCES =  drizzled/message/table_writer.cc
drizzled_message_table_writer_LDADD = ${MESSAGE_LDADD} ${BOOST_LIBS}
drizzled_message_table_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS}

drizzled_message_transaction_writer_SOURCES =  drizzled/message/transaction_writer.cc
drizzled_message_transaction_writer_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la
drizzled_message_transaction_writer_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR}

drizzled_message_transaction_reader_SOURCES =  drizzled/message/transaction_reader.cc
drizzled_message_transaction_reader_LDADD = ${MESSAGE_LDADD} ${top_builddir}/drizzled/algorithm/libhash.la ${top_builddir}/drizzled/util/libutil.la
drizzled_message_transaction_reader_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR}

EXTRA_DIST += \
		${MESSAGE_DIR}/engine.proto \
		${MESSAGE_DIR}/schema.proto \
		${MESSAGE_DIR}/table.proto \
                ${MESSAGE_DIR}/resultset.proto \
		${MESSAGE_DIR}/transaction.proto

BUILT_SOURCES += \
		${MESSAGE_DIR}/engine.pb.h \
		${MESSAGE_DIR}/schema.pb.h \
		${MESSAGE_DIR}/table.pb.h \
                ${MESSAGE_DIR}/resultset.pb.h \
		${MESSAGE_DIR}/transaction.pb.h

CLEANFILES += \
	    ${MESSAGE_DIR}/engine.pb.h \
	    ${MESSAGE_DIR}/engine.pb.cc \
	    ${MESSAGE_DIR}/schema.pb.h \
	    ${MESSAGE_DIR}/schema.pb.cc \
	    ${MESSAGE_DIR}/table.pb.h \
	    ${MESSAGE_DIR}/table.pb.cc \
            ${MESSAGE_DIR}/resultset.pb.h \
            ${MESSAGE_DIR}/resultset.pb.cc \
	    ${MESSAGE_DIR}/transaction.pb.h \
	    ${MESSAGE_DIR}/transaction.pb.cc

SUFFIXES += .proto .pb.cc .pb.h

MESSAGE_PROTO_PATH=${top_builddir}/${MESSAGE_DIR}:${top_srcdir}/${MESSAGE_DIR}

.proto.pb.cc:
	$(PROTOC) --proto_path=${MESSAGE_PROTO_PATH} \
		--cpp_out=${top_builddir}/${MESSAGE_DIR} $<
.proto.pb.h:
	$(PROTOC) --proto_path=${MESSAGE_PROTO_PATH} \
		--cpp_out=${top_builddir}/drizzled/message $<