2013-03-29 14:42:19 +00:00
|
|
|
include ports/sdl.inc
|
|
|
|
|
2013-05-25 12:50:46 +00:00
|
|
|
SDL_TGZ = $(SDL).tar.gz
|
|
|
|
SDL_SIG = $(SDL_TGZ).sig
|
|
|
|
SDL_BASE_URL = http://www.libsdl.org/release
|
|
|
|
SDL_URL = $(SDL_BASE_URL)/$(SDL_TGZ)
|
|
|
|
SDL_URL_SIG = $(SDL_BASE_URL)/$(SDL_SIG)
|
|
|
|
SDL_KEY = 1528635D8053A57F77D1E08630A59377A7763BE6
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Interface to top-level prepare Makefile
|
|
|
|
#
|
2013-03-29 14:42:19 +00:00
|
|
|
# Register SDL port as lower case to be consistent with the
|
2011-12-22 15:19:25 +00:00
|
|
|
# other libraries.
|
|
|
|
#
|
|
|
|
PORTS += sdl-$(SDL_VERSION)
|
|
|
|
|
2013-03-29 14:42:19 +00:00
|
|
|
prepare-sdl: $(CONTRIB_DIR)/$(SDL) include/SDL/SDL_platform.h
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
$(CONTRIB_DIR)/$(SDL): clean-sdl
|
|
|
|
|
|
|
|
#
|
|
|
|
# Port-specific local rules
|
|
|
|
#
|
|
|
|
$(DOWNLOAD_DIR)/$(SDL_TGZ):
|
|
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(SDL_URL) && touch $@
|
2013-06-10 09:38:52 +00:00
|
|
|
|
|
|
|
$(DOWNLOAD_DIR)/$(SDL_SIG):
|
2013-05-25 12:50:46 +00:00
|
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(SDL_URL_SIG) && touch $@
|
2013-06-06 14:49:56 +00:00
|
|
|
|
2013-06-10 09:38:52 +00:00
|
|
|
$(DOWNLOAD_DIR)/$(SDL_TGZ).verified: $(DOWNLOAD_DIR)/$(SDL_TGZ) \
|
|
|
|
$(DOWNLOAD_DIR)/$(SDL_SIG)
|
2013-05-25 12:50:46 +00:00
|
|
|
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(SDL_TGZ) $(DOWNLOAD_DIR)/$(SDL_SIG) $(SDL_KEY)
|
2013-06-06 14:49:56 +00:00
|
|
|
$(VERBOSE)touch $@
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2013-06-06 14:49:56 +00:00
|
|
|
$(CONTRIB_DIR)/$(SDL): $(DOWNLOAD_DIR)/$(SDL_TGZ).verified
|
|
|
|
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR) && touch $@
|
2011-12-22 15:19:25 +00:00
|
|
|
$(VERBOSE)rm -f $@/include/SDL_config.h
|
|
|
|
$(VERBOSE)patch -p0 -i src/lib/sdl/SDL_video.patch
|
2013-03-11 09:35:27 +00:00
|
|
|
$(VERBOSE)patch -d $(CONTRIB_DIR)/$(SDL) -p1 -i $(CURDIR)/src/lib/sdl/SDL_audio.patch
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Install SDL headers
|
|
|
|
#
|
2013-03-29 14:42:19 +00:00
|
|
|
# Use 'SDL_platform.h' as representative of the header files to be installed.
|
|
|
|
#
|
|
|
|
include/SDL/SDL_platform.h:
|
|
|
|
$(VERBOSE)mkdir -p $(dir $@)
|
|
|
|
$(VERBOSE)for i in `find $(CONTRIB_DIR)/$(SDL)/include -name "*.h"`; do \
|
2011-12-22 15:19:25 +00:00
|
|
|
ln -fs ../../$$i include/SDL/; done
|
2013-03-29 14:42:19 +00:00
|
|
|
$(VERBOSE)ln -fs ../../src/lib/sdl/SDL_config.h $(dir $@)
|
|
|
|
$(VERBOSE)ln -fs ../../src/lib/sdl/SDL_config_genode.h $(dir $@)
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
clean-sdl:
|
2013-03-29 14:42:19 +00:00
|
|
|
$(VERBOSE)for i in `find $(CONTRIB_DIR)/$(SDL)/include -name "*.h"`; do \
|
|
|
|
rm -f include/SDL/`basename $$i`; done
|
|
|
|
$(VERBOSE)rm -f $(addprefix include/SDL/,SDL_config_genode.h SDL_config.h)
|
|
|
|
$(VERBOSE)rmdir include/SDL 2>/dev/null || true
|
2011-12-22 15:19:25 +00:00
|
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(SDL)
|