mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-06 10:47:35 +01:00
build rtl_fm
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
6328e11da6
commit
fc390b3224
@ -36,6 +36,9 @@ dnl checks for required libraries
|
||||
dnl pthreads
|
||||
AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"])
|
||||
|
||||
dnl libmath (for rtl_fm)
|
||||
AC_CHECK_LIB(m, atan2, [LIBS="$LIBS -lm"])
|
||||
|
||||
# The following test is taken from WebKit's webkit.m4
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden "
|
||||
|
@ -36,6 +36,10 @@ set_target_properties(rtlsdr_shared PROPERTIES DEFINE_SYMBOL "rtlsdr_EXPORTS")
|
||||
set_target_properties(rtlsdr_shared PROPERTIES OUTPUT_NAME rtlsdr)
|
||||
set_target_properties(rtlsdr_shared PROPERTIES SOVERSION 0 VERSION 0.0.0)
|
||||
|
||||
if(UNIX)
|
||||
link_libraries(m)
|
||||
endif(UNIX)
|
||||
|
||||
add_library(rtlsdr_static STATIC
|
||||
librtlsdr.c
|
||||
tuner_e4k.c
|
||||
@ -67,6 +71,8 @@ endif()
|
||||
add_executable(rtl_sdr rtl_sdr.c)
|
||||
add_executable(rtl_tcp rtl_tcp.c)
|
||||
add_executable(rtl_test rtl_test.c)
|
||||
add_executable(rtl_fm rtl_fm.c)
|
||||
|
||||
target_link_libraries(rtl_sdr rtlsdr_shared
|
||||
${LIBUSB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
@ -79,14 +85,20 @@ target_link_libraries(rtl_test rtlsdr_shared
|
||||
${LIBUSB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
target_link_libraries(rtl_fm rtlsdr_shared
|
||||
${LIBUSB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(rtl_sdr libgetopt_static)
|
||||
target_link_libraries(rtl_tcp libgetopt_static)
|
||||
target_link_libraries(rtl_test libgetopt_static)
|
||||
target_link_libraries(rtl_fm libgetopt_static)
|
||||
set_property(TARGET rtl_sdr APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
|
||||
set_property(TARGET rtl_tcp APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
|
||||
set_property(TARGET rtl_test APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
|
||||
set_property(TARGET rtl_fm APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
|
||||
endif()
|
||||
########################################################################
|
||||
# Install built library files & utilities
|
||||
|
@ -10,7 +10,7 @@ lib_LTLIBRARIES = librtlsdr.la
|
||||
librtlsdr_la_SOURCES = librtlsdr.c tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c
|
||||
librtlsdr_la_LDFLAGS = -version-info $(LIBVERSION)
|
||||
|
||||
bin_PROGRAMS = rtl_sdr rtl_tcp rtl_test
|
||||
bin_PROGRAMS = rtl_sdr rtl_tcp rtl_test rtl_fm
|
||||
|
||||
rtl_sdr_SOURCES = rtl_sdr.c
|
||||
rtl_sdr_LDADD = librtlsdr.la
|
||||
@ -20,3 +20,6 @@ rtl_tcp_LDADD = librtlsdr.la
|
||||
|
||||
rtl_test_SOURCES = rtl_test.c
|
||||
rtl_test_LDADD = librtlsdr.la
|
||||
|
||||
rtl_fm_SOURCES = rtl_fm.c
|
||||
rtl_fm_LDADD = librtlsdr.la $(LIBM)
|
||||
|
Loading…
Reference in New Issue
Block a user