Further *BSD portability.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5958 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-23 23:51:34 +00:00
parent 2d06b4114b
commit 949b873dc8
16 changed files with 50 additions and 126 deletions

View File

@ -5,9 +5,7 @@
#define SDL_JOYSTICK_USBHID 1
#ifdef __FreeBSD__
#define HAVE_USBHID_H
#endif
#define HAVE_USBHID_H 1
#define USBHID_NEW
#define USBHID_UCR_DATA

View File

@ -49,7 +49,8 @@
// MacOS
#define SFML_SYSTEM_MACOS
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(__OpenBSD__)
// FreeBSD
#define SFML_SYSTEM_FREEBSD

View File

@ -1,85 +0,0 @@
#
# wiiuse Makefile
#
#
# Change this to your GCC version.
#
CC = gcc
####################################################
#
# You should not need to edit below this line.
#
####################################################
#
# Universal cflags
#
CFLAGS = -Wall -pipe -fPIC -funroll-loops
ifeq ($(debug),1)
OBJ_PREFIX = debug
CFLAGS += -g -pg -DWITH_WIIUSE_DEBUG
else
OBJ_PREFIX = release
CFLAGS += -O2
endif
OBJ_DIR = $(OBJ_PREFIX)-$(shell $(CC) -v 2>&1|grep ^Target:|cut -d' ' -f2)
#
# Linking flags
#
LDFLAGS = -shared -lm -lbluetooth
#
# Target binaries (always created as BIN)
#
BIN = ./$(OBJ_DIR)/libwiiuse.so
#
# Inclusion paths.
#
INCLUDES = -I.
#
# Generate a list of object files
#
OBJS = \
$(OBJ_DIR)/io_nix.o \
$(OBJ_DIR)/ir.o \
$(OBJ_DIR)/wiiuse.o
###############################
#
# Build targets.
#
###############################
all: $(BIN)
clean:
@-rm $(OBJS) 2> /dev/null
distclean:
@-rm -r debug-* release-* 2> /dev/null
install:
@if [ -e $(BIN) ]; then \
cp -v $(BIN) /usr/lib ; \
fi
@cp -v wiiuse.h /usr/include
$(BIN): mkdir $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(BIN)
$(OBJ_DIR)/%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
mkdir:
@if [ ! -d $(OBJ_DIR) ]; then \
mkdir $(OBJ_DIR); \
fi