From 09f7ccd56ad81d988ca0319f61afe5c4eeeedef4 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Fri, 5 Aug 2022 10:15:54 +0200
Subject: [PATCH] Added "bootloader" compilation

---
 Makefile | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c184b0b..966a898 100644
--- a/Makefile
+++ b/Makefile
@@ -518,7 +518,7 @@ cppcheck:
 .PHONY:	clean
 clean:
 	-rm -f *.o
-	-rm -f $(PROGRAM) hpsdrsim
+	-rm -f $(PROGRAM) hpsdrsim bootloader
 	-rm -rf $(PROGRAM).app
 
 #
@@ -575,6 +575,19 @@ newhpsdrsim.o:	newhpsdrsim.c hpsdrsim.h
 hpsdrsim:       hpsdrsim.o newhpsdrsim.o
 	$(LINK) -o hpsdrsim hpsdrsim.o newhpsdrsim.o -lm -lpthread
 
+#############################################################################
+#
+# bootloader is a small command-line program that allows to 
+# set the radio's IP address and upload firmware through the
+# ancient protocol. This program can only be run as root since
+# this protocol requires "sniffing" at the Ethernet adapter
+# (this "sniffing" is done via the pcap library)
+#
+#############################################################################
+
+bootloader:	bootloader.c
+	$(CC) -o bootloader bootloader.c -lpcap
+
 debian:
 	cp $(PROGRAM) pkg/pihpsdr/usr/local/bin
 	cp /usr/local/lib/libwdsp.so pkg/pihpsdr/usr/local/lib
-- 
2.45.2