summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-27 12:30:04 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-27 12:34:01 +0200
commit913209ab9acfcd4b547fa0f0d9edbe351f36895e (patch)
treed034c1fda25f2a561d18669479f18ab6cc0b78aa /src
parent54de55f1fc556a7689ee0189ec4ee79c01a690f9 (diff)
downloadcmumble-913209ab9acfcd4b547fa0f0d9edbe351f36895e.tar.gz
cmumble-913209ab9acfcd4b547fa0f0d9edbe351f36895e.tar.bz2
cmumble-913209ab9acfcd4b547fa0f0d9edbe351f36895e.zip
Add build system (autoconf/make)
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore3
-rw-r--r--src/Makefile.am16
-rwxr-xr-x[-rw-r--r--]src/gen_message.sh2
3 files changed, 21 insertions, 0 deletions
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..12ac542
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,3 @@
+messages.h
+mumble.pb-c.c
+mumble.pb-c.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..412d668
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,16 @@
+bin_PROGRAMS = cmumble
+
+noinst_HEADERS = messages.h mumble.pb-c.h varint.h
+cmumble_SOURCES = cmumble.c mumble.pb-c.c varint.c
+cmumble_LDADD = $(PROTOBUF_LIBS) $(GLIB_LIBS) $(GIO_LIBS) $(GSTREAMER_LIBS) $(CELT_LIBS)
+
+AM_CPPFLAGS = $(PROTOBUF_CFLAGS) $(GLIB_CFLAGS) $(GIO_CFLAGS) $(GSTREAMER_CFLAGS) $(CELT_CFLAGS)
+AM_CFLAGS = $(GCC_FLAGS)
+
+messages.h: messages.txt
+ ./gen_message.sh < $< > $@
+
+mumble.pb-c.c mumble.pb-c.h: mumble.proto
+ $(PROTOBUF_EXECUTABLE) --c_out=. $<
+
+CLEANFILES = mumble.pb-c.c mumble.pb-c.h messages.h
diff --git a/src/gen_message.sh b/src/gen_message.sh
index 4b0d1f8..2fbe75c 100644..100755
--- a/src/gen_message.sh
+++ b/src/gen_message.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
echo "static const struct { const ProtobufCMessageDescriptor *descriptor; const char *name; } messages[] = {"
while read message
do