Building rf as static lib and linking into srslte shared lib

This commit is contained in:
Paul Sutton 2016-04-08 17:06:37 +01:00
parent eb3ed31bb4
commit 14a889bcf9
4 changed files with 6 additions and 10 deletions

View File

@ -246,7 +246,7 @@ int srslte_rf_recv_wrapper(void *h, void *data, uint32_t nsamples, srslte_timest
return srslte_rf_recv(h, data, nsamples, 1);
}
double srslte_rf_set_rx_gain_th_wrapper(void *h, double f) {
double srslte_rf_set_rx_gain_th_wrapper_(void *h, double f) {
return srslte_rf_set_rx_gain_th((srslte_rf_t*) h, f);
}
@ -431,7 +431,7 @@ int main(int argc, char **argv) {
#ifndef DISABLE_RF
if (prog_args.rf_gain < 0) {
srslte_ue_sync_start_agc(&ue_sync, srslte_rf_set_rx_gain_th_wrapper, cell_detect_config.init_agc);
srslte_ue_sync_start_agc(&ue_sync, srslte_rf_set_rx_gain_th_wrapper_, cell_detect_config.init_agc);
}
#endif
#ifdef PRINT_CHANGE_SCHEDULIGN

View File

@ -51,6 +51,7 @@ TARGET_LINK_LIBRARIES(srslte srslte_agc
srslte_resampling
srslte_scrambling
srslte_ue
srslte_rf
pthread)
SET_TARGET_PROPERTIES(srslte PROPERTIES
VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR})

View File

@ -33,10 +33,7 @@ IF(RF_FOUND)
LIST(APPEND SOURCES_RF rf_blade_imp.c)
ENDIF (BLADERF_FOUND)
ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF})
SET_TARGET_PROPERTIES(srslte_rf
PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}
)
ADD_LIBRARY(srslte_rf ${SOURCES_RF})
IF (UHD_FOUND)
TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES})
@ -46,7 +43,4 @@ IF(RF_FOUND)
TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES})
ENDIF (BLADERF_FOUND)
INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_rf)
ENDIF(RF_FOUND)

View File

@ -23,4 +23,5 @@ ADD_LIBRARY(srslte_ue ${SOURCES})
TARGET_LINK_LIBRARIES(srslte_ue srslte_io
srslte_sync
srslte_dft
srslte_ch_estimation)
srslte_ch_estimation
srslte_agc)