2024-09-02 00:23:34 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2024 Simon Howard
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by the
|
|
|
|
# Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
# option) any later version. This program is distributed in the hope that
|
|
|
|
# it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
#
|
2024-08-31 04:33:02 +00:00
|
|
|
|
2024-08-31 06:09:35 +00:00
|
|
|
export SDL_VIDEODRIVER = dummy
|
2024-09-05 01:24:39 +00:00
|
|
|
|
|
|
|
SOURCE_PORT_NAME = chocolate-doom
|
|
|
|
SOURCE_PORT := $(shell which $(SOURCE_PORT_NAME) || echo missing_source_port)
|
|
|
|
DOOMOPTS = -mb 16 -nodraw -noblit -nosound \
|
2024-09-07 21:03:02 +00:00
|
|
|
-noautoload -nogui -nograbmouse -nofullscreen
|
2024-08-31 06:09:35 +00:00
|
|
|
|
2024-09-01 03:50:57 +00:00
|
|
|
ALL_DEMOS = $(patsubst %,demos/%,$(shell cat demos.txt))
|
|
|
|
OUTPUTS = $(subst .lmp,.txt,$(subst demos/,output/,$(ALL_DEMOS)))
|
2024-08-31 04:33:02 +00:00
|
|
|
UNZIPOPTS = -L -o
|
|
|
|
|
2024-08-31 05:00:30 +00:00
|
|
|
check: expected output
|
2024-09-04 00:28:40 +00:00
|
|
|
diff -x .gitignore -u -r expected output
|
2024-08-31 23:26:19 +00:00
|
|
|
@echo all tests passed
|
2024-08-31 05:00:30 +00:00
|
|
|
|
|
|
|
output: $(OUTPUTS)
|
|
|
|
|
2024-09-05 01:24:39 +00:00
|
|
|
missing_source_port:
|
|
|
|
@echo "Failed to find" $(SOURCE_PORT_NAME) "in PATH."
|
|
|
|
@echo "To specify the path explicitly:"
|
|
|
|
@echo " make SOURCE_PORT=/path/to/$(SOURCE_PORT_NAME)"
|
|
|
|
@echo "Or to search for a different source port:"
|
|
|
|
@echo " make SOURCE_PORT_NAME=lemon-doom"
|
|
|
|
@false
|
2024-08-31 05:00:30 +00:00
|
|
|
|
2024-09-04 22:38:02 +00:00
|
|
|
.rules: makerules
|
|
|
|
./makerules $@
|
2024-08-31 21:39:22 +00:00
|
|
|
|
2024-08-31 04:33:02 +00:00
|
|
|
extract/%:
|
2024-08-31 05:00:30 +00:00
|
|
|
unzip $(UNZIPOPTS) -d extract $< $(notdir $@)
|
2024-08-31 22:42:59 +00:00
|
|
|
@touch $@
|
2024-08-31 04:33:02 +00:00
|
|
|
|
|
|
|
extract/requiem.wad: pwads/requiem.zip
|
|
|
|
extract/mm2.wad: pwads/mm2.zip
|
|
|
|
extract/mm.wad: pwads/mm_allup.zip
|
|
|
|
extract/hr.wad: pwads/hr.zip
|
|
|
|
extract/av.wad: pwads/av_new.zip
|
|
|
|
extract/class_ep.wad: pwads/class_ep.zip
|
2024-08-31 05:00:30 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f extract/*.wad
|
|
|
|
rm -rf output/*
|
2024-09-04 22:38:02 +00:00
|
|
|
rm -f .rules
|
2024-08-31 21:39:22 +00:00
|
|
|
|
2024-09-04 22:38:02 +00:00
|
|
|
include .rules
|