diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-12-21 18:32:50 +0000 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-12-21 18:32:50 +0000 |
commit | 8900b3c75142c9701657f20b307d70f106cc3697 (patch) | |
tree | 2163fb380a5f66ebe2962a7dd99ee546419bb3d4 | |
parent | 9381ae971066a42ad00def424c29370ced09eb60 (diff) | |
download | radiola-8900b3c75142c9701657f20b307d70f106cc3697.tar.gz radiola-8900b3c75142c9701657f20b307d70f106cc3697.zip |
Add NetBSD support files and config_bsd.h to be compatible with NetBSD
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | config/config_bsd.h | 1 | ||||
-rw-r--r-- | draw/glui.c | 6 | ||||
-rw-r--r-- | draw/glui.h | 5 | ||||
-rw-r--r-- | draw/make.mk | 1 | ||||
-rw-r--r-- | filt/make.mk | 1 | ||||
-rw-r--r-- | hw/aud.c | 2 | ||||
-rw-r--r-- | hw/aud.h | 5 | ||||
-rw-r--r-- | hw/make.mk | 1 | ||||
-rw-r--r-- | mod/make.mk | 1 |
10 files changed, 26 insertions, 6 deletions
@@ -2,6 +2,7 @@ PROJECT=radiola CC=gcc CFLAGS= LDFLAGS= +LDFLAGS_BSD= CLEAN= BUILD_DIR=build/ @@ -41,6 +42,10 @@ menuconfig: kconf2h ./mconf Kconfig tools/kconf2h/kconf2h .config config/config_linux.h -bsd: kconf2h +menuconfig-bsd: kconf2h ./mconf Kconfig - tools/kconf2h/kconf2h .config config/config_bsd.h
\ No newline at end of file + 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/config_bsd.h b/config/config_bsd.h index 95985f1..a54486f 100644 --- a/config/config_bsd.h +++ b/config/config_bsd.h @@ -3,7 +3,6 @@ #define CONFIG_CORE #define CONFIG_OS_NETBSD #define CONFIG_DRAW -#define CONFIG_TUI #define CONFIG_HW #define CONFIG_HW_LIB_ORIG #define CONFIG_HW_NO_AUDIO diff --git a/draw/glui.c b/draw/glui.c index db9837a..e056324 100644 --- a/draw/glui.c +++ b/draw/glui.c @@ -1,5 +1,7 @@ #include "glui.h" +#if defined(OS_LINUX) + #define DEFAULT_TITLE "RADIOLA" #define SCREEN_X 1024 #define SCREEN_Y 480 @@ -167,4 +169,6 @@ int glui_close( glui_t *t ) return ret; -}
\ No newline at end of file +} + +#endif
\ No newline at end of file diff --git a/draw/glui.h b/draw/glui.h index 0b9f6f3..17c49da 100644 --- a/draw/glui.h +++ b/draw/glui.h @@ -1,5 +1,6 @@ #ifndef __RADIOLA_GLUI_H #define __RADIOLA_GLUI_H +#include "../config.h" #include <stdio.h> #include <stdint.h> @@ -8,6 +9,8 @@ #include <termios.h> #include <unistd.h> +#if defined(OS_LINUX) + #include <SDL2/SDL.h> //to draw waterfall @@ -56,5 +59,5 @@ int glui_waterfall_data( glui_t *w, int len, uint8_t *buf ); glui_color_t glui_waterfall_color( uint8_t d ); //close terminal ui int glui_close( glui_t *t ); - +#endif #endif
\ No newline at end of file diff --git a/draw/make.mk b/draw/make.mk index 1c60780..a626ca6 100644 --- a/draw/make.mk +++ b/draw/make.mk @@ -2,6 +2,7 @@ DIR_DRAW = draw/ SOURCES_DRAW += draw/glui.c draw/tui.c draw/ui.c OBJECTS_DRAW += $(SOURCES_DRAW:.c=.o) LDFLAGS += -lGL `sdl2-config --cflags --libs` +LDFLAGS_BSD += OBJECTS_DIR_DRAW += $(subst $(DIR_DRAW),$(BUILD_DIR)$(DIR_DRAW),$(OBJECTS_DRAW)) diff --git a/filt/make.mk b/filt/make.mk index e65653c..bde2fe3 100644 --- a/filt/make.mk +++ b/filt/make.mk @@ -2,6 +2,7 @@ DIR_FILT = filt/ SOURCES_FILT += filt/f_5th.c OBJECTS_FILT += $(SOURCES_FILT:.c=.o) LDFLAGS += +LDFLAGS_BSD += OBJECTS_DIR_FILT += $(subst $(DIR_FILT),$(BUILD_DIR)$(DIR_FILT),$(OBJECTS_FILT)) @@ -1,5 +1,6 @@ #include "aud.h" +#if defined(OS_LINUX) //harc-copy from aplay.c static void device_list(void) int audio_get_devices() { @@ -73,3 +74,4 @@ int audio_get_devices() } return 0; } +#endif @@ -1,11 +1,14 @@ #ifndef __RADIOLA_AUD_H #define __RADIOLA_AUD_H +#include "../config.h" #include <stdio.h> #include <stdlib.h> #include <stdint.h> -#include <alsa/asoundlib.h> +#if defined(OS_LINUX) +#include <alsa/asoundlib.h> +#endif int audio_get_devices(); #endif
\ No newline at end of file @@ -2,6 +2,7 @@ DIR_HW = hw/ SOURCES_HW += hw/aud.c hw/hw.c hw/hw_eeprom.c hw/sdr.c OBJECTS_HW += $(SOURCES_HW:.c=.o) LDFLAGS += -lrtlsdr -lasound +LDFLAGS_BSD += -lrtlsdr OBJECTS_DIR_HW += $(subst $(DIR_HW),$(BUILD_DIR)$(DIR_HW),$(OBJECTS_HW)) diff --git a/mod/make.mk b/mod/make.mk index 6093819..e6b13f9 100644 --- a/mod/make.mk +++ b/mod/make.mk @@ -2,6 +2,7 @@ DIR_MOD = mod/ SOURCES_MOD += mod/mod_fm.c OBJECTS_MOD += $(SOURCES_MOD:.c=.o) LDFLAGS += +LDFLAGS_BSD += OBJECTS_DIR_MOD += $(subst $(DIR_MOD),$(BUILD_DIR)$(DIR_MOD),$(OBJECTS_MOD)) |