Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
156 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#--------------------------------------------------------------------------------- | ||
# Clear the implicit built in rules | ||
#--------------------------------------------------------------------------------- | ||
.SUFFIXES: | ||
#--------------------------------------------------------------------------------- | ||
|
||
ifeq ($(strip $(PSL1GHT)),) | ||
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>") | ||
endif | ||
|
||
include $(PSL1GHT)/ppu_rules | ||
|
||
#--------------------------------------------------------------------------------- | ||
BUILD := build | ||
|
||
#--------------------------------------------------------------------------------- | ||
ifeq ($(strip $(PLATFORM)),) | ||
#--------------------------------------------------------------------------------- | ||
export BASEDIR := $(CURDIR) | ||
export DEPS := $(BASEDIR)/deps | ||
export LIBS := $(BASEDIR)/lib | ||
|
||
#--------------------------------------------------------------------------------- | ||
else | ||
#--------------------------------------------------------------------------------- | ||
export LIBDIR := $(LIBS)/$(PLATFORM) | ||
export DEPSDIR := $(DEPS)/$(PLATFORM) | ||
|
||
#--------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------- | ||
|
||
LIBRARY := $(LIBDIR)/libmove | ||
|
||
#--------------------------------------------------------------------------------- | ||
DEFINCS := -I$(PORTLIBS)/include/freetype2 -I$(PORTLIBS)/include/ -I$(PORTLIBS)/include/libmove -I$(PORTLIBS)/include/ -I$(PSL1GHT)/ppu/include -I$(PSL1GHT)/ppu/include/rsx -I$(PSL1GHT)/ppu/include/lv2 -I$(PSL1GHT)/ppu/include/sys -I$(CURDIR) | ||
INCLUDES := $(DEFINCS) | ||
|
||
CFLAGS := -O2 -mregnames -Wall -mcpu=cell $(MACHDEP) $(INCLUDES) -Wl,-mcell | ||
CXXFLAGS := $(CFLAGS) | ||
|
||
#--------------------------------------------------------------------------------- | ||
VPATH := $(BASEDIR) | ||
|
||
#--------------------------------------------------------------------------------- | ||
OBJS := libmove.o moveutil.o spursutil.o | ||
|
||
#--------------------------------------------------------------------------------- | ||
all: install-headers ppu install | ||
#--------------------------------------------------------------------------------- | ||
|
||
|
||
#--------------------------------------------------------------------------------- | ||
install-headers: | ||
#--------------------------------------------------------------------------------- | ||
@[ -d $(PORTLIBS) ] || mkdir -p $(PORTLIBS) | ||
@[ ! -d $(PORTLIBS)/include/libmove ] || rm -rf $(PORTLIBS)/include/libmove | ||
@cp -frv libmove $(PORTLIBS)/include/libmove | ||
|
||
#--------------------------------------------------------------------------------- | ||
ppu: | ||
#--------------------------------------------------------------------------------- | ||
@[ -d $(LIBS)/ppu ] || mkdir -p $(LIBS)/ppu | ||
@[ -d $(DEPS)/ppu ] || mkdir -p $(DEPS)/ppu | ||
@[ -d ppu ] || mkdir -p ppu | ||
@$(MAKE) PLATFORM=ppu lib -C ppu -f $(CURDIR)/Makefile | ||
|
||
#--------------------------------------------------------------------------------- | ||
install: | ||
#--------------------------------------------------------------------------------- | ||
@[ -d $(PORTLIBS)/lib ] || mkdir -p $(PORTLIBS)/lib | ||
@cp -frv $(CURDIR)/lib/ppu/*.a $(PORTLIBS)/lib | ||
|
||
#--------------------------------------------------------------------------------- | ||
$(LIBRARY).a: $(OBJS) | ||
#--------------------------------------------------------------------------------- | ||
|
||
.PHONY: lib ppu | ||
|
||
#--------------------------------------------------------------------------------- | ||
lib: $(LIBRARY).a | ||
#--------------------------------------------------------------------------------- | ||
|
||
#--------------------------------------------------------------------------------- | ||
clean: | ||
#--------------------------------------------------------------------------------- | ||
@echo lib cleaned ... | ||
@rm -rf ppu | ||
@rm -rf $(DEPS) | ||
@rm -rf $(LIBS) | ||
|
||
#--------------------------------------------------------------------------------- | ||
-include $(DEPSDIR)/*.d | ||
#--------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
libmove for PSL1GHT V2 | ||
====================== | ||
|
||
This lib will be installed inside the PORTLIBS | ||
|
||
Authors | ||
------- | ||
* deroad - libmove.cpp/.h movebuttons.h | ||
* José Ramos Márquez (bigboss) - moveutil.cpp/.h spursutil.cpp/.h | ||
* Youness Alaoui (KaKaRoTo) - moveutil.cpp/.h spursutil.cpp/.h | ||
|
||
Changelog: | ||
---------- | ||
* 0.3 | ||
|
||
Now is possible to choose the move controller to use. | ||
Added move_set_rumble/move_get_rumble function | ||
Added set_move_led_color to force the ball color of the PS Move | ||
|
||
* 0.2 | ||
|
||
fixed gyro axis | ||
|
||
* 0.1 | ||
|
||
initial release | ||
|
||
Linking | ||
------- | ||
|
||
Add these libs on your makefile to compile your homebrew. | ||
-lmove -lgem -lcamera -lspurs | ||
|
||
License | ||
------- | ||
|
||
This lib is released under BSD License. | ||
|
||
Example | ||
------- | ||
|
||
#include <libmove/libmove.h> | ||
int main(s32 argc, const char* argv[]){ | ||
movePadData data; | ||
init_move(); | ||
while(1){ | ||
getMovePadData(PLAYSTATION_MOVE_PAD_0 , &data); | ||
if(data.BTN_ACTION) | ||
calibrate_move(PLAYSTATION_MOVE_PAD_0); | ||
}else if(data.BTN_T){ | ||
goto end; | ||
} | ||
} | ||
end: | ||
end_move(); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Submodule libmove-NoRSX
added at
e94829