Makefile.ds
author Sam Lantinga <slouken@libsdl.org>
Wed, 26 Sep 2012 20:14:37 -0700
changeset 6464 ab55284b389f
parent 6285 f12649068adb
permissions -rw-r--r--
Fixed bug 1573 - SDL does not support system clipboard on Android. Philipp Wiesemann 2012-08-18 14:09:47 PDT there is currently no way in SDL to interact with the system clipboard on Android. I attached a patch which tries to implement the three clipboard functions for Android. It does not add the CLIPBOARDUPDATE event because this seems to require Android API 11 or polling.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     1
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     2
.SUFFIXES:
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     3
#---------------------------------------------------------------------------------
5289
1916a9e9714d Frank Zago to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5271
diff changeset
     4
1916a9e9714d Frank Zago to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5271
diff changeset
     5
ifeq ($(strip $(DEVKITARM)),)
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     6
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
5289
1916a9e9714d Frank Zago to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5271
diff changeset
     7
endif
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     8
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
     9
include $(DEVKITARM)/ds_rules
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    10
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    11
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    12
# TARGET is the name of the output
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    13
# BUILD is the directory where object files & intermediate files will be placed
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    14
# SOURCES is a list of directories containing source code
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    15
# DATA is a list of directories containing data files
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    16
# INCLUDES is a list of directories containing header files
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    17
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    18
TARGET		:=	$(shell basename $(CURDIR))
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    19
BUILD		:=	src
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
    20
SOURCES		:=	src
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    21
DATA		:=	data
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    22
INCLUDES	:=	include
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    23
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    24
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    25
# options for code generation
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    26
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    27
ARCH	:=	-mthumb -mthumb-interwork \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    28
		-D__NDS__ -DENABLE_NDS -DNO_SIGNAL_H -DDISABLE_THREADS -DPACKAGE=\"SDL\" \
6251
3e8c673cad58 Removing some more references to SDL 1.3
Sam Lantinga <slouken@libsdl.org>
parents: 5536
diff changeset
    29
		 -DVERSION=\"2.0\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1  
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    30
6285
f12649068adb Updated Nintendo DS support
Sam Lantinga <slouken@libsdl.org>
parents: 6251
diff changeset
    31
CFLAGS	:=	-g -Wall -Os\
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    32
		-march=armv5te -mtune=arm946e-s \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    33
		-fomit-frame-pointer -ffast-math \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    34
		$(ARCH)
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    36
CFLAGS	+=	$(INCLUDE) -DARM9
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    37
CXXFLAGS	:= $(CFLAGS) -fno-rtti -fno-exceptions
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    38
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    39
ASFLAGS	:=	-g $(ARCH) -march=armv5te -mtune=arm946e-s
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    40
LDFLAGS	=	-specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    41
6285
f12649068adb Updated Nintendo DS support
Sam Lantinga <slouken@libsdl.org>
parents: 6251
diff changeset
    42
# Set to 0 to use a framer buffer, or 1 to use the GL like hardware
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    43
# renderer. Alas, both cannot be used at the same time for lack of
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    44
# display/texture memory.
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    45
USE_HW_RENDERER := 1
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    46
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    47
ifeq ($(USE_HW_RENDERER),1)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    48
CFLAGS += -DUSE_HW_RENDERER
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    49
else
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    50
endif
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    52
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    53
# list of directories containing libraries, this must be the top level containing
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    54
# include and lib
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    55
#---------------------------------------------------------------------------------
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
    56
LIBDIRS	:=	$(LIBNDS) $(PORTLIBS)
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    57
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    58
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    59
# no real need to edit anything past this point unless you need to add additional
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    60
# rules for different file extensions
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    61
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    62
ifneq ($(BUILD),$(notdir $(CURDIR)))
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    63
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    64
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    65
export OUTPUT	:=	$(CURDIR)/lib/lib$(TARGET).a
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    66
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    67
export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    68
			$(foreach dir,$(DATA),$(CURDIR)/$(dir))
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    69
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    70
export DEPSDIR	:=	$(CURDIR)/$(BUILD)
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    71
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    72
CFILES		:=	\
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    73
			SDL.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    74
			SDL_assert.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    75
			SDL_error.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    76
			SDL_fatal.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    77
			SDL_hints.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    78
			SDL_log.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    79
			atomic/SDL_atomic.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    80
			atomic/SDL_spinlock.arm.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    81
			audio/SDL_audio.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    82
			audio/SDL_audiocvt.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    83
			audio/SDL_audiodev.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    84
			audio/SDL_audiotypecvt.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    85
			audio/SDL_mixer.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    86
			audio/SDL_wave.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    87
			audio/nds/SDL_ndsaudio.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    88
			cpuinfo/SDL_cpuinfo.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    89
			events/SDL_events.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    90
			events/SDL_keyboard.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    91
			events/SDL_mouse.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    92
			events/SDL_quit.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    93
			events/SDL_touch.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    94
			events/SDL_windowevents.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    95
			events/nds/SDL_ndsgesture.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    96
			file/SDL_rwops.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    97
			haptic/SDL_haptic.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    98
			haptic/nds/SDL_syshaptic.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
    99
			joystick/SDL_joystick.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   100
			joystick/nds/SDL_sysjoystick.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   101
			power/SDL_power.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   102
			power/nds/SDL_syspower.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   103
			render/SDL_render.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   104
			render/SDL_yuv_sw.c \
5428
cff5d3cd5777 A better way of setting the fullscreen flag for windows on Nintendo DS
Sam Lantinga <slouken@libsdl.org>
parents: 5423
diff changeset
   105
			render/nds/SDL_ndsrender.c \
6285
f12649068adb Updated Nintendo DS support
Sam Lantinga <slouken@libsdl.org>
parents: 6251
diff changeset
   106
			render/nds/SDL_libgl2D.c \
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   107
			render/software/SDL_blendfillrect.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   108
			render/software/SDL_blendline.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   109
			render/software/SDL_blendpoint.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   110
			render/software/SDL_drawline.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   111
			render/software/SDL_drawpoint.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   112
			render/software/SDL_render_sw.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   113
			stdlib/SDL_getenv.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   114
			stdlib/SDL_iconv.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   115
			stdlib/SDL_malloc.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   116
			stdlib/SDL_qsort.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   117
			stdlib/SDL_stdlib.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   118
			stdlib/SDL_string.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   119
			thread/SDL_thread.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   120
			thread/nds/SDL_syscond.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   121
			thread/nds/SDL_sysmutex.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   122
			thread/nds/SDL_syssem.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   123
			thread/nds/SDL_systhread.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   124
			timer/SDL_timer.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   125
			timer/nds/SDL_systimer.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   126
			video/SDL_RLEaccel.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   127
			video/SDL_blit.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   128
			video/SDL_blit_0.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   129
			video/SDL_blit_1.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   130
			video/SDL_blit_A.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   131
			video/SDL_blit_N.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   132
			video/SDL_blit_auto.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   133
			video/SDL_blit_copy.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   134
			video/SDL_blit_slow.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   135
			video/SDL_bmp.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   136
			video/SDL_clipboard.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   137
			video/SDL_fillrect.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   138
			video/SDL_pixels.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   139
			video/SDL_rect.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   140
			video/SDL_stretch.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   141
			video/SDL_surface.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   142
			video/SDL_video.c \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   143
			video/nds/SDL_ndsevents.c \
5428
cff5d3cd5777 A better way of setting the fullscreen flag for windows on Nintendo DS
Sam Lantinga <slouken@libsdl.org>
parents: 5423
diff changeset
   144
			video/nds/SDL_ndsvideo.c \
cff5d3cd5777 A better way of setting the fullscreen flag for windows on Nintendo DS
Sam Lantinga <slouken@libsdl.org>
parents: 5423
diff changeset
   145
			video/nds/SDL_ndswindow.c
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   146
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   147
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   148
#CPPFILES	:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   149
#SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   150
#BINFILES	:=	$(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
5289
1916a9e9714d Frank Zago to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5271
diff changeset
   151
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   152
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   153
# use CXX for linking C++ projects, CC for standard C
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   154
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   155
ifeq ($(strip $(CPPFILES)),)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   156
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   157
	export LD	:=	$(CC)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   158
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   159
else
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   160
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   161
	export LD	:=	$(CXX)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   162
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   163
endif
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   164
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   165
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   166
export OFILES	:=	$(addsuffix .o,$(BINFILES)) \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   167
			$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   168
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   169
export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   170
			$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   171
			-I$(CURDIR)/$(BUILD) \
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   172
			-I$(PORTLIBS)/include/SDL
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   173
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   174
.PHONY: $(BUILD) clean all
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   175
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   176
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   177
all: arm_only $(BUILD) install nds_test
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   178
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   179
lib:
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   180
	@[ -d $@ ] || mkdir -p $@
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   181
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   182
$(BUILD): lib
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   183
	@[ -d $@ ] || mkdir -p $@
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   184
	@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.ds -s
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   185
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   186
install: $(BUILD)
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   187
	@mkdir -p $(PORTLIBS)/include/SDL/
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   188
	@rsync -a $(OUTPUT) $(PORTLIBS)/lib/
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   189
	@rsync -a include/*.h $(PORTLIBS)/include/SDL/
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   190
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   191
nds_test:
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   192
	$(MAKE) -C test/nds-test-progs -s
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   193
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   194
tags:
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   195
	cd $(SOURCES); etags $(CFILES)
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   196
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   197
# This file must be compiled with the ARM instruction set, not
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   198
# thumb. Use devkitpro way of doing things.
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   199
arm_only: src/atomic/SDL_spinlock.arm.c
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   200
src/atomic/SDL_spinlock.arm.c: src/atomic/SDL_spinlock.c
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   201
	@cp $< $@
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   202
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   203
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   204
clean:
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   205
	@echo clean ...
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   206
	@cd src; rm -fr $(OFILES) $(OFILES:.o=.d) lib
5515
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   207
	@rm -f $(OUTPUT)
0fcf231a6e74 NDS update
Sam Lantinga <slouken@libsdl.org>
parents: 5428
diff changeset
   208
	@make -C test/nds-test-progs -s clean
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   209
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   210
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   211
else
2735
204be4fc2726 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   212
5423
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   213
DEPENDS	:=	$(OFILES:.o=.d)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   214
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   215
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   216
# main targets
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   217
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   218
$(OUTPUT)	:	$(OFILES)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   219
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   220
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   221
%.bin.o	:	%.bin
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   222
#---------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   223
	@echo $(notdir $<)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   224
	@$(bin2o)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   225
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   226
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   227
-include $(DEPENDS)
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   228
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   229
#---------------------------------------------------------------------------------------
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   230
endif
b69fa50e80d7 a Nintendo ds update
Sam Lantinga <slouken@libsdl.org>
parents: 5310
diff changeset
   231
#---------------------------------------------------------------------------------------