Tcl build fix
[gumsense-br.git] / package / sdl / sdl.mk
blobd4695b327f19f371e4225cef8c6eaa35a4f31a81
1 #############################################################
3 # SDL
5 #############################################################
6 SDL_VERSION:=1.2.9
7 SDL_SOURCE:=SDL-$(SDL_VERSION).tar.gz
8 SDL_SITE:=http://www.libsdl.org/release
9 SDL_CAT:=zcat
10 SDL_DIR:=$(BUILD_DIR)/SDL-$(SDL_VERSION)
12 $(DL_DIR)/$(SDL_SOURCE):
13 $(WGET) -P $(DL_DIR) $(SDL_SITE)/$(SDL_SOURCE)
15 sdl-source: $(DL_DIR)/$(SDL_SOURCE)
17 $(SDL_DIR)/.unpacked: $(DL_DIR)/$(SDL_SOURCE)
18 $(SDL_CAT) $(DL_DIR)/$(SDL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
19 touch $(SDL_DIR)/.unpacked
21 $(SDL_DIR)/.configured: $(SDL_DIR)/.unpacked
22 (cd $(SDL_DIR); \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS) " \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --prefix=$(STAGING_DIR)/usr \
30 --disable-esd \
31 --disable-nasm \
32 --disable-video-x11 );
33 touch $(SDL_DIR)/.configured
35 $(SDL_DIR)/.compiled: $(SDL_DIR)/.configured
36 $(MAKE) -C $(SDL_DIR)
37 touch $(SDL_DIR)/.compiled
39 $(STAGING_DIR)/usr/lib/libSDL.so: $(SDL_DIR)/.compiled
40 $(MAKE) -C $(SDL_DIR) install
41 (cd $(STAGING_DIR)/usr/bin; \
42 ln -sf $(GNU_TARGET_NAME)-sdl-config sdl-config );
43 touch -c $(STAGING_DIR)/usr/lib/libSDL.so
45 $(TARGET_DIR)/usr/lib/libSDL.so: $(STAGING_DIR)/usr/lib/libSDL.so
46 cp -dpf $(STAGING_DIR)/usr/lib/libSDL*.so* $(TARGET_DIR)/usr/lib/
47 -$(STRIP) $(TARGET_DIR)/usr/lib/libSDL.so
49 SDL sdl: uclibc $(TARGET_DIR)/usr/lib/libSDL.so
51 sdl-clean:
52 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SDL_DIR) uninstall
53 -$(MAKE) -C $(SDL_DIR) clean
55 sdl-dirclean:
56 rm -rf $(SDL_DIR)
58 #############################################################
60 # Toplevel Makefile options
62 #############################################################
63 ifeq ($(strip $(BR2_PACKAGE_SDL)),y)
64 TARGETS+=sdl
65 endif