| 1 | # release packaging makefile |
| 2 | |
| 3 | VER := $(shell head -n 1 ../common/version.h | \ |
| 4 | sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') |
| 5 | BUILD := $(shell git describe HEAD | grep -- - | \ |
| 6 | sed -e 's/.*\-\(.*\)\-.*/\1/') |
| 7 | ifneq "$(BUILD)" "" |
| 8 | VER := $(VER)_$(BUILD) |
| 9 | endif |
| 10 | |
| 11 | PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh |
| 12 | |
| 13 | all: rel |
| 14 | |
| 15 | ../../tools/textfilter: |
| 16 | make -C ../../tools/ |
| 17 | |
| 18 | /tmp/readme.txt: ../../tools/textfilter ../base_readme.txt |
| 19 | ../../tools/textfilter ../base_readme.txt $@ PANDORA |
| 20 | |
| 21 | /tmp/PicoDrive.pxml: PicoDrive.pxml.template FORCE |
| 22 | ./make_pxml.sh $< $@ |
| 23 | |
| 24 | rel: ../../PicoDrive PicoDrive.sh picorestore \ |
| 25 | PicoDrive.png PicoDrive_p.png \ |
| 26 | ../../pico/carthw.cfg skin \ |
| 27 | /tmp/readme.txt /tmp/PicoDrive.pxml |
| 28 | rm -rf out |
| 29 | mkdir out |
| 30 | cp -r $^ out/ |
| 31 | $(PND_MAKE) -p PicoDrive_$(VER).pnd -d out -x out/PicoDrive.pxml -i out/PicoDrive.png -c |
| 32 | |
| 33 | FORCE: |
| 34 | .PHONY: all rel FORCE |