Fix so can without BT, and so compiler can be specified to Makefile.

This commit is contained in:
ehouse 2007-06-02 02:07:45 +00:00
parent 92f3f87543
commit 941244ce26
3 changed files with 19 additions and 6 deletions

View file

@ -47,7 +47,11 @@ DEFINES += $(DO_CURSES) $(DO_GTK)
TARGET=$(PLATFORM)/xwords TARGET=$(PLATFORM)/xwords
ifdef BUILD_COMMAND
CC = ${BUILD_COMMAND}
else
CC = gcc CC = gcc
endif
include ../common/config.mk include ../common/config.mk
@ -60,8 +64,9 @@ DEFINES += -DFEATURE_TRAY_EDIT
#DEFINES += -DDRAW_WITH_PRIMITIVES #DEFINES += -DDRAW_WITH_PRIMITIVES
# Bluetooth support # Bluetooth support
BLUETOOTH = -DXWFEATURE_BLUETOOTH
# DEFINES += -DXWFEATURE_IR # DEFINES += -DXWFEATURE_IR
DEFINES += -DXWFEATURE_BLUETOOTH DEFINES += ${BLUETOOTH}
DEFINES += -DXWFEATURE_RELAY DEFINES += -DXWFEATURE_RELAY
# Let users pick the tiles going into their trays # Let users pick the tiles going into their trays
@ -75,6 +80,7 @@ DEFINES += -DPERIMETER_FOCUS
#GPROFFLAG = -pg #GPROFFLAG = -pg
# INCLUDES += -I/usr/lib/glib/include # INCLUDES += -I/usr/lib/glib/include
INCLUDES += ${EXTRAINCS}
OBJ = $(PLATFORM)/linuxmain.o \ OBJ = $(PLATFORM)/linuxmain.o \
$(PLATFORM)/linuxdict.o \ $(PLATFORM)/linuxdict.o \
@ -95,7 +101,10 @@ OBJ = $(PLATFORM)/linuxmain.o \
# $(PLATFORM)/linuxcommpipe.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))) ifneq (,$(findstring DPLATFORM_GTK,$(DEFINES)))
LIBS += `pkg-config --libs gtk+-2.0` LIBS += `pkg-config --libs gtk+-2.0`

View file

@ -31,9 +31,11 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <time.h> #include <time.h>
#include <bluetooth/bluetooth.h> #ifdef XWFEATURE_BLUETOOTH
#include <bluetooth/hci.h> # include <bluetooth/bluetooth.h>
#include <bluetooth/hci_lib.h> # include <bluetooth/hci.h>
# include <bluetooth/hci_lib.h>
#endif
#include <pthread.h> #include <pthread.h>

View file

@ -21,7 +21,9 @@
#ifndef _MAIN_H_ #ifndef _MAIN_H_
#define _MAIN_H_ #define _MAIN_H_
#include <bluetooth/bluetooth.h> /* for bdaddr_t, which should move */ #ifdef XWFEATURE_BLUETOOTH
# include <bluetooth/bluetooth.h> /* for bdaddr_t, which should move */
#endif
#include "comtypes.h" #include "comtypes.h"
#include "util.h" #include "util.h"