summaryrefslogtreecommitdiff
path: root/package/games/prboom/prboom.mk
blob: 228c78886de1146a34301c4968efd2a9a3828e1d (plain)
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
#############################################################
#
# PrBoom
#
#############################################################
PRBOOM_VERSION = 2.4.7
PRBOOM_DEPENDENCIES = sdl SDL_net sdl_mixer

PRBOOM_CONF_OPT = \
		--oldincludedir=$(STAGING_DIR)/usr/include \
		--with-sdl-prefix=$(STAGING_DIR)/usr \
		--with-sdl-exec-prefix=$(STAGING_DIR)/usr \
		--disable-cpu-opt \
		--disable-sdltest \
		--disable-gl \
		--without-x

define PRBOOM_BIG_ENDIAN_FIXUP
	$(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' $(PRBOOM_DIR)/config.h
endef

ifeq ($(BR2_ENDIAN),"BIG")
PRBOOM_POST_CONFIGURE_HOOKS += PRBOOM_BIG_ENDIAN_FIXUP
endif

define PRBOOM_INSTALL_TARGET_CMDS
	$(INSTALL) -D $(@D)/src/prboom $(TARGET_DIR)/usr/games/prboom
	$(INSTALL) -D $(@D)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server
	$(INSTALL) -D $(@D)/data/prboom.wad $(TARGET_DIR)/usr/share/games/doom/prboom.wad
endef

define PRBOOM_UINSTALL_TARGET_CMDS
	rm -rf $(TARGET_DIR)/usr/share/games/doom/prboom.wad \
		$(TARGET_DIR)/usr/games/prboom-game-server \
		$(TARGET_DIR)/usr/games/prboom
endef

$(eval $(call AUTOTARGETS,package/games,prboom))