Home | History | Annotate | Download | only in sdl-1.2.15
      1 # This is included from the main Android emulator build script
      2 # to declare the SDL-related sources, compiler flags and libraries
      3 #
      4 
      5 SDL_CFLAGS :=
      6 SDL_LDLIBS :=
      7 SDL_STATIC_LIBRARIES :=
      8 
      9 SDL_SOURCES :=
     10 
     11 ifeq ($(HOST_OS),linux)
     12     SDL_CONFIG_LOADSO_DLOPEN := yes
     13     SDL_CONFIG_THREAD_PTHREAD := yes
     14     SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX_NP := yes
     15     SDL_CONFIG_TIMER_UNIX := yes
     16     SDL_CONFIG_VIDEO_X11 := yes
     17     SDL_CONFIG_VIDEO_X11_DPMS := yes
     18     SDL_CONFIG_VIDEO_X11_XINERAMA := yes
     19     SDL_CONFIG_VIDEO_X11_XME := yes
     20     SDL_CONFIG_MAIN_DUMMY := yes
     21 
     22     SDL_CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT
     23     SDL_LDLIBS += -lm -ldl -lpthread -lrt
     24 endif
     25 
     26 ifeq ($(HOST_OS),freebsd)
     27     SDL_CONFIG_LOADSO_DLOPEN := yes
     28     SDL_CONFIG_THREAD_PTHREAD := yes
     29     SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX := yes
     30     SDL_CONFIG_TIMER_UNIX := yes
     31     SDL_CONFIG_VIDEO_X11 := yes
     32     SDL_CONFIG_VIDEO_X11_DPMS := yes
     33     SDL_CONFIG_VIDEO_X11_XINERAMA := yes
     34     SDL_CONFIG_VIDEO_X11_XME := yes
     35     SDL_CONFIG_MAIN_DUMMY := yes
     36 
     37     SDL_CFLAGS += -D_GNU_SOURCE=1 -D_REENTRANT
     38     SDL_LDLIBS += -lm -ldl -lpthread
     39 endif
     40 
     41 ifeq ($(HOST_OS),darwin)
     42     SDL_CONFIG_LOADSO_DLCOMPAT := yes
     43     SDL_CONFIG_THREAD_PTHREAD := yes
     44     SDL_CONFIG_THREAD_PTHREAD_RECURSIVE_MUTEX := yes
     45     SDL_CONFIG_TIMER_UNIX := yes
     46     SDL_CONFIG_VIDEO_QUARTZ := yes
     47     SDL_CONFIG_MAIN_MACOSX := yes
     48 
     49     SDL_CFLAGS += -D_GNU_SOURCE=1 -DTHREAD_SAFE
     50     FRAMEWORKS := OpenGL Cocoa QuickTime ApplicationServices Carbon IOKit
     51     SDL_LDLIBS += $(FRAMEWORKS:%=-Wl,-framework,%)
     52 endif
     53 
     54 ifeq ($(HOST_OS),windows)
     55     SDL_CONFIG_LOADSO_WIN32 := yes
     56     SDL_CONFIG_THREAD_WIN32 := yes
     57     SDL_CONFIG_TIMER_WIN32 := yes
     58     SDL_CONFIG_VIDEO_WINDIB := yes
     59     SDL_CONFIG_MAIN_WIN32 := yes
     60 
     61     SDL_CFLAGS += -D_GNU_SOURCE=1 -Dmain=SDL_main -DNO_STDIO_REDIRECT=1
     62     SDL_LDLIBS += -luser32 -lgdi32 -lwinmm
     63 endif
     64 
     65 
     66 # the main src/ sources
     67 #
     68 SRCS := SDL.c \
     69         SDL_error.c \
     70         SDL_fatal.c \
     71 
     72 SRCS += events/SDL_active.c \
     73 	events/SDL_events.c \
     74 	events/SDL_expose.c \
     75 	events/SDL_keyboard.c \
     76 	events/SDL_mouse.c \
     77 	events/SDL_quit.c \
     78 	events/SDL_resize.c \
     79 
     80 SRCS += file/SDL_rwops.c
     81 
     82 SRCS += stdlib/SDL_getenv.c \
     83         stdlib/SDL_iconv.c \
     84         stdlib/SDL_malloc.c \
     85         stdlib/SDL_qsort.c \
     86         stdlib/SDL_stdlib.c \
     87         stdlib/SDL_string.c
     88 
     89 SRCS += cpuinfo/SDL_cpuinfo.c
     90 
     91 SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/%)
     92 
     93 # the LoadSO sources
     94 #
     95 
     96 SRCS :=
     97 
     98 ifeq ($(SDL_CONFIG_LOADSO_DLOPEN),yes)
     99   SRCS += dlopen/SDL_sysloadso.c
    100   SDL_LDLIBS += -ldl
    101 endif
    102 
    103 ifeq ($(SDL_CONFIG_LOADSO_DLCOMPAT),yes)
    104   SRCS += macosx/SDL_dlcompat.c
    105 endif
    106 
    107 ifeq ($(SDL_CONFIG_LOADSO_WIN32),yes)
    108   SRCS += win32/SDL_sysloadso.c
    109 endif
    110 
    111 SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/loadso/%)
    112 
    113 # the Thread sources
    114 #
    115 
    116 SRCS := SDL_thread.c
    117 
    118 ifeq ($(SDL_CONFIG_THREAD_PTHREAD),yes)
    119   SRCS += pthread/SDL_syscond.c \
    120           pthread/SDL_sysmutex.c \
    121           pthread/SDL_syssem.c \
    122           pthread/SDL_systhread.c
    123 endif
    124 
    125 ifeq ($(SDL_CONFIG_THREAD_WIN32),yes)
    126   SRCS += win32/SDL_sysmutex.c \
    127           win32/SDL_syssem.c \
    128           win32/SDL_systhread.c
    129 endif
    130 
    131 SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/thread/%)
    132 
    133 # the Timer sources
    134 #
    135 
    136 SRCS := SDL_timer.c
    137 
    138 ifeq ($(SDL_CONFIG_TIMER_UNIX),yes)
    139   SRCS += unix/SDL_systimer.c
    140 endif
    141 
    142 ifeq ($(SDL_CONFIG_TIMER_WIN32),yes)
    143   SRCS += win32/SDL_systimer.c
    144 endif
    145 
    146 SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/timer/%)
    147 
    148 # the Video sources
    149 #
    150 
    151 SRCS := SDL_RLEaccel.c \
    152 	SDL_blit.c \
    153 	SDL_blit_0.c \
    154 	SDL_blit_1.c \
    155 	SDL_blit_A.c \
    156 	SDL_blit_N.c \
    157 	SDL_bmp.c \
    158 	SDL_cursor.c \
    159 	SDL_gamma.c \
    160 	SDL_pixels.c \
    161 	SDL_stretch.c \
    162 	SDL_surface.c \
    163 	SDL_video.c \
    164 	SDL_yuv.c \
    165 	SDL_yuv_mmx.c \
    166 	SDL_yuv_sw.c \
    167 
    168 SRCS += dummy/SDL_nullevents.c \
    169         dummy/SDL_nullmouse.c \
    170         dummy/SDL_nullvideo.c
    171 
    172 ifeq ($(SDL_CONFIG_VIDEO_WINDIB),yes)
    173   SRCS += windib/SDL_dibevents.c \
    174           windib/SDL_dibvideo.c \
    175           wincommon/SDL_sysevents.c \
    176           wincommon/SDL_sysmouse.c \
    177           wincommon/SDL_syswm.c \
    178           wincommon/SDL_wingl.c
    179 endif
    180 
    181 ifeq ($(SDL_CONFIG_VIDEO_QUARTZ),yes)
    182   SRCS += quartz/SDL_QuartzGL.m \
    183           quartz/SDL_QuartzVideo.m \
    184           quartz/SDL_QuartzWM.m \
    185           quartz/SDL_QuartzWindow.m \
    186           quartz/SDL_QuartzEvents.m
    187 endif
    188 
    189 ifeq ($(SDL_CONFIG_VIDEO_X11),yes)
    190   SRCS += x11/SDL_x11dyn.c \
    191           x11/SDL_x11dga.c \
    192           x11/SDL_x11events.c \
    193           x11/SDL_x11gamma.c \
    194           x11/SDL_x11gl.c \
    195           x11/SDL_x11image.c \
    196           x11/SDL_x11modes.c \
    197           x11/SDL_x11mouse.c \
    198           x11/SDL_x11video.c \
    199           x11/SDL_x11wm.c \
    200           x11/SDL_x11yuv.c
    201 endif
    202 
    203 ifeq ($(SDL_CONFIG_VIDEO_X11_DGAMOUSE),yes)
    204   SRCS += x11/SDL_x11dga.c
    205 endif
    206 
    207 ifeq ($(SDL_CONFIG_VIDEO_X11_XME),yes)
    208   SRCS += Xext/XME/xme.c
    209 endif
    210 
    211 ifeq ($(SDL_CONFIG_VIDEO_X11_XINERAMA),yes)
    212   SRCS += Xext/Xinerama/Xinerama.c
    213 endif
    214 
    215 ifeq ($(SDL_CONFIG_VIDEO_X11_XV),yes)
    216   SRCS += Xext/Xv/Xv.c
    217 endif
    218 
    219 SDL_SOURCES += $(SRCS:%=$(SDL_DIR)/src/video/%)
    220 
    221 ## Build libSDLmain
    222 ##
    223 
    224 SRCS :=
    225 
    226 ifeq ($(SDL_CONFIG_MAIN_DUMMY),yes)
    227   SRCS += dummy/SDL_dummy_main.c
    228 endif
    229 
    230 ifeq ($(SDL_CONFIG_MAIN_MACOSX),yes)
    231   SRCS += macosx/SDLMain.m
    232 endif
    233 
    234 ifeq ($(SDL_CONFIG_MAIN_WIN32),yes)
    235   SRCS += win32/SDL_win32_main.c
    236 endif
    237 
    238 SDLMAIN_SOURCES := $(SRCS:%=$(SDL_DIR)/src/main/%)
    239