aboutsummaryrefslogtreecommitdiffstats
path: root/distrib/sdl-1.2.15/Makefile.android
blob: 2dfa7dd26fe7fc0e5c4b24a3ec0656d3056ea792 (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
LOCAL_PATH:= $(call my-dir)

SDL_DIR := $(LOCAL_PATH)
include $(SDL_DIR)/sources.make

CONFIG_DIRS     := \
    $(LOCAL_PATH)/objs \
    $(LOCAL_PATH)/include \
    $(LOCAL_PATH) \

CONFIG_INCLUDES := $(CONFIG_DIRS:%=-I%)

MY_CC      := $(CC)
MY_LD      := $(LD)
MY_CFLAGS  := $(CFLAGS) $(CONFIG_INCLUDES)
MY_LDFLAGS := $(LDFLAGS)

include $(CLEAR_VARS)

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
LOCAL_CC                        := $(MY_CC)
LOCAL_CFLAGS                    := $(MY_CFLAGS) $(LOCAL_CFLAGS)
LOCAL_LDFLAGS                   := $(MY_LDFLAGS) $(LOCAL_LDFLAGS)

LOCAL_MODULE := libSDL

LOCAL_SRC_FILES := $(SDL_SOURCES)

include $(BUILD_HOST_STATIC_LIBRARY)

## Build libSDLmain
##

include $(CLEAR_VARS)

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
LOCAL_CC                        := $(MY_CC)
LOCAL_CFLAGS                    := $(MY_CFLAGS) $(LOCAL_CFLAGS)
LOCAL_LDFLAGS                   := $(MY_LDFLAGS) $(LOCAL_LDFLAGS)

LOCAL_MODULE := libSDLmain

LOCAL_SRC_FILES := $(SDLMAIN_SOURCES)

include $(BUILD_HOST_STATIC_LIBRARY)

# handle installation of generated files
#

SDL_HEADERS := \
	SDL.h \
	SDL_active.h \
	SDL_audio.h \
	SDL_byteorder.h \
	SDL_cdrom.h \
	SDL_copying.h \
	SDL_cpuinfo.h \
	SDL_endian.h \
	SDL_error.h \
	SDL_events.h \
	SDL_getenv.h \
	SDL_joystick.h \
	SDL_keyboard.h \
	SDL_keysym.h \
	SDL_loadso.h \
	SDL_main.h \
	SDL_mouse.h \
	SDL_mutex.h \
	SDL_name.h \
	SDL_opengl.h \
	SDL_platform.h \
	SDL_quit.h \
	SDL_rwops.h \
	SDL_stdinc.h \
	SDL_syswm.h \
	SDL_thread.h \
	SDL_timer.h \
	SDL_types.h \
	SDL_version.h \
	SDL_video.h \
	begin_code.h \
	close_code.h \


$(foreach target,$(INSTALL_TARGETS),\
  $(eval $(call install-target,objs/sdl-config,$(target)/bin/sdl-config)) \
  $(eval $(call install-target,objs/SDL_config.h,$(target)/include/SDL/SDL_config.h)) \
  $(eval $(call install-target,objs/libs/libSDL.a,$(target)/libs/libSDL.a)) \
  $(eval $(call install-target,objs/libs/libSDLmain.a,$(target)/libs/libSDLmain.a)) \
  $(foreach header,$(SDL_HEADERS), \
    $(eval $(call install-target,include/$(header),$(target)/include/SDL/$(header))) \
  ) \
)