From 941244ce264c3dfc53fecd499efb4b3d445eefd5 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 2 Jun 2007 02:07:45 +0000 Subject: [PATCH] Fix so can without BT, and so compiler can be specified to Makefile. --- linux/Makefile | 13 +++++++++++-- linux/linuxmain.c | 8 +++++--- linux/main.h | 4 +++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index e2645a6b5..2d7e61c5d 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -47,7 +47,11 @@ DEFINES += $(DO_CURSES) $(DO_GTK) TARGET=$(PLATFORM)/xwords +ifdef BUILD_COMMAND +CC = ${BUILD_COMMAND} +else CC = gcc +endif include ../common/config.mk @@ -60,8 +64,9 @@ DEFINES += -DFEATURE_TRAY_EDIT #DEFINES += -DDRAW_WITH_PRIMITIVES # Bluetooth support +BLUETOOTH = -DXWFEATURE_BLUETOOTH # DEFINES += -DXWFEATURE_IR -DEFINES += -DXWFEATURE_BLUETOOTH +DEFINES += ${BLUETOOTH} DEFINES += -DXWFEATURE_RELAY # Let users pick the tiles going into their trays @@ -75,6 +80,7 @@ DEFINES += -DPERIMETER_FOCUS #GPROFFLAG = -pg # INCLUDES += -I/usr/lib/glib/include +INCLUDES += ${EXTRAINCS} OBJ = $(PLATFORM)/linuxmain.o \ $(PLATFORM)/linuxdict.o \ @@ -95,7 +101,10 @@ OBJ = $(PLATFORM)/linuxmain.o \ # $(PLATFORM)/linuxcommpipe.o \ -LIBS = -pthread -lm -lmcheck -lbluetooth -L $(HOME)/usr/local/pilot/lib $(GPROFFLAG) +LIBS = -pthread -lm -lmcheck -L $(HOME)/usr/local/pilot/lib $(GPROFFLAG) +ifdef BLUETOOTH +LIBS += -lbluetooth +endif ifneq (,$(findstring DPLATFORM_GTK,$(DEFINES))) LIBS += `pkg-config --libs gtk+-2.0` diff --git a/linux/linuxmain.c b/linux/linuxmain.c index 5bde4e54e..0d155d62a 100644 --- a/linux/linuxmain.c +++ b/linux/linuxmain.c @@ -31,9 +31,11 @@ #include #include -#include -#include -#include +#ifdef XWFEATURE_BLUETOOTH +# include +# include +# include +#endif #include diff --git a/linux/main.h b/linux/main.h index 975c8f4ab..342f6b93b 100644 --- a/linux/main.h +++ b/linux/main.h @@ -21,7 +21,9 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#include /* for bdaddr_t, which should move */ +#ifdef XWFEATURE_BLUETOOTH +# include /* for bdaddr_t, which should move */ +#endif #include "comtypes.h" #include "util.h"