Home | History | Annotate | Download | only in sdl-1.2.15
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 SDL_DIR := $(LOCAL_PATH)
      4 include $(SDL_DIR)/sources.make
      5 
      6 CONFIG_DIRS     := \
      7     $(LOCAL_PATH)/objs \
      8     $(LOCAL_PATH)/include \
      9     $(LOCAL_PATH) \
     10 
     11 CONFIG_INCLUDES := $(CONFIG_DIRS:%=-I%)
     12 
     13 MY_CC      := $(CC)
     14 MY_LD      := $(LD)
     15 MY_CFLAGS  := $(CFLAGS) $(CONFIG_INCLUDES)
     16 MY_LDFLAGS := $(LDFLAGS)
     17 
     18 include $(CLEAR_VARS)
     19 
     20 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
     21 LOCAL_CC                        := $(MY_CC)
     22 LOCAL_CFLAGS                    := $(MY_CFLAGS) $(LOCAL_CFLAGS)
     23 LOCAL_LDFLAGS                   := $(MY_LDFLAGS) $(LOCAL_LDFLAGS)
     24 
     25 LOCAL_MODULE := libSDL
     26 
     27 LOCAL_SRC_FILES := $(SDL_SOURCES)
     28 
     29 include $(BUILD_HOST_STATIC_LIBRARY)
     30 
     31 ## Build libSDLmain
     32 ##
     33 
     34 include $(CLEAR_VARS)
     35 
     36 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
     37 LOCAL_CC                        := $(MY_CC)
     38 LOCAL_CFLAGS                    := $(MY_CFLAGS) $(LOCAL_CFLAGS)
     39 LOCAL_LDFLAGS                   := $(MY_LDFLAGS) $(LOCAL_LDFLAGS)
     40 
     41 LOCAL_MODULE := libSDLmain
     42 
     43 LOCAL_SRC_FILES := $(SDLMAIN_SOURCES)
     44 
     45 include $(BUILD_HOST_STATIC_LIBRARY)
     46 
     47 # handle installation of generated files
     48 #
     49 
     50 SDL_HEADERS := \
     51 	SDL.h \
     52 	SDL_active.h \
     53 	SDL_audio.h \
     54 	SDL_byteorder.h \
     55 	SDL_cdrom.h \
     56 	SDL_copying.h \
     57 	SDL_cpuinfo.h \
     58 	SDL_endian.h \
     59 	SDL_error.h \
     60 	SDL_events.h \
     61 	SDL_getenv.h \
     62 	SDL_joystick.h \
     63 	SDL_keyboard.h \
     64 	SDL_keysym.h \
     65 	SDL_loadso.h \
     66 	SDL_main.h \
     67 	SDL_mouse.h \
     68 	SDL_mutex.h \
     69 	SDL_name.h \
     70 	SDL_opengl.h \
     71 	SDL_platform.h \
     72 	SDL_quit.h \
     73 	SDL_rwops.h \
     74 	SDL_stdinc.h \
     75 	SDL_syswm.h \
     76 	SDL_thread.h \
     77 	SDL_timer.h \
     78 	SDL_types.h \
     79 	SDL_version.h \
     80 	SDL_video.h \
     81 	begin_code.h \
     82 	close_code.h \
     83 
     84 
     85 $(foreach target,$(INSTALL_TARGETS),\
     86   $(eval $(call install-target,objs/sdl-config,$(target)/bin/sdl-config)) \
     87   $(eval $(call install-target,objs/SDL_config.h,$(target)/include/SDL/SDL_config.h)) \
     88   $(eval $(call install-target,objs/libs/libSDL.a,$(target)/libs/libSDL.a)) \
     89   $(eval $(call install-target,objs/libs/libSDLmain.a,$(target)/libs/libSDLmain.a)) \
     90   $(foreach header,$(SDL_HEADERS), \
     91     $(eval $(call install-target,include/$(header),$(target)/include/SDL/$(header))) \
     92   ) \
     93 )
     94