Makefile.ds
author Darren Alton <dalton@stevens.edu>
Thu, 10 Jul 2008 23:35:01 +0000
branchgsoc2008_nds
changeset 2678 3895761db26a
parent 2674 f1d07ba2e275
child 2680 4135aa9c5645
permissions -rw-r--r--
Removed old touchscreen system, starting to implement mouse-based touchscreen. Also, more work on a non-software-rendering video driver
dalton@2670
     1
dalton@2670
     2
#LibSDL 1.3 porting and enhancements by Darren Alton (lifning)
dalton@2670
     3
#LibSDL 1.2.9 DS porting by Troy Davis(GPF)
dalton@2670
     4
dalton@2670
     5
ifeq ($(strip $(DEVKITARM)),)
dalton@2670
     6
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
dalton@2670
     7
endif
dalton@2670
     8
dalton@2670
     9
CC = arm-eabi-gcc
dalton@2670
    10
AR = arm-eabi-ar
dalton@2670
    11
RANLIB = arm-eabi-ranlib
dalton@2670
    12
dalton@2670
    13
#ifdef GL
dalton@2670
    14
#DEFS += -DSDL_VIDEO_OPENGL=1
dalton@2670
    15
#TARGET = libSDL_gl.a
dalton@2670
    16
#else
dalton@2670
    17
TARGET = libSDL.a
dalton@2670
    18
#endif
dalton@2670
    19
dalton@2670
    20
#CFLAGS=$(DEFS) -Iinclude
dalton@2670
    21
CFLAGS	=	-mthumb -mthumb-interwork \
dalton@2670
    22
		-march=armv5te -mtune=arm946e-s \
dalton@2670
    23
		-O2 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
dalton@2670
    24
		-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 \
dalton@2670
    25
		-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
dalton@2670
    26
dalton@2670
    27
SRCS = \
dalton@2670
    28
src/SDL.c \
dalton@2670
    29
src/SDL_compat.c \
dalton@2670
    30
src/SDL_error.c \
dalton@2670
    31
src/SDL_fatal.c \
dalton@2670
    32
src/audio/disk/SDL_diskaudio.c \
dalton@2670
    33
src/audio/dummy/SDL_dummyaudio.c \
dalton@2670
    34
src/audio/SDL_audio.c \
dalton@2670
    35
src/audio/SDL_audiocvt.c \
dalton@2670
    36
src/audio/SDL_audiodev.c \
dalton@2670
    37
src/audio/SDL_audiotypecvt.c \
dalton@2670
    38
src/audio/SDL_mixer.c \
dalton@2670
    39
src/audio/SDL_mixer_m68k.c \
dalton@2670
    40
src/audio/SDL_mixer_MMX.c \
dalton@2670
    41
src/audio/SDL_mixer_MMX_VC.c \
dalton@2670
    42
src/audio/SDL_wave.c \
dalton@2670
    43
src/cdrom/dummy/SDL_syscdrom.c \
dalton@2670
    44
src/cdrom/SDL_cdrom.c \
dalton@2670
    45
src/cpuinfo/SDL_cpuinfo.c \
dalton@2670
    46
src/events/SDL_events.c \
dalton@2670
    47
src/events/SDL_keyboard.c \
dalton@2670
    48
src/events/SDL_mouse.c \
dalton@2670
    49
src/events/SDL_quit.c \
dalton@2670
    50
src/events/SDL_windowevents.c \
dalton@2670
    51
src/file/SDL_rwops.c \
dalton@2673
    52
src/joystick/nds/SDL_sysjoystick.c \
dalton@2670
    53
src/joystick/SDL_joystick.c \
dalton@2670
    54
src/stdlib/SDL_getenv.c \
dalton@2670
    55
src/stdlib/SDL_iconv.c \
dalton@2670
    56
src/stdlib/SDL_malloc.c \
dalton@2670
    57
src/stdlib/SDL_qsort.c \
dalton@2670
    58
src/stdlib/SDL_stdlib.c \
dalton@2670
    59
src/stdlib/SDL_string.c \
dalton@2670
    60
src/thread/SDL_thread.c \
dalton@2670
    61
src/thread/nds/SDL_syscond.c \
dalton@2670
    62
src/thread/nds/SDL_sysmutex.c \
dalton@2670
    63
src/thread/nds/SDL_syssem.c \
dalton@2670
    64
src/thread/nds/SDL_systhread.c \
dalton@2670
    65
src/timer/dummy/SDL_systimer.c \
dalton@2670
    66
src/timer/SDL_timer.c \
dalton@2670
    67
src/video/nds/SDL_ndsevents.c \
dalton@2670
    68
src/video/nds/SDL_ndsrender.c \
dalton@2670
    69
src/video/nds/SDL_ndsvideo.c \
dalton@2674
    70
src/video/dummy/SDL_nullevents.c \
dalton@2674
    71
src/video/dummy/SDL_nullrender.c \
dalton@2674
    72
src/video/dummy/SDL_nullvideo.c \
dalton@2670
    73
src/video/SDL_blit_0.c \
dalton@2670
    74
src/video/SDL_blit_1.c \
dalton@2670
    75
src/video/SDL_blit_A.c \
dalton@2670
    76
src/video/SDL_blit_auto.c \
dalton@2670
    77
src/video/SDL_blit.c \
dalton@2670
    78
src/video/SDL_blit_copy.c \
dalton@2670
    79
src/video/SDL_blit_N.c \
dalton@2670
    80
src/video/SDL_blit_slow.c \
dalton@2670
    81
src/video/SDL_bmp.c \
dalton@2670
    82
src/video/SDL_fill.c \
dalton@2670
    83
src/video/SDL_gamma.c \
dalton@2670
    84
src/video/SDL_pixels.c \
dalton@2670
    85
src/video/SDL_rect.c \
dalton@2670
    86
src/video/SDL_renderer_gl.c \
dalton@2670
    87
src/video/SDL_renderer_sw.c \
dalton@2670
    88
src/video/SDL_RLEaccel.c \
dalton@2670
    89
src/video/SDL_stretch.c \
dalton@2670
    90
src/video/SDL_surface.c \
dalton@2670
    91
src/video/SDL_video.c \
dalton@2670
    92
src/video/SDL_yuv_mmx.c \
dalton@2670
    93
src/video/SDL_yuv_sw.c \
dalton@2670
    94
dalton@2670
    95
OBJS = $(SRCS:.c=.o)
dalton@2670
    96
dalton@2670
    97
TEST = \
dalton@2670
    98
	test/checkkeys.c \
dalton@2670
    99
	test/graywin.c \
dalton@2670
   100
	test/loopwave.c \
dalton@2670
   101
	test/testalpha.c \
dalton@2670
   102
	test/testbitmap.c \
dalton@2670
   103
	test/testcdrom.c \
dalton@2670
   104
	test/testerror.c \
dalton@2670
   105
	test/testgamma.c \
dalton@2670
   106
	test/testgl.c \
dalton@2670
   107
	test/testhread.c \
dalton@2670
   108
	test/testjoystick.c \
dalton@2670
   109
	test/testkeys.c \
dalton@2670
   110
	test/testlock.c \
dalton@2670
   111
	test/testoverlay.c \
dalton@2670
   112
	test/testpalette.c \
dalton@2670
   113
	test/testsem.c \
dalton@2670
   114
	test/testsprite.c \
dalton@2670
   115
	test/testtimer.c \
dalton@2670
   116
	test/testtypes.c \
dalton@2670
   117
	test/testver.c \
dalton@2670
   118
	test/testvidinfo.c \
dalton@2670
   119
	test/testwin.c \
dalton@2670
   120
	test/testwm.c \
dalton@2670
   121
	test/threadwin.c \
dalton@2670
   122
	test/torturethread.c \
dalton@2670
   123
dalton@2670
   124
all: $(TARGET)
dalton@2670
   125
dalton@2670
   126
$(TARGET): copy_config \
dalton@2670
   127
	$(OBJS)
dalton@2670
   128
	$(AR) rc $(TARGET) $(OBJS)
dalton@2670
   129
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
dalton@2670
   130
dalton@2670
   131
install: $(TARGET)
dalton@2670
   132
	@cp libSDL.a $(DEVKITPRO)/libnds/lib/
dalton@2673
   133
	@mkdir -p $(DEVKITPRO)/libnds/include/SDL/
dalton@2673
   134
	@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
dalton@2670
   135
dalton@2670
   136
copy_config:
dalton@2670
   137
	@cp include/SDL_config.h.default include/SDL_config.h
dalton@2670
   138
dalton@2670
   139
clean:
dalton@2670
   140
	rm -f include/SDL_config.h $(OBJS)
dalton@2670
   141