summaryrefslogtreecommitdiff
path: root/volk/gen/make_h.py
diff options
context:
space:
mode:
authorJohnathan Corgan2011-07-08 18:36:32 -0700
committerJohnathan Corgan2011-07-08 18:36:32 -0700
commit2cad94708515537d889bc0e1444472db81ee8ba5 (patch)
tree14e989409403b50c529b859e4a50cfcf164244a2 /volk/gen/make_h.py
parent6c9de15d04721c9c77b2c8bf5e6202461eeb1c29 (diff)
parent1aeb7d085556edd23fbab0584603354895b9af6d (diff)
downloadgnuradio-2cad94708515537d889bc0e1444472db81ee8ba5.tar.gz
gnuradio-2cad94708515537d889bc0e1444472db81ee8ba5.tar.bz2
gnuradio-2cad94708515537d889bc0e1444472db81ee8ba5.zip
Merge branch 'master' into next
Diffstat (limited to 'volk/gen/make_h.py')
-rw-r--r--volk/gen/make_h.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/volk/gen/make_h.py b/volk/gen/make_h.py
new file mode 100644
index 000000000..354e57258
--- /dev/null
+++ b/volk/gen/make_h.py
@@ -0,0 +1,38 @@
+from xml.dom import minidom
+from volk_regexp import *
+
+def make_h(funclist, arched_arglist) :
+ tempstring = "";
+ tempstring = tempstring + '/*this file is auto generated by make_h.py*/\n';
+
+ tempstring = tempstring + '\n#ifndef INCLUDED_VOLK_RUNTIME';
+ tempstring = tempstring + '\n#define INCLUDED_VOLK_RUNTIME';
+ tempstring = tempstring + '\n\n#include<volk/volk_typedefs.h>\n';
+ tempstring = tempstring + '#include<volk/volk_config_fixed.h>\n';
+ tempstring = tempstring + '#include<volk/volk_common.h>\n';
+ tempstring = tempstring + '#include<volk/volk_complex.h>\n';
+ tempstring = tempstring + '__VOLK_DECL_BEGIN\n';
+
+ tempstring = tempstring + '\n';
+
+ tempstring += """
+struct volk_func_desc {
+ const char **indices;
+ const int *arch_defs;
+ const int n_archs;
+};
+
+VOLK_API unsigned int volk_get_alignment(void);
+
+"""
+ for i in range(len(funclist)):
+ tempstring += "extern VOLK_API " + replace_volk.sub("p", funclist[i]) + " " + funclist[i] + ";\n"
+ tempstring += "extern VOLK_API void %s_manual%s;\n" % (funclist[i], arched_arglist[i])
+ tempstring = strip_trailing(tempstring, " {")
+ tempstring += "extern VOLK_API struct volk_func_desc %s_get_func_desc(void);\n" % (funclist[i])
+
+ tempstring = tempstring + '__VOLK_DECL_END\n';
+ tempstring = tempstring + "#endif /*INCLUDED_VOLK_RUNTIME*/\n";
+
+ return tempstring;
+