diff options
author | Nick Foster | 2011-04-13 18:32:28 -0700 |
---|---|---|
committer | Nick Foster | 2011-04-13 18:32:28 -0700 |
commit | 5fffe801f95f2ef8bddf51aea8ed260eae0bf7b8 (patch) | |
tree | 86cd85abd400a4c18473f09e96dfd33e5986caa6 | |
parent | 9b7d444aaebbe0708e9703bce30c63b63bc81825 (diff) | |
download | gnuradio-5fffe801f95f2ef8bddf51aea8ed260eae0bf7b8.tar.gz gnuradio-5fffe801f95f2ef8bddf51aea8ed260eae0bf7b8.tar.bz2 gnuradio-5fffe801f95f2ef8bddf51aea8ed260eae0bf7b8.zip |
Volk: make_makefile_am.py changes to generate cflags, ldflags. no conditional linking yet.
-rw-r--r-- | volk/include/volk/make_makefile_am.py | 19 | ||||
-rwxr-xr-x | volk/include/volk/volk_register.py | 8 | ||||
-rw-r--r-- | volk/lib/Makefile.am | 99 |
3 files changed, 21 insertions, 105 deletions
diff --git a/volk/include/volk/make_makefile_am.py b/volk/include/volk/make_makefile_am.py index 89ea1f4b6..c44fe11af 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 d5a4a968f..10610dcfe 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() diff --git a/volk/lib/Makefile.am b/volk/lib/Makefile.am deleted file mode 100644 index b032eefe6..000000000 --- a/volk/lib/Makefile.am +++ /dev/null @@ -1,99 +0,0 @@ - -# This file is automatically generated by make_makefile_am.py. -# Do not edit this file. - -include $(top_srcdir)/Makefile.common - -#FIXME: forcing the top_builddir for distcheck seems like a bit -# of a hack. Figure out the right way to do this to find built -# volk_config.h and volk_tables.h - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) \ - -I$(top_builddir)/include \ - $(WITH_INCLUDES) - -lib_LTLIBRARIES = \ - libvolk.la \ - libvolk_runtime.la - -EXTRA_DIST = \ - volk_mktables.c \ - volk_rank_archs.h \ - volk_proccpu_sim.c \ - gcc_x86_cpuid.h - -# ---------------------------------------------------------------- -# The main library -# ---------------------------------------------------------------- - -libvolk_runtime_la_SOURCES = \ - $(platform_CODE) \ - volk_runtime.c \ - volk_rank_archs.c \ - volk_cpu.c - -libvolk_la_SOURCES = \ - $(platform_CODE) \ - volk.c \ - volk_environment_init.c - -volk_orc_LDFLAGS = \ - $(ORC_LDFLAGS) \ - -lorc-0.4 - -volk_orc_LIBADD = \ - ../orc/libvolk_orc.la - - -if LV_HAVE_ORC -libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(volk_orc_LDFLAGS) -libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(volk_orc_LDFLAGS) -libvolk_la_LIBADD = $(volk_orc_LIBADD) -else -libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -libvolk_la_LIBADD = -endif - - -# ---------------------------------------------------------------- -# The QA library. Note libvolk.la in LIBADD -# ---------------------------------------------------------------- -#libvolk_qa_la_SOURCES = # qa_utils.cc - -#libvolk_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -lboost - -#libvolk_qa_la_LIBADD = # libvolk.la # libvolk_runtime.la - -# ---------------------------------------------------------------- -# headers that don't get installed -# ---------------------------------------------------------------- -noinst_HEADERS = volk_init.h qa_utils.h - -# ---------------------------------------------------------------- -# Our test program -# ---------------------------------------------------------------- -noinst_PROGRAMS = testqa - -testqa_SOURCES = testqa.cc qa_utils.cc -testqa_CPPFLAGS = -DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN $(AM_CPPFLAGS) \ - $(BOOST_CPPFLAGS) -testqa_LDFLAGS = $(BOOST_LDFLAGS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) -if LV_HAVE_ORC -testqa_LDADD = libvolk.la libvolk_runtime.la ../orc/libvolk_orc.la -else -testqa_LDADD = libvolk.la -endif - -distclean-local: - rm -f volk.c - rm -f volk_cpu_generic.c - rm -f volk_cpu_powerpc.c - rm -f volk_cpu_x86.c - rm -f volk_init.c - rm -f volk_init.h - rm -f volk_mktables.c - rm -f volk_proccpu_sim.c - rm -f volk_runtime.c - rm -f volk_tables.h - rm -f volk_environment_init.c |