2008-08-27 15:10:03 +00:00
|
|
|
|
Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
> int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
> int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
> void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.
I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
|
|
|
#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
|
|
|
|
#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
|
|
|
|
|
|
|
|
ifeq ($(strip $(DEVKITPRO)),)
|
|
|
|
$(error "Please set DEVKITPRO in your environment (available from http://www.devkitpro.org). export DEVKITPRO=<path to>devkitPro")
|
|
|
|
endif
|
|
|
|
ifeq ($(strip $(DEVKITARM)),)
|
2008-08-27 15:10:03 +00:00
|
|
|
DEVKITARM = $(DEVKITPRO)/devkitARM
|
Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
> int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
> int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
> void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.
I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
|
|
|
endif
|
2008-08-27 15:10:03 +00:00
|
|
|
PATH := $(PATH):$(DEVKITARM)/bin
|
|
|
|
|
|
|
|
CC = arm-eabi-gcc
|
|
|
|
AR = arm-eabi-ar
|
|
|
|
RANLIB = arm-eabi-ranlib
|
|
|
|
|
|
|
|
#ifdef GL
|
|
|
|
#DEFS += -DSDL_VIDEO_OPENGL=1
|
|
|
|
#TARGET = libSDL_gl.a
|
|
|
|
#else
|
|
|
|
TARGET = libSDL.a
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#CFLAGS=$(DEFS) -Iinclude
|
2011-02-12 11:36:56 -08:00
|
|
|
CFLAGS = -mthumb -mthumb-interwork \
|
|
|
|
-march=armv5te -mtune=arm946e-s \
|
|
|
|
-O2 -Wall -Wwrite-strings -Wpointer-arith \
|
2011-02-15 16:41:04 -08:00
|
|
|
-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -DENABLE_NDS -DNO_SIGNAL_H -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.3\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -Iinclude
|
2008-08-27 15:10:03 +00:00
|
|
|
|
|
|
|
#src/audio/disk/SDL_diskaudio.c \
|
|
|
|
#src/audio/dummy/SDL_dummyaudio.c \
|
|
|
|
|
|
|
|
SRCS = \
|
|
|
|
src/SDL.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/SDL_assert.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/SDL_compat.c \
|
|
|
|
src/SDL_error.c \
|
|
|
|
src/SDL_fatal.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/SDL_hints.c \
|
|
|
|
src/SDL_log.c \
|
|
|
|
src/atomic/SDL_atomic.c \
|
Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
> int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
> int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
> void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.
I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
|
|
|
src/atomic/SDL_spinlock.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/audio/SDL_audio.c \
|
|
|
|
src/audio/SDL_audiocvt.c \
|
|
|
|
src/audio/SDL_audiodev.c \
|
|
|
|
src/audio/SDL_audiotypecvt.c \
|
|
|
|
src/audio/SDL_mixer.c \
|
|
|
|
src/audio/SDL_mixer_MMX.c \
|
|
|
|
src/audio/SDL_mixer_MMX_VC.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/audio/SDL_mixer_m68k.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/audio/SDL_wave.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/audio/nds/SDL_ndsaudio.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/cpuinfo/SDL_cpuinfo.c \
|
|
|
|
src/events/SDL_events.c \
|
|
|
|
src/events/SDL_keyboard.c \
|
|
|
|
src/events/SDL_mouse.c \
|
|
|
|
src/events/SDL_quit.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/events/SDL_touch.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/events/SDL_windowevents.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/events/nds/SDL_ndsgesture.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/file/SDL_rwops.c \
|
2008-09-06 00:10:16 +00:00
|
|
|
src/haptic/SDL_haptic.c \
|
|
|
|
src/haptic/nds/SDL_syshaptic.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/joystick/SDL_joystick.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/joystick/nds/SDL_sysjoystick.c \
|
|
|
|
src/power/SDL_power.c \
|
|
|
|
src/power/nds/SDL_syspower.c \
|
|
|
|
src/render/SDL_render.c \
|
|
|
|
src/render/SDL_yuv_sw.c \
|
|
|
|
src/render/software/SDL_render_sw.c \
|
|
|
|
src/render/software/SDL_blendpoint.c \
|
|
|
|
src/render/software/SDL_drawline.c \
|
|
|
|
src/render/software/SDL_blendline.c \
|
|
|
|
src/render/software/SDL_blendfillrect.c \
|
|
|
|
src/render/software/SDL_drawpoint.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/stdlib/SDL_getenv.c \
|
|
|
|
src/stdlib/SDL_iconv.c \
|
|
|
|
src/stdlib/SDL_malloc.c \
|
|
|
|
src/stdlib/SDL_qsort.c \
|
|
|
|
src/stdlib/SDL_stdlib.c \
|
|
|
|
src/stdlib/SDL_string.c \
|
|
|
|
src/thread/SDL_thread.c \
|
|
|
|
src/thread/nds/SDL_syscond.c \
|
|
|
|
src/thread/nds/SDL_sysmutex.c \
|
|
|
|
src/thread/nds/SDL_syssem.c \
|
|
|
|
src/thread/nds/SDL_systhread.c \
|
|
|
|
src/timer/SDL_timer.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/timer/nds/SDL_systimer.c \
|
|
|
|
src/video/SDL_RLEaccel.c \
|
|
|
|
src/video/SDL_blit.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/video/SDL_blit_0.c \
|
|
|
|
src/video/SDL_blit_1.c \
|
|
|
|
src/video/SDL_blit_A.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/video/SDL_blit_N.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/video/SDL_blit_auto.c \
|
|
|
|
src/video/SDL_blit_copy.c \
|
|
|
|
src/video/SDL_blit_slow.c \
|
|
|
|
src/video/SDL_bmp.c \
|
2009-02-18 00:33:31 +00:00
|
|
|
src/video/SDL_fillrect.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
src/video/SDL_pixels.c \
|
|
|
|
src/video/SDL_rect.c \
|
|
|
|
src/video/SDL_stretch.c \
|
|
|
|
src/video/SDL_surface.c \
|
|
|
|
src/video/SDL_video.c \
|
2011-02-12 11:36:56 -08:00
|
|
|
src/video/dummy/SDL_nullevents.c \
|
|
|
|
src/video/dummy/SDL_nullvideo.c \
|
|
|
|
src/video/nds/SDL_ndsevents.c \
|
|
|
|
src/video/nds/SDL_ndsrender.c \
|
|
|
|
src/video/nds/SDL_ndsvideo.c \
|
2008-08-27 15:10:03 +00:00
|
|
|
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
|
|
|
|
TEST = \
|
|
|
|
test/nds-test-progs/general/general.nds \
|
|
|
|
test/nds-test-progs/sprite/sprite.nds \
|
|
|
|
test/nds-test-progs/sprite2/sprite2.nds \
|
|
|
|
|
|
|
|
|
2011-02-12 11:36:56 -08:00
|
|
|
all: $(TARGET) install nds_test
|
2008-08-27 15:10:03 +00:00
|
|
|
|
Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
> int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
> int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
> void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.
I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
|
|
|
# That file must be compiled in arm mode, not thumb mode.
|
|
|
|
src/atomic/SDL_spinlock.o: src/atomic/SDL_spinlock.c
|
|
|
|
$(CC) $(CFLAGS) -mno-thumb -o $@ -c $^
|
|
|
|
|
2011-02-16 02:37:09 -08:00
|
|
|
$(TARGET): $(OBJS)
|
2008-08-27 15:10:03 +00:00
|
|
|
$(AR) rc $(TARGET) $(OBJS)
|
|
|
|
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
|
|
|
|
|
|
|
|
install: $(TARGET)
|
|
|
|
@cp libSDL.a $(DEVKITPRO)/libnds/lib/
|
|
|
|
@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
|
|
|
|
@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
|
|
|
|
|
|
|
|
nds_test:
|
2011-02-12 11:36:56 -08:00
|
|
|
$(MAKE) -C test/nds-test-progs/general
|
|
|
|
# $(MAKE) -C test/nds-test-progs/sprite
|
|
|
|
# $(MAKE) -C test/nds-test-progs/sprite2
|
2008-08-27 15:10:03 +00:00
|
|
|
|
|
|
|
clean:
|
2011-02-16 02:37:09 -08:00
|
|
|
rm -f $(OBJS)
|