⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 symbian 的一个 二维飞行游戏 源码 及相关技术文章
💻
字号:
LEVELS=$(subst _data,,$(wildcard *.lev_data))
MAPS=$(subst _data,,$(wildcard *.map_data))
RELEASETO=/camera/System/Apps/Game

all: $(LEVELS) $(MAPS)

release: all
	cp $(LEVELS) $(MAPS) $(RELEASETO)

clean: FORCE
	rm -rf *.lev_inc
	rm -rf *.map_inc
	rm -f spriteGrab
	rm -f levelGen
	rm -f mapGen
	rm -rf *.map
	rm -rf *.lev
	rm -rf tmp.*

eject: release
	sudo cardctl eject


# level file generation
## uid <appuid>,1,<level no>

%.lev: %.lev_inc/backgrounds.h %.lev_inc/sprites.h %.lev_inc/status.h levelGen.cpp
	g++ -I../code/gameinc/ -I $(@:.lev=.lev_inc) levelGen.cpp -o levelGen
	wine -- $(EPOCROOT)/epoc32/tools/uidcrc.exe $(shell perl uid.pl $(@)) tmp.uid
	levelGen tmp.level
	cat tmp.uid tmp.level > $(@)
	rm -f levelGen
	rm -f tmp.uid tmp.level
	rm -rf $(@)_inc

%.lev_inc/backgrounds.h: %.lev_data/backgrounds spriteGrab
	mkdir -p $(@D)
	(cd $(<) ; ../../spriteGrab KBackgrounds 0*.ppm) > $@

%.lev_inc/sprites.h: %.lev_data/ships spriteGrab
	mkdir -p $(@D)
	(cd $(<) ; ../../spriteGrab KSprites 0*.ppm) > $@

%.lev_inc/status.h: %.lev_data/status %.lev_data/status/header.h spriteGrab
	mkdir -p $(@D)
	cat $(filter %.h,$^) > $@
	(cd $(<) ; ../../spriteGrab -noheader KStatus *.ppm) >> $@



# map file generation
## uid <appuid>,2,<level no>

%.map: %.map_data/header.h %.map_data/map.h %.map_data/paths.h mapGen.cpp
	g++ -I../code/gameinc/ -I $(@:.map=.map_data) mapGen.cpp -o mapGen
	wine -- $(EPOCROOT)/epoc32/tools/uidcrc.exe $(shell perl uid.pl $(@)) tmp.uid
	mapGen tmp.map
	cat tmp.uid tmp.map > $(@)
	rm -f mapGen
	rm -f tmp.uid tmp.map

spriteGrab: spriteGrab.cpp
	g++ $< -o $@


FORCE:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -