summaryrefslogtreecommitdiff
path: root/orc.mak
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@debian.org>2011-08-10 16:19:28 +0200
committerSjoerd Simons <sjoerd@debian.org>2011-08-10 16:19:28 +0200
commitc9e69b0e35d5242394d371ea5576f430ece3eeeb (patch)
tree06270a7839d2d858ed7900fdc05e366f2dcfd6d6 /orc.mak
parentdba33e466e17070333b7f587b07a47dcf5037f8c (diff)
Imported Upstream version 0.99.1
Diffstat (limited to 'orc.mak')
-rw-r--r--orc.mak46
1 files changed, 46 insertions, 0 deletions
diff --git a/orc.mak b/orc.mak
new file mode 100644
index 0000000..5a6ff96
--- /dev/null
+++ b/orc.mak
@@ -0,0 +1,46 @@
+#
+# This is a Makefile.am fragment to build Orc code. It is based
+# on the orc.mak file distributed in the GStreamer common
+# repository.
+#
+# Include this file like this:
+#
+# include $(top_srcdir)/orc.mak
+#
+# For each Orc source file, append its name (without the extension)
+# to ORC_SOURCE:
+#
+# ORC_SOURCE += gstadderorc
+#
+# This will create gstadder-orc-gen.c and gstadder-orc-gen.h, which
+# you need to add to your nodist_module_SOURCES.
+#
+# Note that this file appends to BUILT_SOURCES and CLEANFILES, so
+# define them before including this file.
+#
+
+
+EXTRA_DIST += $(addsuffix .orc,$(ORC_SOURCE))
+
+ORC_BUILT_SOURCE = $(addsuffix -orc-gen.c,$(ORC_SOURCE))
+ORC_BUILT_HEADER = $(addsuffix -orc-gen.h,$(ORC_SOURCE))
+
+BUILT_SOURCES += $(ORC_BUILT_SOURCE) $(ORC_BUILT_HEADER)
+CLEANFILES += $(BUILT_SOURCES)
+
+
+orcc_v_gen = $(orcc_v_gen_$(V))
+orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
+orcc_v_gen_0 = @echo " ORCC $@";
+
+cp_v_gen = $(cp_v_gen_$(V))
+cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
+cp_v_gen_0 = @echo " CP $@";
+
+%-orc-gen.c: %.orc
+ @mkdir -p $(@D)
+ $(orcc_v_gen)$(ORCC) --implementation -o $@ $<
+
+%-orc-gen.h: %.orc
+ @mkdir -p $(@D)
+ $(orcc_v_gen)$(ORCC) --header -o $@ $<