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
|
#############################################################
#
# SDL_image addon for SDL
#
#############################################################
SDL_IMAGE_VERSION:=1.2.6
SDL_IMAGE_SOURCE:=SDL_image-$(SDL_IMAGE_VERSION).tar.gz
SDL_IMAGE_SITE:=http://www.libsdl.org/projects/SDL_image/release
SDL_IMAGE_CAT:=$(ZCAT)
SDL_IMAGE_DIR:=$(BUILD_DIR)/SDL_image-$(SDL_IMAGE_VERSION)
ifeq ($(BR2_PACKAGE_SDL_IMAGE_BMP),y)
SDL_IMAGE_BMP=--enable-bmp
else
SDL_IMAGE_BMP=--enable-bmp=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_GIF),y)
SDL_IMAGE_GIF=--enable-gif
else
SDL_IMAGE_GIF=--enable-gif=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_JPEG),y)
SDL_IMAGE_OPTIONAL_DEPENDS+=$(STAGING_DIR)/usr/lib/libjpeg.a
SDL_IMAGE_JPEG=--enable-jpg
else
SDL_IMAGE_JPEG=--enable-jpg=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_LBM),y)
SDL_IMAGE_LBM=--enable-lbm
else
SDL_IMAGE_LBM=--enable-lbm=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_PCX),y)
SDL_IMAGE_PCX=--enable-pcx
else
SDL_IMAGE_PCX=--enable-pcx=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_PNG),y)
SDL_IMAGE_OPTIONAL_DEPENDS+=$(STAGING_DIR)/usr/lib/libpng.so
SDL_IMAGE_PNG=--enable-png
else
SDL_IMAGE_PNG=--enable-png=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_PNM),y)
SDL_IMAGE_PNM=--enable-pnm
else
SDL_IMAGE_PNM=--enable-pnm=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_TARGA),y)
SDL_IMAGE_TARGA=--enable-tga
else
SDL_IMAGE_TARGA=--enable-tga=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_TIFF),y)
SDL_IMAGE_OPTIONAL_DEPENDS+=$(STAGING_DIR)/usr/lib/libtiff.so
SDL_IMAGE_TIFF=--enable-tif
else
SDL_IMAGE_TIFF=--enable-tif=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_XCF),y)
SDL_IMAGE_XCF=--enable-xcf
else
SDL_IMAGE_XCF=--enable-xcf=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_XPM),y)
SDL_IMAGE_XPM=--enable-xpm
else
SDL_IMAGE_XPM=--enable-xpm=no
endif
ifeq ($(BR2_PACKAGE_SDL_IMAGE_XV),y)
SDL_IMAGE_XV=--enable-xv
else
SDL_IMAGE_XV=--enable-xv=no
endif
$(DL_DIR)/$(SDL_IMAGE_SOURCE):
$(WGET) -P $(DL_DIR) $(SDL_IMAGE_SITE)/$(SDL_IMAGE_SOURCE)
sdl_image-source: $(DL_DIR)/$(SDL_IMAGE_SOURCE)
$(SDL_IMAGE_DIR)/.unpacked: $(DL_DIR)/$(SDL_IMAGE_SOURCE)
$(SDL_IMAGE_CAT) $(DL_DIR)/$(SDL_IMAGE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(SDL_IMAGE_DIR) package/sdl_image sdl_image-$(SDL_IMAGE_VERSION)\*.patch
$(CONFIG_UPDATE) $(SDL_IMAGE_DIR)
touch $@
$(SDL_IMAGE_DIR)/.configured: $(SDL_IMAGE_DIR)/.unpacked $(SDL_IMAGE_OPTIONAL_DEPENDS)
(cd $(SDL_IMAGE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR)/usr \
--with-sdl-prefix=$(STAGING_DIR)/usr \
--with-sdl-exec-prefix=$(STAGING_DIR)/usr \
--disable-sdltest \
--disable-static \
$(SDL_IMAGE_BMP) \
$(SDL_IMAGE_GIF) \
$(SDL_IMAGE_JPEG) \
$(SDL_IMAGE_LBM) \
$(SDL_IMAGE_PCX) \
$(SDL_IMAGE_PNG) \
$(SDL_IMAGE_PNM) \
$(SDL_IMAGE_TARGA) \
$(SDL_IMAGE_TIFF) \
$(SDL_IMAGE_XCF) \
$(SDL_IMAGE_XPM) \
$(SDL_IMAGE_XV) \
);
touch $@
$(SDL_IMAGE_DIR)/.compiled: $(SDL_IMAGE_DIR)/.configured
$(MAKE) -C $(SDL_IMAGE_DIR)
touch $@
$(STAGING_DIR)/usr/lib/libSDL_image.so: $(SDL_IMAGE_DIR)/.compiled
$(MAKE) -C $(SDL_IMAGE_DIR) install
touch -c $@
$(TARGET_DIR)/usr/lib/libSDL_image.so: $(STAGING_DIR)/usr/lib/libSDL_image.so
cp -dpf $(STAGING_DIR)/usr/lib/libSDL_image*.so* $(TARGET_DIR)/usr/lib/
-$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_image.so
sdl_image: uclibc sdl $(TARGET_DIR)/usr/lib/libSDL_image.so
sdl_image-clean:
-rm -f $(TARGET_DIR)/usr/lib/libSDL_image*.so*
-$(MAKE) -C $(SDL_IMAGE_DIR) uninstall
-$(MAKE) -C $(SDL_IMAGE_DIR) clean
sdl_image-dirclean:
rm -rf $(SDL_IMAGE_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_SDL_IMAGE)),y)
TARGETS+=sdl_image
endif
|