Re: Портирование Pixilang на Dingoo A320
Posted: Fri Feb 05, 2010 4:08 am
Не нашел как вставить сюда видео, вот ссылка http://rutube.ru/tracks/2901106.html?v= ... 992b0ae10f
Code: Select all
Sundog Enine v1.3
Jul 8 2010
STARTING...
MAIN: device started
MAIN: screen_xsize = 320
MAIN: screen_ysize = 240
MAIN: system palette init
MAIN: wmanager initialized
Sound stream initialized
Segmentation fault
Code: Select all
ifeq ($(MAKECMDGOALS),)
$(error No target selected. Please type "make palm", "make linux" or "make wince")
exit
endif
## ------------------------------------------ ##
## Main target options: ##
## ------------------------------------------ ##
SUNDOG = ../../sundog_engine/
ifeq ($(MAKECMDGOALS),palm)
SDK = /usr/local/sdk-5r3/include/
SUNDOG_DEFINES = \
-DARCH_ARM \
-DPALMOS \
-DCOLOR16BITS \
-DDIRECTDRAW \
-DSLOWMODE \
-DSTYPE_INT16
MCC = m68k-palmos-gcc -O2
CC = arm-elf-gcc -O3
endif
ifeq ($(MAKECMDGOALS),linux)
#(remove -lrt on FreeBSD and Cygwin)
# X11 (OpenGL) libs:
#LIBS = -L/usr/X11R6/lib -lpthread -lrt -lstdc++ -lX11 -lGL -lXext
# X11 libs:
#LIBS = -L/usr/X11R6/lib -lpthread -lrt -lstdc++ -lX11
# SDL libs:
LIBS = -L/usr/X11R6/lib -lpthread -lrt -lstdc++ -lSDL
SUNDOG_DEFINES = \
-DLINUX \
-DCOLOR16BITS \
-DDIRECTDRAW \
-DRGB565 \
-DSLOWMODE \
-DSTYPE_INT16
#CC = mipsel-linux-gcc -s
CC = /opt/mipsel-linux-uclibc/usr/bin/mipsel-linux-gcc -O3 -s
#CXX = mipsel-linux-gcc -s
CXX = /opt/mipsel-linux-uclibc/usr/bin/mipsel-linux-gcc -O3 -s
endif
ifeq ($(MAKECMDGOALS),wince)
SUNDOG_DEFINES = \
-DARCH_ARM \
-DWINCE \
-DCOLOR16BITS \
-DDIRECTDRAW \
-DRGB565 \
-DSLOWMODE \
-DSTYPE_INT16
CC = arm-wince-mingw32ce-gcc -O3 -s -fno-exceptions
CXX = arm-wince-mingw32ce-gcc -O3 -s -fno-exceptions
endif
SUNDOG_DEFINES += \
-DLIB_GIF \
-DLIB_JPG \
-DLIB_PSYTEXX \
-DLIB_SUNVOX
## ------------------------------------------ ##
## Directories: ##
## ------------------------------------------ ##
MAIN = $(SUNDOG)main/
CMAIN = $(MAIN)code/
MEM = $(SUNDOG)memory/
CMEM = $(MEM)code/
SOUND = $(SUNDOG)sound/
CSOUND = $(SOUND)code/
CORE = $(SUNDOG)core/
CCORE = $(CORE)code/
FS = $(SUNDOG)filesystem/
CFS = $(FS)code/
TM = $(SUNDOG)time/
CTM = $(TM)code/
WM = $(SUNDOG)window_manager/
CWM = $(WM)code/
XML = $(SUNDOG)xml/
CXML = $(XML)code/
UTILS = $(SUNDOG)utils/
CUTILS = $(UTILS)code/
ARM = ARMPalmOS/
CARM = $(ARM)code/
## ------------------------------------------ ##
## Object files and includes: ##
## ------------------------------------------ ##
DEFINES = $(SUNDOG_DEFINES) -I$(SUNDOG)
ifeq ($(MAKECMDGOALS),palm)
ARM_PALM_INCS = -IARMPalmOS/ -I$(SDK) -I$(SDK)libraries -I$(SDK)Extensions/ExpansionMgr -I$(SDK)Dynamic -I$(SDK)Core -I$(SDK)Core/Hardware -I$(SDK)Core/System -I$(SDK)Core/System/Unix -I$(SDK)Core/ui -I$(SDK)Core/UI -I$(SDK)Libraries
ARM_PALM_FLAGS = -DNATIVE -mcpu=arm9tdmi -nostartfiles -ffixed-r9 -mpic-register=r10 -msingle-pic-base -fPIC
ARM_PALM_FILES = $(CARM)palm_functions.cpp $(ARM)PalmTypes.h $(ARM)DebugMgr.h $(ARM)palm_functions.h
ARM_PALM_OBJECTS = palm_functions.o
DEFINES += $(ARM_PALM_INCS) $(ARM_PALM_FLAGS) $(ARM_PALM_DEFINES)
endif
ifeq ($(MAKECMDGOALS),wince)
DEFINES += -IResources/ -IWinCE/
endif
SOURCES := \
$(wildcard ../main/*.cpp) \
$(wildcard ../main/lib_xml/code/*.cpp) \
$(wildcard $(SUNDOG)core/code/*.cpp) \
$(wildcard $(SUNDOG)filesystem/code/*.cpp) \
$(wildcard $(SUNDOG)main/code/*.cpp) \
$(wildcard $(SUNDOG)memory/code/*.cpp) \
$(wildcard $(SUNDOG)sound/code/*.cpp) \
$(wildcard $(SUNDOG)time/code/*.cpp) \
$(wildcard $(SUNDOG)utils/code/*.cpp) \
$(wildcard $(SUNDOG)window_manager/code/*.cpp) \
$(wildcard $(SUNDOG)window_manager/regions/*.cpp)
ifneq ($(findstring LIB_GIF,$(SUNDOG_DEFINES)),)
SOURCES += $(wildcard ../main/lib_gif/*.cpp)
endif
ifneq ($(findstring LIB_JPG,$(SUNDOG_DEFINES)),)
SOURCES += $(wildcard ../main/lib_jpg/*.cpp)
endif
ifneq ($(findstring LIB_PSYTEXX,$(SUNDOG_DEFINES)),)
SOURCES += $(wildcard ../main/lib_psytexx/code/*.cpp)
endif
ifneq ($(findstring LIB_SUNVOX,$(SUNDOG_DEFINES)),)
SOURCES += $(wildcard ../main/lib_sunvox/*.cpp)
SOURCES += $(wildcard ../main/lib_sunvox/psynth/*.cpp)
endif
OBJECTS := $(patsubst %.cpp,%.o,$(SOURCES))
DEPS := $(patsubst %.o,%.d,$(OBJECTS))
%.d : %.cpp
@set -e; rm -f $@; \
$(CC) -M $(CPPFLAGS) $(DEFINES) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
-include $(DEPS)
## ------------------------------------------ ##
## Main rules for different targets: ##
## ------------------------------------------ ##
linux: $(OBJECTS)
$(CC) $(DEFINES) -o pixilang $(OBJECTS) $(LIBS)
palm: $(OBJECTS) $(ARM_PALM_OBJECTS)
#Link main code ( with special ARM script - armscript.ld ) :
$(CC) $(DEFINES) -o main_palm.o $(OBJECTS) $(ARM_PALM_OBJECTS) -Xlinker --script=ARMFiles/armscript.ld
#Create BIN files from the program_palm.o :
arm-elf-objcopy -j .text -O binary main_palm.o armcode
split -b 64000 armcode armc
mv armcaa armc0000.bin
mv armcab armc0001.bin
mv armcac armc0002.bin
mv armcad armc0003.bin
mv armcae armc0004.bin
mv armcaf armc0005.bin
arm-elf-objcopy -j .got -O binary main_palm.o armg0000.bin
arm-elf-objcopy -j .alldata -O binary main_palm.o armd0000.bin
arm-elf-objcopy -j .rel -O binary main_palm.o armr0000.bin
#Create Palm resources ( *.BIN files ) :
pilrc Resources/resources.rcp
#Build PRC file :
$(MCC) ARMFiles/arm_starter.cpp $(SUNDOG_DEFINES) -o arm_starter.o
m68k-palmos-obj-res arm_starter.o
build-prc -v 1.0 ARMFiles/info.def -o pixilang.prc *.grc *.bin
wince: $(OBJECTS)
arm-wince-mingw32ce-windres Resources/wince_rc.rc wince_rc.o
$(CC) $(DEFINES) -o pixilang.exe $(OBJECTS) wince_rc.o $(LIBS)
$(OBJECTS):
$(CC) $(DEFINES) -c $(CFLAGS) $(patsubst %.o,%.cpp,$@) -o $@
$(ARM_PALM_OBJECTS): $(ARM_PALM_FILES)
$(CC) $(DEFINES) -c $(CARM)palm_functions.cpp
## ------------------------------------------ ##
## ##
## ------------------------------------------ ##
clean:
rm -f *.o *.grc *.bin armcode $(OBJECTS) $(patsubst %.d,%.d*,$(DEPS))