Makefile.ds
author Sam Lantinga
Tue, 02 Dec 2008 17:14:04 +0000
changeset 2824 4dba7aa7ea77
parent 2749 1c5f440a60fe
child 3073 c5280d33c32a
permissions -rw-r--r--
Added slow but complete blit fallback
Don't try to RLE encode surfaces that have alpha channel and alpha modulation
Don't turn on blending when converting an RGB surface to RGBA format
Do turn on blending when converting colorkey to alpha channel
slouken@2735
     1
slouken@2735
     2
#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
slouken@2735
     3
#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
slouken@2735
     4
slouken@2735
     5
ifeq ($(strip $(DEVKITPRO)),)
slouken@2735
     6
$(error "Please set DEVKITPRO in your environment (available from http://www.devkitpro.org). export DEVKITPRO=<path to>devkitPro")
slouken@2735
     7
endif
slouken@2735
     8
ifeq ($(strip $(DEVKITARM)),)
slouken@2735
     9
DEVKITARM = $(DEVKITPRO)/devkitARM
slouken@2735
    10
endif
slouken@2735
    11
PATH := $(PATH):$(DEVKITARM)/bin
slouken@2735
    12
slouken@2735
    13
CC = arm-eabi-gcc
slouken@2735
    14
AR = arm-eabi-ar
slouken@2735
    15
RANLIB = arm-eabi-ranlib
slouken@2735
    16
slouken@2735
    17
#ifdef GL
slouken@2735
    18
#DEFS += -DSDL_VIDEO_OPENGL=1
slouken@2735
    19
#TARGET = libSDL_gl.a
slouken@2735
    20
#else
slouken@2735
    21
TARGET = libSDL.a
slouken@2735
    22
#endif
slouken@2735
    23
slouken@2735
    24
#CFLAGS=$(DEFS) -Iinclude
slouken@2735
    25
CFLAGS	=	-mthumb -mthumb-interwork \
slouken@2735
    26
		-march=armv5te -mtune=arm946e-s \
slouken@2735
    27
		-O2 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
slouken@2735
    28
		-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 \
slouken@2735
    29
		-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
slouken@2735
    30
slouken@2735
    31
#src/audio/disk/SDL_diskaudio.c \
slouken@2735
    32
#src/audio/dummy/SDL_dummyaudio.c \
slouken@2735
    33
slouken@2735
    34
SRCS = \
slouken@2735
    35
src/SDL.c \
slouken@2735
    36
src/SDL_compat.c \
slouken@2735
    37
src/SDL_error.c \
slouken@2735
    38
src/SDL_fatal.c \
slouken@2735
    39
src/audio/nds/SDL_ndsaudio.c \
slouken@2735
    40
src/audio/SDL_audio.c \
slouken@2735
    41
src/audio/SDL_audiocvt.c \
slouken@2735
    42
src/audio/SDL_audiodev.c \
slouken@2735
    43
src/audio/SDL_audiotypecvt.c \
slouken@2735
    44
src/audio/SDL_mixer.c \
slouken@2735
    45
src/audio/SDL_mixer_m68k.c \
slouken@2735
    46
src/audio/SDL_mixer_MMX.c \
slouken@2735
    47
src/audio/SDL_mixer_MMX_VC.c \
slouken@2735
    48
src/audio/SDL_wave.c \
slouken@2735
    49
src/cdrom/dummy/SDL_syscdrom.c \
slouken@2735
    50
src/cdrom/SDL_cdrom.c \
slouken@2735
    51
src/cpuinfo/SDL_cpuinfo.c \
slouken@2735
    52
src/events/SDL_events.c \
slouken@2735
    53
src/events/SDL_keyboard.c \
slouken@2735
    54
src/events/SDL_mouse.c \
slouken@2735
    55
src/events/SDL_quit.c \
slouken@2735
    56
src/events/SDL_windowevents.c \
slouken@2735
    57
src/file/SDL_rwops.c \
dalton@2749
    58
src/haptic/SDL_haptic.c \
dalton@2749
    59
src/haptic/nds/SDL_syshaptic.c \
slouken@2735
    60
src/joystick/nds/SDL_sysjoystick.c \
slouken@2735
    61
src/joystick/SDL_joystick.c \
slouken@2735
    62
src/stdlib/SDL_getenv.c \
slouken@2735
    63
src/stdlib/SDL_iconv.c \
slouken@2735
    64
src/stdlib/SDL_malloc.c \
slouken@2735
    65
src/stdlib/SDL_qsort.c \
slouken@2735
    66
src/stdlib/SDL_stdlib.c \
slouken@2735
    67
src/stdlib/SDL_string.c \
slouken@2735
    68
src/thread/SDL_thread.c \
slouken@2735
    69
src/thread/nds/SDL_syscond.c \
slouken@2735
    70
src/thread/nds/SDL_sysmutex.c \
slouken@2735
    71
src/thread/nds/SDL_syssem.c \
slouken@2735
    72
src/thread/nds/SDL_systhread.c \
slouken@2735
    73
src/timer/nds/SDL_systimer.c \
slouken@2735
    74
src/timer/SDL_timer.c \
slouken@2735
    75
src/video/nds/SDL_ndsevents.c \
slouken@2735
    76
src/video/nds/SDL_ndsrender.c \
slouken@2735
    77
src/video/nds/SDL_ndsvideo.c \
slouken@2735
    78
src/video/dummy/SDL_nullevents.c \
slouken@2735
    79
src/video/dummy/SDL_nullrender.c \
slouken@2735
    80
src/video/dummy/SDL_nullvideo.c \
slouken@2735
    81
src/video/SDL_blit_0.c \
slouken@2735
    82
src/video/SDL_blit_1.c \
slouken@2735
    83
src/video/SDL_blit_A.c \
slouken@2735
    84
src/video/SDL_blit_auto.c \
slouken@2735
    85
src/video/SDL_blit.c \
slouken@2735
    86
src/video/SDL_blit_copy.c \
slouken@2735
    87
src/video/SDL_blit_N.c \
slouken@2735
    88
src/video/SDL_blit_slow.c \
slouken@2735
    89
src/video/SDL_bmp.c \
slouken@2735
    90
src/video/SDL_fill.c \
slouken@2735
    91
src/video/SDL_gamma.c \
slouken@2735
    92
src/video/SDL_pixels.c \
slouken@2735
    93
src/video/SDL_rect.c \
slouken@2735
    94
src/video/SDL_renderer_gl.c \
slouken@2735
    95
src/video/SDL_renderer_sw.c \
slouken@2735
    96
src/video/SDL_RLEaccel.c \
slouken@2735
    97
src/video/SDL_stretch.c \
slouken@2735
    98
src/video/SDL_surface.c \
slouken@2735
    99
src/video/SDL_video.c \
slouken@2735
   100
src/video/SDL_yuv_mmx.c \
slouken@2735
   101
src/video/SDL_yuv_sw.c \
slouken@2735
   102
slouken@2735
   103
OBJS = $(SRCS:.c=.o)
slouken@2735
   104
slouken@2735
   105
TEST = \
slouken@2735
   106
test/nds-test-progs/general/general.nds \
slouken@2735
   107
test/nds-test-progs/sprite/sprite.nds \
slouken@2735
   108
test/nds-test-progs/sprite2/sprite2.nds \
slouken@2735
   109
slouken@2735
   110
slouken@2735
   111
all: $(TARGET)
slouken@2735
   112
slouken@2735
   113
$(TARGET): copy_config \
slouken@2735
   114
	$(OBJS)
slouken@2735
   115
	$(AR) rc $(TARGET) $(OBJS)
slouken@2735
   116
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
slouken@2735
   117
slouken@2735
   118
install: $(TARGET)
slouken@2735
   119
	@cp libSDL.a $(DEVKITPRO)/libnds/lib/
slouken@2735
   120
	@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
slouken@2735
   121
	@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
slouken@2735
   122
slouken@2735
   123
nds_test:
slouken@2735
   124
	$(MAKE) -C test/nds-test-progs
slouken@2735
   125
slouken@2735
   126
copy_config:
slouken@2735
   127
	@cp include/SDL_config.h.default include/SDL_config.h
slouken@2735
   128
slouken@2735
   129
clean:
slouken@2735
   130
	rm -f include/SDL_config.h $(OBJS)
slouken@2735
   131