diff options
author | Nick Foster <nick@nerdnetworks.org> | 2011-04-13 18:32:28 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2011-04-13 18:32:28 -0700 |
commit | 5fffe801f95f2ef8bddf51aea8ed260eae0bf7b8 (patch) | |
tree | 86cd85abd400a4c18473f09e96dfd33e5986caa6 /volk/include | |
parent | 9b7d444aaebbe0708e9703bce30c63b63bc81825 (diff) |
Volk: make_makefile_am.py changes to generate cflags, ldflags. no conditional linking yet.
Diffstat (limited to 'volk/include')
-rw-r--r-- | volk/include/volk/make_makefile_am.py | 19 | ||||
-rwxr-xr-x | volk/include/volk/volk_register.py | 8 |
2 files changed, 21 insertions, 6 deletions
diff --git a/volk/include/volk/make_makefile_am.py b/volk/include/volk/make_makefile_am.py index 89ea1f4b66..c44fe11af9 100644 --- a/volk/include/volk/make_makefile_am.py +++ b/volk/include/volk/make_makefile_am.py @@ -17,7 +17,7 @@ from xml.dom import minidom -def make_makefile_am(dom, machines): +def make_makefile_am(dom, machines, archflags_dict): tempstring = r""" # This file is automatically generated by make_makefile_am.py. # Do not edit this file. @@ -67,9 +67,20 @@ volk_orc_LIBADD = \ """ #here be dragons - for machine_name in machines: - tempstring += "if LV_MACHINE_" + machine_name.swapcase() - tempstring += "libvolk_" + machine_name + "_la_LDFLAGS = " + for machine_name in machines: + tempstring += "if LV_MACHINE_" + machine_name.swapcase() + "\n" + tempstring += "libvolk_" + machine_name + "_la_LDFLAGS = " + for arch in machines[machine_name]: + if archflags_dict[arch] != "none": + tempstring += "-" + archflags_dict[arch] + " " + + tempstring += "\nlibvolk_" + machine_name + "_la_CFLAGS = " + for arch in machines[machine_name]: + if archflags_dict[arch] != "none": + tempstring += "-DLV_HAVE_" + arch.swapcase() + " " + tempstring += "\nlibvolk_" + machine_name + "_la_SOURCES = $(libvolk_la_SOURCES)" + tempstring += "\nlibvolk_la_LIBADD = libvolk_" + machine_name + ".la" + tempstring += "\nendif\n" tempstring += """ diff --git a/volk/include/volk/volk_register.py b/volk/include/volk/volk_register.py index d5a4a968f6..10610dcfe4 100755 --- a/volk/include/volk/volk_register.py +++ b/volk/include/volk/volk_register.py @@ -83,8 +83,12 @@ for arch in archs: a_var = re.search("^\$", arch); if a_var: archs.remove(arch); + + - +archflags_dict = {} +for filearch in filearchs: + archflags_dict[str(filearch.attributes["name"].value)] = str(filearch.getElementsByTagName("flag")[0].firstChild.data) archs_or = "(" for arch in archs: @@ -299,5 +303,5 @@ outfile_environment_h.close(); outfile_mktables.write(make_mktables(functions)); outfile_mktables.close(); -outfile_makefile_am.write(make_makefile_am(filearchs, machines)) +outfile_makefile_am.write(make_makefile_am(filearchs, machines, archflags_dict)) outfile_makefile_am.close() |