Makefile: partial integration of rust build outputs
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 7 Dec 2024 16:56:57 +0000 (22:26 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 7 Dec 2024 16:56:57 +0000 (22:26 +0530)
Makefile

index 9c74803fae39ba7055d7cfe61632b7ea763995e4..d8c3e317a0cd0cb7382c9bd52bcfd6770688ceeb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@ GIT_VERSION := $(shell git describe --abbrev=0 --tags --always)
 # uncomment the line below to include USB Ozy support
 # USBOZY_INCLUDE=USBOZY
 
+RUST_DISCOVERY=ON
+
 # uncomment the line to below include support local CW keyer
 LOCALCW_INCLUDE=LOCALCW
 
@@ -45,6 +47,11 @@ ifeq ($(LEVEL_CTRL),SW_LEVEL_CTRL)
 LEVEL_OPTIONS=-D SW_LEVEL_CTRL
 endif
 
+ifeq ($(RUST_DISCOVERY),ON)
+RUST_DISCOVERY_INCLUDES= # -Irust/discovery/
+RUST_DISCOVERY_LIBS= -Lrust/target/debug/ -lhpsdr_discovery
+endif
+
 ifeq ($(MIDI_INCLUDE),MIDI)
 MIDI_OPTIONS=-D MIDI
 MIDI_HEADERS= midi.h midi_menu.h
@@ -173,8 +180,8 @@ ifeq ($(UNAME_S), Linux)
 RT_OPTION=-lrt
 endif
 
-LIBS=$(RT_OPTION) -lfftw3 -lm -lwdsp -lpthread $(AUDIO_LIBS) $(USBOZY_LIBS) $(GTKLIBS) $(GPIO_LIBS) $(MIDI_LIBS)
-INCLUDES=$(GTKINCLUDES)
+LIBS=$(RT_OPTION) -lfftw3 -lm -lwdsp -lpthread $(AUDIO_LIBS) $(USBOZY_LIBS) $(GTKLIBS) $(GPIO_LIBS) $(MIDI_LIBS) $(RUST_DISCOVERY_LIBS)
+INCLUDES=$(GTKINCLUDES) $(RUST_DISCOVERY_INCLUDES)
 
 COMPILE=$(CC) $(CFLAGS) $(OPTIONS) $(INCLUDES)