1################################################################################ 2# 3# prboom 4# 5################################################################################ 6 7PRBOOM_VERSION = 2.5.0 8PRBOOM_SITE = http://downloads.sourceforge.net/project/prboom/prboom%20stable/$(PRBOOM_VERSION) 9PRBOOM_CONF_ENV = ac_cv_type_uid_t=yes 10PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer 11PRBOOM_LICENSE = GPL-2.0+ 12PRBOOM_LICENSE_FILES = COPYING 13PRBOOM_AUTORECONF = YES 14 15PRBOOM_CFLAGS = $(TARGET_CFLAGS) 16 17ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) 18PRBOOM_CFLAGS += -O0 19endif 20 21PRBOOM_CONF_ENV += CFLAGS="$(PRBOOM_CFLAGS)" 22 23ifeq ($(BR2_PACKAGE_LIBPNG),y) 24PRBOOM_DEPENDENCIES += libpng 25endif 26 27ifeq ($(BR2_STATIC_LIBS),y) 28# SDL_mixer uses symbols from SDL, but ends up after it on the link 29# cmdline. Fix it by forcing the SDL libs at the very end 30PRBOOM_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/sdl-config --static-libs`" 31endif 32 33PRBOOM_CONF_OPTS = \ 34 --oldincludedir=$(STAGING_DIR)/usr/include \ 35 --with-sdl-prefix=$(STAGING_DIR)/usr \ 36 --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ 37 --disable-cpu-opt \ 38 --disable-sdltest \ 39 --disable-gl 40 41# endianness detection isn't used when cross compiling 42define PRBOOM_BIG_ENDIAN_FIXUP 43 $(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \ 44 $(PRBOOM_DIR)/config.h 45endef 46 47ifeq ($(BR2_ENDIAN),"BIG") 48PRBOOM_POST_CONFIGURE_HOOKS += PRBOOM_BIG_ENDIAN_FIXUP 49endif 50 51define PRBOOM_INSTALL_TARGET_CMDS 52 $(INSTALL) -D $(@D)/src/prboom $(TARGET_DIR)/usr/games/prboom 53 $(INSTALL) -D $(@D)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server 54 $(INSTALL) -D $(@D)/data/prboom.wad $(TARGET_DIR)/usr/share/games/doom/prboom.wad 55endef 56 57$(eval $(autotools-package)) 58