aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-12-22 21:39:13 +0000
committerFreeArtMan <dos21h@gmail.com>2015-12-22 21:39:13 +0000
commit509c6f05b2ae770b9bee253621fad7be442fac1e (patch)
tree9d6b6205f4db3e22261293dd61c3fbb3b281f105
parent8900b3c75142c9701657f20b307d70f106cc3697 (diff)
downloadradiola-509c6f05b2ae770b9bee253621fad7be442fac1e.tar.gz
radiola-509c6f05b2ae770b9bee253621fad7be442fac1e.zip
Added BSD makefile to compile tests that are compilable
-rw-r--r--Makefile4
-rw-r--r--config.h2
-rw-r--r--test/Makefile.bsd19
3 files changed, 23 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 48e9010..b8a6721 100644
--- a/Makefile
+++ b/Makefile
@@ -39,13 +39,15 @@ kconf2h: tools/kconf2h/kconf2h
$(CC) tools/kconf2h/kconf2h.c tools/kconf2h/kconf2h_parser.o -o tools/kconf2h/kconf2h
menuconfig: kconf2h
- ./mconf Kconfig
+ ./mconf Kconfig
tools/kconf2h/kconf2h .config config/config_linux.h
menuconfig-bsd: kconf2h
./mconf Kconfig
tools/kconf2h/kconf2h .config config/config_bsd.h
+
+
bsd: $(OBJECTS)
$(CC) $(OBJECTS_FINAL) $(PROJECT).c -o $(PROJECT) $(LDFLAGS_BSD)
ld -r $(OBJECTS_FINAL) -o $(PROJECT).o \ No newline at end of file
diff --git a/config.h b/config.h
index df2d1f5..0026d32 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
Default configuration is linux configuration ofc
*/
-#if defined(BSD)
+#if defined(OS_NETBSD)
#include "config/config_bsd.h"
#else
#include "config/config_linux.h"
diff --git a/test/Makefile.bsd b/test/Makefile.bsd
new file mode 100644
index 0000000..0befdba
--- /dev/null
+++ b/test/Makefile.bsd
@@ -0,0 +1,19 @@
+CC=gcc
+CFLAGS=-std=gnu11 -I../
+#LDFLAGS= `pkg-config --libs libusb` -L../../../r820t -lr820t -Wl,-rpath=../../../r820t
+LDFLAGS=`pkg-config --libs libusb` -lrtlsdr -lm ../radiola.o
+SOURCE = get_device_list.c read_samples.c sdr_fm.c ui_tui_waterfall.c
+OBJECTS =
+BIN = $(SOURCE:.c=)
+
+
+%: %.c
+ $(CC) $(LDFLAGS) $(CFLAGS) $< -o $@
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@
+
+make: $(BIN)
+
+clean:
+ rm -f $(BIN)