diff options
-rw-r--r-- | mpm/python/CMakeLists.txt | 5 | ||||
-rw-r--r-- | mpm/python/pyusrp_periphs/converters.hpp (renamed from mpm/python/converters.hpp) | 0 | ||||
-rw-r--r-- | mpm/python/pyusrp_periphs/n3xx/pyusrp_periphs.cpp (renamed from mpm/python/pyusrp_periphs.cpp) | 14 |
3 files changed, 5 insertions, 14 deletions
diff --git a/mpm/python/CMakeLists.txt b/mpm/python/CMakeLists.txt index 2fd71b744..697c597dd 100644 --- a/mpm/python/CMakeLists.txt +++ b/mpm/python/CMakeLists.txt @@ -8,7 +8,10 @@ # This file included, use CMake directory variables ######################################################################## -ADD_LIBRARY(pyusrp_periphs SHARED pyusrp_periphs.cpp) +if(MPM_DEVICE STREQUAL "n3xx") + ADD_LIBRARY(pyusrp_periphs SHARED pyusrp_periphs/n3xx/pyusrp_periphs.cpp) +endif(MPM_DEVICE STREQUAL "n3xx") + TARGET_INCLUDE_DIRECTORIES(pyusrp_periphs PUBLIC ${PYTHON_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/lib/ diff --git a/mpm/python/converters.hpp b/mpm/python/pyusrp_periphs/converters.hpp index ede9507a9..ede9507a9 100644 --- a/mpm/python/converters.hpp +++ b/mpm/python/pyusrp_periphs/converters.hpp diff --git a/mpm/python/pyusrp_periphs.cpp b/mpm/python/pyusrp_periphs/n3xx/pyusrp_periphs.cpp index feb7c2bad..048ca6a44 100644 --- a/mpm/python/pyusrp_periphs.cpp +++ b/mpm/python/pyusrp_periphs/n3xx/pyusrp_periphs.cpp @@ -6,7 +6,6 @@ // include hackery to only include boost python and define the macro here #include <boost/python.hpp> -#include <config.h> #define LIBMPM_PYTHON #define LIBMPM_BOOST_PREAMBLE(module) \ /* Register submodule types */ \ @@ -42,19 +41,12 @@ private: }; //#include "types.hpp" -#include "converters.hpp" +#include "../converters.hpp" #include <mpm/xbar_iface.hpp> #include <mpm/types/types_python.hpp> #include <mpm/spi/spi_python.hpp> - -#ifdef ENABLE_MYKONOS #include <mpm/ad937x/ad937x_ctrl.hpp> -#endif - -#ifdef ENABLE_MAGNESIUM #include <mpm/dboards/magnesium_manager.hpp> -#endif - #include <boost/noncopyable.hpp> namespace bp = boost::python; @@ -66,11 +58,7 @@ BOOST_PYTHON_MODULE(libpyusrp_periphs) export_converter(); export_types(); export_spi(); -#ifdef ENABLE_MYKONOS export_mykonos(); -#endif export_xbar(); -#ifdef ENABLE_MAGNESIUM export_magnesium(); -#endif } |