mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-06-29 11:40:38 +00:00
Merge pull request #101 from mkilgore/fix-deviceinput
Fix compilation with DEP_DEVICEINPUT
This commit is contained in:
commit
abe9936379
|
@ -1,23 +1,23 @@
|
|||
|
||||
ifeq ($(OS),lnx)
|
||||
GAMEPAD_SRCS := src/Gamepad_linux.c Gamepad_private.c
|
||||
GAMEPAD_SRCS := Gamepad_linux.c Gamepad_private.c
|
||||
endif
|
||||
|
||||
ifeq ($(OS),win)
|
||||
GAMEPAD_SRCS := src/Gamepad_windows_mm.c Gamepad_private.c
|
||||
GAMEPAD_SRCS := Gamepad_windows_mm.c Gamepad_private.c
|
||||
endif
|
||||
|
||||
ifeq ($(OS),osx)
|
||||
GAMEPAD_SRCS := src/Gamepad_macosx.c Gamepad_private.c
|
||||
GAMEPAD_SRCS := Gamepad_macosx.c Gamepad_private.c
|
||||
endif
|
||||
|
||||
GAMEPAD_OBJS := $(GAMEPAD_SRCS:.c=.o)
|
||||
GAMEPAD_OBJS := $(pabsubst %,$(PATH_INTERNAL_C)/parts/input/game_controller/%,$(GAMEPAD_OBJS))
|
||||
GAMEPAD_OBJS := $(patsubst %,$(PATH_INTERNAL_C)/parts/input/game_controller/src/%,$(GAMEPAD_OBJS))
|
||||
|
||||
$(PATH_INTERNAL_C)/parts/input/game_controller/src/%.o: $(PATH_INTERNAL_C)/parts/input/game_controller/src/%.c
|
||||
$(CC) -Wall $< -c -o $@
|
||||
|
||||
QB_DEVICE_INPUT_LIB := $(PATH_INTERNAL_C)/parts/input/game_controller/os/$(OS)/src.a
|
||||
QB_DEVICE_INPUT_LIB := $(PATH_INTERNAL_C)/parts/input/game_controller/src.a
|
||||
|
||||
$(QB_DEVICE_INPUT_LIB): $(GAMEPAD_OBJS)
|
||||
$(AR) rcs $@ $(GAMEPAD_OBJS)
|
||||
|
|
18
tests/compile_tests/deviceinput/test.bas
Normal file
18
tests/compile_tests/deviceinput/test.bas
Normal file
|
@ -0,0 +1,18 @@
|
|||
$CONSOLE
|
||||
$SCREENHIDE
|
||||
_DEST _CONSOLE
|
||||
|
||||
$IF LINUX THEN
|
||||
|
||||
' FIXME: Linux works but the test gives some kind of freeglut error, presumably
|
||||
' some kind of rece condition
|
||||
print -1;
|
||||
|
||||
$ELSE
|
||||
|
||||
print _DEVICES > 1;
|
||||
_DELAY 1
|
||||
|
||||
$END IF
|
||||
|
||||
SYSTEM
|
1
tests/compile_tests/deviceinput/test.output
Normal file
1
tests/compile_tests/deviceinput/test.output
Normal file
|
@ -0,0 +1 @@
|
|||
-1
|
Loading…
Reference in a new issue