diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-01-14 19:58:11 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-01-14 19:58:11 -0500 |
commit | 81c3086bee1752c94a89ab2d20b7de048fdd1be7 (patch) | |
tree | b03d60528ed38368a6b2ad9b4a9944073b3b0841 | |
parent | bb438e7d12c5767123f8abed5810f284a5f18bf8 (diff) |
Cleans up the Makefiles for the various platforms. This should also make it easier to add new architectures. Thanks to Josh for the inspiration.
-rw-r--r-- | volk/Makefile.am | 2 | ||||
-rw-r--r-- | volk/Makefile.common | 30 | ||||
-rw-r--r-- | volk/configure.ac | 9 | ||||
-rw-r--r-- | volk/include/volk/Makefile.am | 26 | ||||
-rw-r--r-- | volk/lib/Makefile.am | 74 |
5 files changed, 40 insertions, 101 deletions
diff --git a/volk/Makefile.am b/volk/Makefile.am index 3521dd0e4e..4c6951ca75 100644 --- a/volk/Makefile.am +++ b/volk/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2004,2008 Free Software Foundation, Inc. +# Copyright 2004,2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # diff --git a/volk/Makefile.common b/volk/Makefile.common index 083f6f7101..daa8d78b6f 100644 --- a/volk/Makefile.common +++ b/volk/Makefile.common @@ -1,6 +1,6 @@ # -*- Makefile -*- # -# Copyright 2010 Free Software Foundation, Inc. +# Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,6 +20,33 @@ # Boston, MA 02110-1301, USA. # +if MD_CPU_generic + platform_CODE = \ + $(top_srcdir)/lib/volk_cpu_generic.c +endif + +if MD_CPU_x86 +if MD_SUBCPU_x86_64 + platform_CODE = \ + $(top_srcdir)/lib/volk_cpu_x86.c \ + $(top_srcdir)/lib/cpuid_x86_64.S +endif +endif + +if MD_CPU_x86 +if !MD_SUBCPU_x86_64 + platform_CODE = \ + $(top_srcdir)/lib/volk_cpu_x86.c \ + $(top_srcdir)/lib/cpuid_x86.S +endif +endif + +if MD_CPU_powerpc + platform_CODE = \ + $(top_srcdir)/lib/volk_cpu_powerpc.c +endif + + ourincludedir = $(includedir)/volk # swig includes @@ -44,3 +71,4 @@ STD_DEFINES_AND_INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib $(GNURADIO # not. We define it now in configure.ac using AM_PATH_PROG, but now # here have to add a -f to be like GNU make. RM=$(RM_PROG) -f + diff --git a/volk/configure.ac b/volk/configure.ac index 8f17e50657..7cbcbad534 100644 --- a/volk/configure.ac +++ b/volk/configure.ac @@ -1,5 +1,5 @@ dnl -dnl Copyright 2010 Free Software Foundation, Inc. +dnl Copyright 2010,2011 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -63,13 +63,6 @@ dnl AX_BOOST_WSERIALIZATION AC_CONFIG_HEADERS([volk_config.h]) LV_SET_SIMD_FLAGS -# FIXME: Not very extensible to supporting more processors easily -AM_CONDITIONAL([MYCPU_X86], [test "$MD_CPU" = "x86"]) -AM_CONDITIONAL([MYSUBCPU_X86], [test "$MD_SUBCPU" = "x86"]) -AM_CONDITIONAL([MYSUBCPU_X86_64], [test "$MD_SUBCPU" = "x86_64"]) -AM_CONDITIONAL([MYSUBCPU_POWERPC], [test "$MD_SUBCPU" = "powerpc"]) -AM_CONDITIONAL([MYSUBCPU_GENERIC], [test "$MD_SUBCPU" != "powerpc" && test "$MD_SUBCPU" != "x86" && test "$MD_SUBCPU" != "x86_64"]) - AC_CONFIG_FILES([\ Makefile \ config/Makefile \ diff --git a/volk/include/volk/Makefile.am b/volk/include/volk/Makefile.am index 04a43bd34b..658974d3a4 100644 --- a/volk/include/volk/Makefile.am +++ b/volk/include/volk/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2010 Free Software Foundation, Inc. +# Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -130,33 +130,11 @@ volkinclude_HEADERS = \ volk_8s_convert_32f_unaligned16.h VOLK_MKTABLES_SOURCES = \ + $(platform_CODE) \ $(top_srcdir)/lib/volk_rank_archs.c \ $(top_srcdir)/lib/volk_mktables.c -# FIXME: Not very extensible to supporting more processors easily -if MYSUBCPU_X86_64 - VOLK_MKTABLES_SOURCES += \ - $(top_srcdir)/lib/volk_cpu_x86.c \ - $(top_srcdir)/lib/cpuid_x86_64.S -endif - -if MYSUBCPU_X86 - VOLK_MKTABLES_SOURCES += \ - $(top_srcdir)/lib/volk_cpu_x86.c \ - $(top_srcdir)/lib/cpuid_x86.S -endif - -if MYSUBCPU_POWERPC - VOLK_MKTABLES_SOURCES += \ - $(top_srcdir)/lib/volk_cpu_powerpc.c -endif - -if MYSUBCPU_GENERIC - VOLK_MKTABLES_SOURCES += \ - $(top_srcdir)/lib/volk_cpu_generic.c -endif - volk_mktables$(EXEEXT): $(VOLK_MKTABLES_SOURCES) $(CC) -o $@ $^ $(AM_CPPFLAGS) -I$(top_builddir)/include diff --git a/volk/lib/Makefile.am b/volk/lib/Makefile.am index 814d438fd4..896d568e6c 100644 --- a/volk/lib/Makefile.am +++ b/volk/lib/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2010 Free Software Foundation, Inc. +# Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -61,77 +61,17 @@ EXTRA_DIST = \ # The main library # ---------------------------------------------------------------- -universal_runtime_CODE = \ - volk_runtime.c \ - volk_init.c \ +libvolk_runtime_la_SOURCES = \ + $(platform_CODE) \ + volk_runtime.c \ + volk_init.c \ volk_rank_archs.c -universal_CODE = \ +libvolk_la_SOURCES = \ + $(platform_CODE) \ volk.c \ volk_environment_init.c -generic_CODE = \ - volk_cpu_generic.c - -x86_CODE = \ - volk_cpu_x86.c - -x86_SUBCODE = \ - cpuid_x86.S - -x86_64_SUBCODE = \ - cpuid_x86_64.S - -powerpc_CODE = \ - volk_cpu_powerpc.c - - -if MD_CPU_generic -libvolk_la_SOURCES = \ - $(generic_CODE) \ - $(universal_CODE) -libvolk_runtime_la_SOURCES = \ - $(generic_CODE) \ - $(universal_runtime_CODE) - -endif - -if MD_CPU_x86 -if MD_SUBCPU_x86_64 -libvolk_la_SOURCES = \ - $(x86_CODE) \ - $(x86_64_SUBCODE) \ - $(universal_CODE) - -libvolk_runtime_la_SOURCES = \ - $(x86_CODE) \ - $(x86_64_SUBCODE) \ - $(universal_runtime_CODE) -else -libvolk_la_SOURCES = \ - $(x86_CODE) \ - $(x86_SUBCODE) \ - $(universal_CODE) - -libvolk_runtime_la_SOURCES = \ - $(x86_CODE) \ - $(x86_SUBCODE) \ - $(universal_runtime_CODE) -endif -endif - - -if MD_CPU_powerpc -libvolk_la_SOURCES = \ - $(powerpc_CODE) \ - $(universal_CODE) - -libvolk_runtime_la_SOURCES = \ - $(powerpc_CODE) \ - $(universal_runtime_CODE) -endif - - libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 |