aboutsummaryrefslogtreecommitdiffstats
path: root/distrib/sdl-1.2.12/sources.make
blob: dadcb3fa30bc38a10b5ae48878095e931531a219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# This is included from the main Android emulator build script
# to declare the SDL-related sources, compiler flags and libraries
#

SDL_CFLAGS :=
SDL_LDLIBS :=
SDL_STATIC_LIBRARIES :=

SDL_SOURCES :=

ifeq ($(HOST_OS),linux)
    SDL_CONFIG_LOADSO_DLOPEN := yes
    SDL_CONFIG_THREAD_PTHREAD := yes
    SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX_NP := yes
    SDL_CONFIG_TIMER_UNIX := yes
    SDL_CONFIG_VIDEO_X11 := yes
    SDL_CONFIG_VIDEO_X11_DPMS := yes
    SDL_CONFIG_VIDEO_X11_XINERAMA := yes
    SDL_CONFIG_VIDEO_X11_XME := yes
    SDL_CONFIG_MAIN_DUMMY := yes

    SDL_CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT
    SDL_LDLIBS += -lm -ldl -lpthread -lrt
endif

ifeq ($(HOST_OS),freebsd)
    SDL_CONFIG_LOADSO_DLOPEN := yes
    SDL_CONFIG_THREAD_PTHREAD := yes
    SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX := yes
    SDL_CONFIG_TIMER_UNIX := yes
    SDL_CONFIG_VIDEO_X11 := yes
    SDL_CONFIG_VIDEO_X11_DPMS := yes
    SDL_CONFIG_VIDEO_X11_XINERAMA := yes
    SDL_CONFIG_VIDEO_X11_XME := yes
    SDL_CONFIG_MAIN_DUMMY := yes

    SDL_CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT
    SDL_LDLIBS += -lm -ldl -lpthread
endif

ifeq ($(HOST_OS),darwin)
    SDL_CONFIG_LOADSO_DLCOMPAT := yes
    SDL_CONFIG_THREAD_PTHREAD := yes
    SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX := yes
    SDL_CONFIG_TIMER_UNIX := yes
    SDL_CONFIG_VIDEO_QUARTZ := yes
    SDL_CONFIG_MAIN_MACOSX := yes

    SDL_CFLAGS += -D_GNU_SOURCE=1 -DTHREAD_SAFE
    FRAMEWORKS := OpenGL Cocoa QuickTime ApplicationServices Carbon IOKit
    SDL_LDLIBS += $(FRAMEWORKS:%=-Wl,-framework,%)
endif

ifeq ($(HOST_OS),windows)
    SDL_CONFIG_LOADSO_WIN32 := yes
    SDL_CONFIG_THREAD_WIN32 := yes
    SDL_CONFIG_TIMER_WIN32 := yes
    SDL_CONFIG_VIDEO_WINDIB := yes
    SDL_CONFIG_MAIN_WIN32 := yes

    SDL_CFLAGS += -D_GNU_SOURCE=1 -Dmain=SDL_main -DNO_STDIO_REDIRECT=1
    SDL_LDLIBS += -luser32 -lgdi32 -lwinmm
endif


# the main src/ sources
#
SRCS := SDL.c \
        SDL_error.c \
        SDL_fatal.c \

SRCS += events/SDL_active.c \
	events/SDL_events.c \
	events/SDL_expose.c \
	events/SDL_keyboard.c \
	events/SDL_mouse.c \
	events/SDL_quit.c \
	events/SDL_resize.c \

SRCS += file/SDL_rwops.c

SRCS += stdlib/SDL_getenv.c \
        stdlib/SDL_iconv.c \
        stdlib/SDL_malloc.c \
        stdlib/SDL_qsort.c \
        stdlib/SDL_stdlib.c \
        stdlib/SDL_string.c

SRCS += cpuinfo/SDL_cpuinfo.c

SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/%)

# the LoadSO sources
#

SRCS :=

ifeq ($(SDL_CONFIG_LOADSO_DLOPEN),yes)
  SRCS += dlopen/SDL_sysloadso.c
  SDL_LDLIBS += -ldl
endif

ifeq ($(SDL_CONFIG_LOADSO_DLCOMPAT),yes)
  SRCS += macosx/SDL_dlcompat.c
endif

ifeq ($(SDL_CONFIG_LOADSO_WIN32),yes)
  SRCS += win32/SDL_sysloadso.c
endif

SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/loadso/%)

# the Thread sources
#

SRCS := SDL_thread.c

ifeq ($(SDL_CONFIG_THREAD_PTHREAD),yes)
  SRCS += pthread/SDL_syscond.c \
          pthread/SDL_sysmutex.c \
          pthread/SDL_syssem.c \
          pthread/SDL_systhread.c
endif

ifeq ($(SDL_CONFIG_THREAD_WIN32),yes)
  SRCS += win32/SDL_sysmutex.c \
          win32/SDL_syssem.c \
          win32/SDL_systhread.c
endif

SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/thread/%)

# the Timer sources
#

SRCS := SDL_timer.c

ifeq ($(SDL_CONFIG_TIMER_UNIX),yes)
  SRCS += unix/SDL_systimer.c
endif

ifeq ($(SDL_CONFIG_TIMER_WIN32),yes)
  SRCS += win32/SDL_systimer.c
endif

SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/timer/%)

# the Video sources
#

SRCS := SDL_RLEaccel.c \
	SDL_blit.c \
	SDL_blit_0.c \
	SDL_blit_1.c \
	SDL_blit_A.c \
	SDL_blit_N.c \
	SDL_bmp.c \
	SDL_cursor.c \
	SDL_gamma.c \
	SDL_pixels.c \
	SDL_stretch.c \
	SDL_surface.c \
	SDL_video.c \
	SDL_yuv.c \
	SDL_yuv_mmx.c \
	SDL_yuv_sw.c \

SRCS += dummy/SDL_nullevents.c \
        dummy/SDL_nullmouse.c \
        dummy/SDL_nullvideo.c

ifeq ($(SDL_CONFIG_VIDEO_WINDIB),yes)
  SRCS += windib/SDL_dibevents.c \
          windib/SDL_dibvideo.c \
          wincommon/SDL_sysevents.c \
          wincommon/SDL_sysmouse.c \
          wincommon/SDL_syswm.c \
          wincommon/SDL_wingl.c
endif

ifeq ($(SDL_CONFIG_VIDEO_QUARTZ),yes)
  SRCS += quartz/SDL_QuartzGL.m \
          quartz/SDL_QuartzVideo.m \
          quartz/SDL_QuartzWM.m \
          quartz/SDL_QuartzWindow.m \
          quartz/SDL_QuartzYUV.m \
          quartz/SDL_QuartzEvents.m \
          maccommon/SDL_macevents.c \
          maccommon/SDL_macgl.c \
          maccommon/SDL_macmouse.c \
          maccommon/SDL_macwm.c

endif

ifeq ($(SDL_CONFIG_VIDEO_X11),yes)
  SRCS += x11/SDL_x11dyn.c \
          x11/SDL_x11dga.c \
          x11/SDL_x11events.c \
          x11/SDL_x11gamma.c \
          x11/SDL_x11gl.c \
          x11/SDL_x11image.c \
          x11/SDL_x11modes.c \
          x11/SDL_x11mouse.c \
          x11/SDL_x11video.c \
          x11/SDL_x11wm.c \
          x11/SDL_x11yuv.c
endif

ifeq ($(SDL_CONFIG_VIDEO_X11_DGAMOUSE),yes)
  SRCS += x11/SDL_x11dga.c
endif

ifeq ($(SDL_CONFIG_VIDEO_X11_XME),yes)
  SRCS += Xext/XME/xme.c
endif

ifeq ($(SDL_CONFIG_VIDEO_X11_XINERAMA),yes)
  SRCS += Xext/Xinerama/Xinerama.c
endif

ifeq ($(SDL_CONFIG_VIDEO_X11_XV),yes)
  SRCS += Xext/Xv/Xv.c
endif

SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/video/%)

## Build libSDLmain
##

SRCS :=

ifeq ($(SDL_CONFIG_MAIN_DUMMY),yes)
  SRCS += dummy/SDL_dummy_main.c
endif

ifeq ($(SDL_CONFIG_MAIN_MACOSX),yes)
  SRCS += macosx/SDLMain.m
endif

ifeq ($(SDL_CONFIG_MAIN_WIN32),yes)
  SRCS += win32/SDL_win32_main.c
endif

SDLMAIN_SOURCES := $(SRCS:%=$(SDL_DIR)/src/main/%)