Makefile.ds
author Sunny Sachanandani <sunnysachanandani@gmail.com>
Fri, 09 Jul 2010 21:36:41 +0530
changeset 4590 1ad70fb49fcb
parent 3647 c5925cd41955
child 5270 7aba0406c273
permissions -rw-r--r--
Fix so many things that there is little place in this column to list them all but the result is that blending modes just work now for drawing primitives.

Fixes involved:
1. Fix handling of alpha channel when SDL_BLENDMODE_NONE is set.
2. Make xrendercolor use floating-point values for color channels and then convert to 16 bit ints.
3. Fix handling of visuals in SDL_x11modes.c so that a 32 bit ARGB visual is used.
4. Fix the background pixel value in SDL_x11window.c so that the window background has an alpha value of 0xFF and not 0.
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@3647
    39
src/SDL_assert.c \
slouken@2735
    40
src/audio/nds/SDL_ndsaudio.c \
slouken@2735
    41
src/audio/SDL_audio.c \
slouken@2735
    42
src/audio/SDL_audiocvt.c \
slouken@2735
    43
src/audio/SDL_audiodev.c \
slouken@2735
    44
src/audio/SDL_audiotypecvt.c \
slouken@2735
    45
src/audio/SDL_mixer.c \
slouken@2735
    46
src/audio/SDL_mixer_m68k.c \
slouken@2735
    47
src/audio/SDL_mixer_MMX.c \
slouken@2735
    48
src/audio/SDL_mixer_MMX_VC.c \
slouken@2735
    49
src/audio/SDL_wave.c \
slouken@2735
    50
src/cdrom/dummy/SDL_syscdrom.c \
slouken@2735
    51
src/cdrom/SDL_cdrom.c \
slouken@2735
    52
src/cpuinfo/SDL_cpuinfo.c \
slouken@2735
    53
src/events/SDL_events.c \
slouken@2735
    54
src/events/SDL_keyboard.c \
slouken@2735
    55
src/events/SDL_mouse.c \
slouken@2735
    56
src/events/SDL_quit.c \
slouken@2735
    57
src/events/SDL_windowevents.c \
slouken@2735
    58
src/file/SDL_rwops.c \
icculus@3170
    59
src/power/SDL_power.c \
icculus@3170
    60
src/power/nds/SDL_syspower.c \
dalton@2749
    61
src/haptic/SDL_haptic.c \
dalton@2749
    62
src/haptic/nds/SDL_syshaptic.c \
slouken@2735
    63
src/joystick/nds/SDL_sysjoystick.c \
slouken@2735
    64
src/joystick/SDL_joystick.c \
slouken@2735
    65
src/stdlib/SDL_getenv.c \
slouken@2735
    66
src/stdlib/SDL_iconv.c \
slouken@2735
    67
src/stdlib/SDL_malloc.c \
slouken@2735
    68
src/stdlib/SDL_qsort.c \
slouken@2735
    69
src/stdlib/SDL_stdlib.c \
slouken@2735
    70
src/stdlib/SDL_string.c \
slouken@2735
    71
src/thread/SDL_thread.c \
slouken@2735
    72
src/thread/nds/SDL_syscond.c \
slouken@2735
    73
src/thread/nds/SDL_sysmutex.c \
slouken@2735
    74
src/thread/nds/SDL_syssem.c \
slouken@2735
    75
src/thread/nds/SDL_systhread.c \
slouken@2735
    76
src/timer/nds/SDL_systimer.c \
slouken@2735
    77
src/timer/SDL_timer.c \
slouken@2735
    78
src/video/nds/SDL_ndsevents.c \
slouken@2735
    79
src/video/nds/SDL_ndsrender.c \
slouken@2735
    80
src/video/nds/SDL_ndsvideo.c \
slouken@2735
    81
src/video/dummy/SDL_nullevents.c \
slouken@2735
    82
src/video/dummy/SDL_nullrender.c \
slouken@2735
    83
src/video/dummy/SDL_nullvideo.c \
slouken@2735
    84
src/video/SDL_blit_0.c \
slouken@2735
    85
src/video/SDL_blit_1.c \
slouken@2735
    86
src/video/SDL_blit_A.c \
slouken@2735
    87
src/video/SDL_blit_auto.c \
slouken@2735
    88
src/video/SDL_blit.c \
slouken@2735
    89
src/video/SDL_blit_copy.c \
slouken@2735
    90
src/video/SDL_blit_N.c \
slouken@2735
    91
src/video/SDL_blit_slow.c \
slouken@2735
    92
src/video/SDL_bmp.c \
dalton@3073
    93
src/video/SDL_drawline.c \
dalton@3073
    94
src/video/SDL_drawpoint.c \
dalton@3073
    95
src/video/SDL_fillrect.c \
slouken@2735
    96
src/video/SDL_gamma.c \
slouken@2735
    97
src/video/SDL_pixels.c \
slouken@2735
    98
src/video/SDL_rect.c \
slouken@2735
    99
src/video/SDL_renderer_gl.c \
slouken@2735
   100
src/video/SDL_renderer_sw.c \
slouken@2735
   101
src/video/SDL_RLEaccel.c \
slouken@2735
   102
src/video/SDL_stretch.c \
slouken@2735
   103
src/video/SDL_surface.c \
slouken@2735
   104
src/video/SDL_video.c \
slouken@2735
   105
src/video/SDL_yuv_mmx.c \
slouken@2735
   106
src/video/SDL_yuv_sw.c \
slouken@2735
   107
slouken@2735
   108
OBJS = $(SRCS:.c=.o)
slouken@2735
   109
slouken@2735
   110
TEST = \
slouken@2735
   111
test/nds-test-progs/general/general.nds \
slouken@2735
   112
test/nds-test-progs/sprite/sprite.nds \
slouken@2735
   113
test/nds-test-progs/sprite2/sprite2.nds \
slouken@2735
   114
slouken@2735
   115
slouken@2735
   116
all: $(TARGET)
slouken@2735
   117
slouken@2735
   118
$(TARGET): copy_config \
slouken@2735
   119
	$(OBJS)
slouken@2735
   120
	$(AR) rc $(TARGET) $(OBJS)
slouken@2735
   121
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
slouken@2735
   122
slouken@2735
   123
install: $(TARGET)
slouken@2735
   124
	@cp libSDL.a $(DEVKITPRO)/libnds/lib/
slouken@2735
   125
	@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
slouken@2735
   126
	@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
slouken@2735
   127
slouken@2735
   128
nds_test:
slouken@2735
   129
	$(MAKE) -C test/nds-test-progs
slouken@2735
   130
slouken@2735
   131
copy_config:
slouken@2735
   132
	@cp include/SDL_config.h.default include/SDL_config.h
slouken@2735
   133
slouken@2735
   134
clean:
slouken@2735
   135
	rm -f include/SDL_config.h $(OBJS)
slouken@2735
   136