2017-02-15 16:41:53 -08:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2019-09-04 19:46:59 -07:00
|
|
|
VERSION=$(shell git describe --abbrev=8 --dirty 2>/dev/null || echo 0.11.3)
|
2006-06-16 02:05:44 -07:00
|
|
|
WADS=wads
|
2019-09-12 10:59:47 -07:00
|
|
|
ASCIIDOC=asciidoc
|
|
|
|
ASCIIDOC_MAN=a2x -f manpage
|
2008-12-22 11:01:21 -08:00
|
|
|
CPP=scripts/simplecpp
|
2006-05-09 09:54:05 -07:00
|
|
|
DEUTEX=deutex
|
2017-07-30 14:08:17 -07:00
|
|
|
DEUTEX_BASIC_ARGS=-v0 -rate accept
|
2006-05-09 09:20:42 -07:00
|
|
|
DEUTEX_ARGS=$(DEUTEX_BASIC_ARGS) -doom2 bootstrap/
|
|
|
|
|
The Great IWAD Renaming: unique file names for Freedoom
After some discussion and consensus[1], Freedoom's IWADs are now
uniquely named independently of Doom's file names:
* freedoom1.wad: Phase 1
* freedoom2.wad: Phase 2
The original intention was that Freedoom would be a complete drop-in
replacement for Doom, so that you can just use Freedoom's doom2.wad
rather than id Software's. What has happened, however, is that people
often desire to have Freedoom installed alongside Doom, and try to
uniquely identify it via filenames for multiplayer servers. This has
resulted in lengthy lists of unofficial IWAD file names implemented by
many engines to locate Freedoom, combined with gamers' personal
opinions on just how they should be renamed.
Even the Debian project, normally not one to modify upstream sources
so drastically, has been renaming our doom2.wad to freedoom.wad,
presumably so that Doom II can be installed simultaneously with
game-data-packager.
Given a free software engine, we can instead standardize on unique
names apart from Doom and get the majority of engines in use changed
over to these ones; users with engines that don't recognize the names
can instead use the near-universal -iwad command-line parameter, or
rename the files back to doom.wad or doom2.wad as needed.
[1] http://www.doomworld.com/vb/freedoom/66856-bikeshedding-renaming-freedooms-iwads/
2014-01-11 20:21:51 -08:00
|
|
|
FREEDOOM1=$(WADS)/freedoom1.wad
|
|
|
|
FREEDOOM2=$(WADS)/freedoom2.wad
|
2014-01-07 17:45:41 -08:00
|
|
|
FREEDM=$(WADS)/freedm.wad
|
|
|
|
|
|
|
|
OBJS=$(FREEDM) $(FREEDOOM1) $(FREEDOOM2)
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2019-09-12 11:20:54 -07:00
|
|
|
.PHONY: clean dist
|
|
|
|
|
2014-01-06 22:34:47 -08:00
|
|
|
all: $(OBJS)
|
2006-05-09 09:20:42 -07:00
|
|
|
|
|
|
|
subdirs:
|
2019-09-01 17:53:55 -07:00
|
|
|
$(MAKE) -C lumps/dehacked # graphics/text depends on generated dehacked files
|
2017-07-30 23:26:52 -07:00
|
|
|
$(MAKE) VERSION=$(VERSION) -C graphics/text
|
2015-12-24 02:10:32 -08:00
|
|
|
$(MAKE) -C lumps/playpal
|
|
|
|
$(MAKE) -C lumps/colormap
|
2014-01-15 22:30:15 -08:00
|
|
|
$(MAKE) -C lumps/genmidi
|
|
|
|
$(MAKE) -C lumps/dmxgus
|
|
|
|
$(MAKE) -C lumps/textures
|
2014-04-09 13:25:27 -07:00
|
|
|
$(MAKE) -C bootstrap
|
2014-01-15 22:30:15 -08:00
|
|
|
|
2006-05-09 09:20:42 -07:00
|
|
|
|
|
|
|
# this is a useless dependency to force builds
|
|
|
|
|
|
|
|
force:
|
|
|
|
|
2014-01-15 22:30:15 -08:00
|
|
|
lumps/freedoom.lmp lumps/freedm.lmp: force
|
|
|
|
echo $(VERSION) > $@
|
|
|
|
|
2011-04-10 02:07:34 -07:00
|
|
|
# deutex doesnt allow redirects for the filenames in the texture
|
|
|
|
# entries, so we have to change the texture1 symlink to point
|
|
|
|
# to whichever wad we are working on
|
|
|
|
|
2006-06-03 16:18:12 -07:00
|
|
|
#---------------------------------------------------------
|
|
|
|
# freedm iwad
|
|
|
|
|
2019-09-01 18:10:14 -07:00
|
|
|
wadinfo_freedm.txt : buildcfg.txt subdirs lumps/freedoom.lmp lumps/freedm.lmp
|
|
|
|
$(CPP) -P -DFREEDM < $< > $@
|
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDM): wadinfo_freedm.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2019-09-04 14:22:49 -07:00
|
|
|
$(RM) $@
|
2006-06-03 16:18:12 -07:00
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_freedm.txt $@
|
|
|
|
|
2006-05-09 09:20:42 -07:00
|
|
|
#---------------------------------------------------------
|
The Great IWAD Renaming: unique file names for Freedoom
After some discussion and consensus[1], Freedoom's IWADs are now
uniquely named independently of Doom's file names:
* freedoom1.wad: Phase 1
* freedoom2.wad: Phase 2
The original intention was that Freedoom would be a complete drop-in
replacement for Doom, so that you can just use Freedoom's doom2.wad
rather than id Software's. What has happened, however, is that people
often desire to have Freedoom installed alongside Doom, and try to
uniquely identify it via filenames for multiplayer servers. This has
resulted in lengthy lists of unofficial IWAD file names implemented by
many engines to locate Freedoom, combined with gamers' personal
opinions on just how they should be renamed.
Even the Debian project, normally not one to modify upstream sources
so drastically, has been renaming our doom2.wad to freedoom.wad,
presumably so that Doom II can be installed simultaneously with
game-data-packager.
Given a free software engine, we can instead standardize on unique
names apart from Doom and get the majority of engines in use changed
over to these ones; users with engines that don't recognize the names
can instead use the near-universal -iwad command-line parameter, or
rename the files back to doom.wad or doom2.wad as needed.
[1] http://www.doomworld.com/vb/freedoom/66856-bikeshedding-renaming-freedooms-iwads/
2014-01-11 20:21:51 -08:00
|
|
|
# phase 1 (udoom) iwad
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2019-09-01 18:10:14 -07:00
|
|
|
wadinfo_phase1.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
2019-09-01 18:49:03 -07:00
|
|
|
$(CPP) -P -DPHASE1 < $< > $@
|
2019-09-01 18:10:14 -07:00
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDOOM1): wadinfo_phase1.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2019-09-04 14:22:49 -07:00
|
|
|
$(RM) $@
|
2017-07-30 14:08:17 -07:00
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase1.txt $@
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2008-12-21 13:52:46 -08:00
|
|
|
#---------------------------------------------------------
|
The Great IWAD Renaming: unique file names for Freedoom
After some discussion and consensus[1], Freedoom's IWADs are now
uniquely named independently of Doom's file names:
* freedoom1.wad: Phase 1
* freedoom2.wad: Phase 2
The original intention was that Freedoom would be a complete drop-in
replacement for Doom, so that you can just use Freedoom's doom2.wad
rather than id Software's. What has happened, however, is that people
often desire to have Freedoom installed alongside Doom, and try to
uniquely identify it via filenames for multiplayer servers. This has
resulted in lengthy lists of unofficial IWAD file names implemented by
many engines to locate Freedoom, combined with gamers' personal
opinions on just how they should be renamed.
Even the Debian project, normally not one to modify upstream sources
so drastically, has been renaming our doom2.wad to freedoom.wad,
presumably so that Doom II can be installed simultaneously with
game-data-packager.
Given a free software engine, we can instead standardize on unique
names apart from Doom and get the majority of engines in use changed
over to these ones; users with engines that don't recognize the names
can instead use the near-universal -iwad command-line parameter, or
rename the files back to doom.wad or doom2.wad as needed.
[1] http://www.doomworld.com/vb/freedoom/66856-bikeshedding-renaming-freedooms-iwads/
2014-01-11 20:21:51 -08:00
|
|
|
# phase 2 (doom2) iwad
|
2008-12-21 13:52:46 -08:00
|
|
|
|
2019-09-01 18:10:14 -07:00
|
|
|
wadinfo_phase2.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
2019-09-01 18:49:03 -07:00
|
|
|
$(CPP) -P -DPHASE2 < $< > $@
|
2019-09-01 18:10:14 -07:00
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDOOM2): wadinfo_phase2.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2019-09-04 14:22:49 -07:00
|
|
|
$(RM) $@
|
2017-07-30 14:08:17 -07:00
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_phase2.txt $@
|
2008-12-21 13:52:46 -08:00
|
|
|
|
2014-10-07 09:39:21 -07:00
|
|
|
%.html: %.adoc
|
2019-09-12 10:59:47 -07:00
|
|
|
TZ=UTC $(ASCIIDOC) $<
|
2014-10-07 09:39:21 -07:00
|
|
|
|
2017-02-19 11:43:04 -08:00
|
|
|
COPYING.txt: COPYING.adoc
|
|
|
|
unix2dos --add-bom --newfile $< $@
|
|
|
|
|
|
|
|
CREDITS.txt: CREDITS
|
|
|
|
unix2dos --add-bom --newfile $< $@
|
|
|
|
|
2019-09-12 11:20:54 -07:00
|
|
|
HTMLDOCS=NEWS.html README.html
|
|
|
|
TEXTDOCS=COPYING.txt CREDITS.txt
|
|
|
|
DISTDOCS=$(HTMLDOCS) $(TEXTDOCS)
|
2014-10-05 03:10:08 -07:00
|
|
|
|
2019-09-07 20:03:29 -07:00
|
|
|
dist: $(OBJS) $(DISTDOCS)
|
Introduce measures to start building Zips deterministically.
This at least lays some groundwork for doing so, by gathering archive
members by wildcard expansion rather than zip's -r parameter (which
uses file system order -- essentially random), combined with LC_ALL=C
so that locale sorting orders don't matter either. zip's -X option is
also used so no Unix metadata (UIDs, GIDs, modes) are saved in the
archive.
To really complete the effect, faketime should be used to deal with
file timestamps. Requiring faketime to do `make dist` seems too
extreme to me, so I'm leaving it out, but the general idea is to run a
command such as:
faketime -f "$(TZ=UTC date -d "@$(git show -q --format=format:%ct)" \
"+%Y-%m-%d %H:%M:%S")" \
make dist
This does also assume that zip's default compression algorithm never
changes (eg, from DEFLATE to BZip2 or LZMA), or never releases an
improved version (eg, a better DEFLATE). It's not perfect, but this
should be good enough.
2017-02-22 11:44:50 -08:00
|
|
|
LC_ALL=C VERSION=$(VERSION) scripts/makepkgs freedm $(FREEDM) $(DISTDOCS)
|
|
|
|
LC_ALL=C VERSION=$(VERSION) scripts/makepkgs freedoom $(FREEDOOM1) $(FREEDOOM2) $(DISTDOCS)
|
2013-12-31 01:51:20 -08:00
|
|
|
|
2014-10-05 03:39:52 -07:00
|
|
|
json: $(OBJS)
|
|
|
|
ifndef JSON
|
|
|
|
@echo "Define JSON as the file to output." >&2
|
|
|
|
@exit 1
|
|
|
|
else
|
|
|
|
JSON=$(JSON) VERSION=$(VERSION) scripts/makejson
|
|
|
|
endif
|
|
|
|
|
2017-08-23 19:08:57 -07:00
|
|
|
clean: wad-image-clean
|
2019-09-12 15:54:30 -07:00
|
|
|
$(RM) *.html $(OBJS) \
|
2019-09-04 14:22:49 -07:00
|
|
|
./COPYING.txt ./CREDITS.txt \
|
|
|
|
./wadinfo_phase1.txt \
|
|
|
|
./wadinfo_phase2.txt \
|
|
|
|
./wadinfo_freedm.txt \
|
|
|
|
./lumps/freedoom.lmp \
|
|
|
|
./lumps/freedm.lmp
|
2014-01-15 20:18:22 -08:00
|
|
|
-rmdir $(WADS)
|
2006-09-02 09:38:29 -07:00
|
|
|
|
2019-09-12 15:54:30 -07:00
|
|
|
$(MAKE) -C bootstrap clean
|
2014-11-02 17:24:05 -08:00
|
|
|
$(MAKE) -C dist clean
|
2014-01-15 22:30:15 -08:00
|
|
|
$(MAKE) -C graphics/text clean
|
2019-09-01 17:53:55 -07:00
|
|
|
$(MAKE) -C lumps/dehacked clean
|
2015-12-24 02:10:32 -08:00
|
|
|
$(MAKE) -C lumps/playpal clean
|
|
|
|
$(MAKE) -C lumps/colormap clean
|
2014-01-15 22:30:15 -08:00
|
|
|
$(MAKE) -C lumps/genmidi clean
|
|
|
|
$(MAKE) -C lumps/dmxgus clean
|
|
|
|
$(MAKE) -C lumps/textures clean
|
|
|
|
|
2017-08-26 18:44:34 -07:00
|
|
|
# Variables that are common to wad-image* targets.
|
2017-08-23 19:08:57 -07:00
|
|
|
WI_LEVELS := levels
|
|
|
|
WI_SCRIPTS := scripts
|
2017-08-26 18:44:34 -07:00
|
|
|
WI_PATH := $(shell command -v wad2image.py)
|
2017-09-04 12:44:22 -07:00
|
|
|
WI_HOME := $(if $(WAD2IMAGE_HOME),$(WAD2IMAGE_HOME),$(if $(WI_PATH),$(shell $(WI_PATH) \
|
|
|
|
--get-top-dir),$(WI_SCRIPTS)/wad2image))
|
2017-08-26 18:44:34 -07:00
|
|
|
WI_IMAGES := wad-images
|
|
|
|
WI_WAD_SPATH := wads,{top-dir}/wads,.,/usr/share/doom,/usr/local/doom
|
2017-08-23 19:08:57 -07:00
|
|
|
WI_ALL_OPTIONS := $(WI_OPTIONS) $(if $(WI_BW), --colors-images bw,) \
|
|
|
|
$(if $(WI_CMD), --show-cmd $(WI_CMD),) $(if $(WI_GIF), -d gif,) \
|
2017-08-26 18:44:34 -07:00
|
|
|
$(if $(WI_IMAGES), --out-dir $(WI_IMAGES),) $(if $(WI_SHOW), -s,) \
|
|
|
|
$(if $(WI_VERBOSE), -v,) $(if $(WI_WAD_SPATH), --wad-spath $(WI_WAD_SPATH),)
|
2017-08-23 19:08:57 -07:00
|
|
|
wad-image-common:
|
2017-08-27 07:00:11 -07:00
|
|
|
ifndef WI_IMAGES
|
|
|
|
$(error WI_IMAGES must be defined)
|
|
|
|
endif
|
|
|
|
ifndef WI_LEVELS
|
|
|
|
$(error WI_LEVELS must be defined)
|
|
|
|
endif
|
|
|
|
ifndef WI_SCRIPTS
|
|
|
|
$(error WI_SCRIPTS must be defined)
|
|
|
|
endif
|
|
|
|
ifndef WI_HOME
|
|
|
|
$(error WI_HOME must be defined)
|
|
|
|
endif
|
2017-08-23 19:08:57 -07:00
|
|
|
|
|
|
|
# Generating images for WADs in "levels" directory and show the result.
|
|
|
|
WI_LATEST := $(shell ls -1t $(WI_LEVELS)/*.wad | head -n 1)
|
|
|
|
WI_FILES := $(if $(WI_PATT), $(WI_LEVELS)/$(WI_PATT).wad, $(WI_LATEST))
|
|
|
|
wad-image: wad-image-common
|
|
|
|
@echo "Generating images for WADs in \"$(WI_LEVELS)\"."
|
2017-08-26 18:44:34 -07:00
|
|
|
$(WI_HOME)/bin/wad2image.py $(WI_ALL_OPTIONS) $(WI_FILES)
|
2017-08-23 19:08:57 -07:00
|
|
|
|
2017-08-26 18:44:34 -07:00
|
|
|
# Cleanup generated images. Structured this way for safety.
|
2017-08-23 19:08:57 -07:00
|
|
|
wad-image-clean: wad-image-common
|
2019-09-04 14:22:49 -07:00
|
|
|
$(RM) $(WI_IMAGES)/*
|
2017-08-26 18:44:34 -07:00
|
|
|
-rmdir $(WI_IMAGES)
|
2017-08-23 19:08:57 -07:00
|
|
|
|
|
|
|
# Diffing WADs in "levels" using git and show the diff."
|
|
|
|
wad-image-diff: wad-image-common
|
|
|
|
@echo "Diffing WADs in \"$(WI_LEVELS)\" using git."
|
2017-08-26 18:44:34 -07:00
|
|
|
$(WI_HOME)/integration/git-wad-diff.sh "$(WI_COMMIT)" "$(WI_LEVELS)" $(WI_ALL_OPTIONS)
|
2017-08-23 19:08:57 -07:00
|
|
|
|
2017-08-26 18:44:34 -07:00
|
|
|
# Help for wad2image.
|
|
|
|
wad-image-help: wad-image-common
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo "Help for wad-image* targets and WI_* variable which can be used to see"
|
|
|
|
@echo "differences between WAD revisions, or to simply view WADs. The following targets"
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo "depend on wad2image being installed with bin/wad2image.py in it being in the"
|
|
|
|
@echo "path, or alteratively wad2image being copied or symlinked to the \"$(WI_SCRIPTS)\""
|
|
|
|
@echo "directory. Images are created in \"$(WI_IMAGES)\". Each variable's description"
|
|
|
|
@echo "ends with \"Value:\" followed by that variable's current value. If no variables"
|
|
|
|
@echo "have been specified on the make command line then the value shown is the"
|
|
|
|
@echo "default value. Some variables are unset by default. wad2image can be downloaded"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo "from http://selliott.org/utilities/wad2image."
|
|
|
|
@echo ""
|
|
|
|
@echo " Targets:"
|
|
|
|
@echo ""
|
|
|
|
@echo " wad-image Generate generate images for WAD files that are in the"
|
|
|
|
@echo " workspace."
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " wad-image-clean Remove \"$(WI_IMAGES)\" as well as all files in it."
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " wad-image-diff Use git to generate diff image showing the differences"
|
|
|
|
@echo " between two revisions of WAD files. By default the"
|
|
|
|
@echo " difference is between latest HEAD and the workspace, but the"
|
|
|
|
@echo " WI_COMMIT variable can be used to generate other diffs."
|
|
|
|
@echo " wad-image-help This help message."
|
|
|
|
@echo ""
|
|
|
|
@echo " Variables:"
|
|
|
|
@echo ""
|
|
|
|
@echo " WI_BW Make diff images black or white (high contrast) instead of"
|
|
|
|
@echo " full color. This applies to wad-image-diff-only."
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " Value: $(WI_BW)"
|
|
|
|
@echo " WI_CMD Command used to display images. \"display\" is used if no"
|
|
|
|
@echo " value is specified. \"animate\" works well for animated"
|
|
|
|
@echo " GIFs. Value: $(WI_CMD)"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " WI_COMMIT When the wad-image-diff target is invoked this variable"
|
|
|
|
@echo " specifies which revisions are compared. It's similar to"
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " git's \"commit\" argument. Value: $(WI_COMMIT)"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " WI_GIF Create animated GIFs instead of color coded files for the"
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " diff. Value: $(WI_GIF)"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " WI_HOME The location where wad2image is installed. By default PATH"
|
|
|
|
@echo " is searched for \"wad2image.py\". If it's found the"
|
|
|
|
@echo " enclosing installation directory is used. If it's not found"
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " $(WI_SCRIPTS)/wad2image is used. Value: $(WI_HOME)"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " WI_IMAGES The output directory that will contain the images created."
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " Value: $(WI_IMAGES)"
|
|
|
|
@echo " WI_LEVELS Subdirectory with the level WADs. Value: $(WI_IMAGES)"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " WI_OPTIONS Additional command line options for wad2image."
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " Value: $(WI_OPTIONS)"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " WI_SHOW If set then show the images after creating them."
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " Value: $(WI_SHOW)"
|
|
|
|
@echo " WI_PATT Files patterns that are applied to files in the"
|
|
|
|
@echo " \"$(WI_LEVELS)\" directory without the \".wad\" suffix. For"
|
|
|
|
@echo " example, \"map0*\" to get MAP01 - MAP09. This applies to"
|
|
|
|
@echo " wad-image only. Value: $(WI_PATT)"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " WI_VERBOSE If set then make wad2image more verbose."
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " Value: $(WI_VERBOSE)"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " WI_WAD_SPATH The search path for WADs where a fully qualified path was"
|
|
|
|
@echo " not given. This is typically used for the IWAD. By default"
|
|
|
|
@echo " \"wads\" is searched first, so it helps to complete a build"
|
2017-08-27 07:00:11 -07:00
|
|
|
@echo " before generating images. Value: $(WI_WAD_SPATH)"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo ""
|
|
|
|
@echo " Examples:"
|
|
|
|
@echo ""
|
|
|
|
@echo " Verbosely create and display an image for the most recently modified WAD"
|
|
|
|
@echo " file in \"levels\":"
|
|
|
|
@echo " make wad-image WI_VERBOSE=t"
|
|
|
|
@echo ""
|
|
|
|
@echo " Create and display the image for MAP05:"
|
|
|
|
@echo " make wad-image WI_PATT=map05"
|
|
|
|
@echo ""
|
|
|
|
@echo " Verbosely create color coded diffs for changed files in the workspace:"
|
|
|
|
@echo " make wad-image-diff WI_VERBOSE=t"
|
|
|
|
@echo ""
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " Same as above but Yadex style (example of WI_OPTIONS):"
|
|
|
|
@echo " make wad-image-diff WI_VERBOSE=t WI_OPTIONS=\"-c yadex\""
|
|
|
|
@echo ""
|
|
|
|
@echo " Same as the above, but with high contrast black or white images, but"
|
|
|
|
@echo " without Yadex style:"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo " make wad-image-diff WI_VERBOSE=t WI_BW=t"
|
|
|
|
@echo ""
|
|
|
|
@echo " Same as above, but use animated GIFs to illustrate the diff instead of"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " colors. Also, once the animated GIFs are created they'll be shown with"
|
|
|
|
@echo " the \"animate\" command:"
|
|
|
|
@echo " make wad-image-diff WI_VERBOSE=t WI_GIF=t WI_SHOW=t WI_CMD=animate"
|
2017-08-23 19:08:57 -07:00
|
|
|
@echo ""
|
|
|
|
@echo " Same as above, but illustrate the diff between two git revisions instead of"
|
|
|
|
@echo " the workspace:"
|
2017-08-26 18:44:34 -07:00
|
|
|
@echo " make wad-image-diff WI_VERBOSE=t WI_GIF=t WI_SHOW=t WI_CMD=animate \
|
|
|
|
WI_COMMIT=\"0c004ce~..0c004ce\""
|
2017-08-23 19:08:57 -07:00
|
|
|
|
2018-09-30 08:12:45 -07:00
|
|
|
# Test targets all of which are a dependency of "test".
|
|
|
|
|
|
|
|
# Test that WAD files have the expected map names.
|
|
|
|
test-map-names:
|
|
|
|
scripts/fix-map-names -t levels
|
|
|
|
|
|
|
|
# Run all tests. Add test-* targets above, and then as a dependency here.
|
|
|
|
test: test-map-names
|
|
|
|
@echo
|
|
|
|
@echo "All tests passed."
|
|
|
|
|
|
|
|
# Non-test targets that run scripts in the "scripts" directory.
|
|
|
|
|
|
|
|
# Fix the map names.
|
|
|
|
fix-map-names:
|
|
|
|
scripts/fix-map-names levels
|
|
|
|
|
2014-09-28 01:00:57 -07:00
|
|
|
%.6:
|
2019-09-12 10:59:47 -07:00
|
|
|
$(MAKE) ASCIIDOC_MAN="$(ASCIIDOC_MAN)" -C dist $@
|
2014-09-30 23:01:38 -07:00
|
|
|
|
|
|
|
%.png:
|
2019-09-04 14:06:17 -07:00
|
|
|
$(MAKE) -C dist $@
|
|
|
|
|
|
|
|
prefix?=/usr/local
|
|
|
|
bindir?=/bin
|
2019-09-12 11:20:54 -07:00
|
|
|
docdir?=/share/doc
|
2019-09-04 14:06:17 -07:00
|
|
|
mandir?=/share/man
|
|
|
|
waddir?=/share/games/doom
|
|
|
|
target=$(DESTDIR)$(prefix)
|
2014-09-28 01:00:57 -07:00
|
|
|
|
2019-09-07 11:27:21 -07:00
|
|
|
install_metadata_freedm:
|
|
|
|
install -Dm 644 dist/io.github.freedoom.FreeDM.desktop -t "$(target)/share/applications"
|
|
|
|
install -Dm 644 dist/io.github.freedoom.FreeDM.metainfo.xml -t "$(target)/share/metainfo"
|
|
|
|
|
|
|
|
install_metadata_freedoom1:
|
|
|
|
install -Dm 644 dist/io.github.freedoom.Phase1.desktop -t "$(target)/share/applications"
|
|
|
|
install -Dm 644 dist/io.github.freedoom.Phase1.metainfo.xml -t "$(target)/share/metainfo"
|
|
|
|
|
|
|
|
install_metadata_freedoom2:
|
|
|
|
install -Dm 644 dist/io.github.freedoom.Phase2.desktop -t "$(target)/share/applications"
|
|
|
|
install -Dm 644 dist/io.github.freedoom.Phase2.metainfo.xml -t "$(target)/share/metainfo"
|
|
|
|
|
|
|
|
uninstall_metadata_freedm:
|
|
|
|
$(RM) "$(target)/share/applications/io.github.freedoom.FreeDM.desktop"
|
|
|
|
$(RM) "$(target)/share/metainfo/io.github.freedoom.FreeDM.metainfo.xml"
|
|
|
|
-rmdir -p "$(target)/share/applications"
|
|
|
|
-rmdir -p "$(target)/share/metainfo"
|
|
|
|
|
|
|
|
uninstall_metadata_freedoom1:
|
|
|
|
$(RM) "$(target)/share/applications/io.github.freedoom.Phase1.desktop"
|
|
|
|
$(RM) "$(target)/share/metainfo/io.github.freedoom.Phase1.metainfo.xml"
|
|
|
|
-rmdir -p "$(target)/share/applications"
|
|
|
|
-rmdir -p "$(target)/share/metainfo"
|
|
|
|
|
|
|
|
uninstall_metadata_freedoom2:
|
|
|
|
$(RM) "$(target)/share/applications/io.github.freedoom.Phase2.desktop"
|
|
|
|
$(RM) "$(target)/share/metainfo/io.github.freedoom.Phase2.metainfo.xml"
|
|
|
|
-rmdir -p "$(target)/share/applications"
|
|
|
|
-rmdir -p "$(target)/share/metainfo"
|
|
|
|
|
2019-09-12 11:20:54 -07:00
|
|
|
install-%: $(HTMLDOCS) $(WADS)/%.wad %.6 %.png install_metadata_%
|
2017-02-20 20:59:28 -08:00
|
|
|
install -Dm 755 dist/freedoom "$(target)$(bindir)/$*"
|
|
|
|
install -Dm 644 dist/$*.6 -t "$(target)$(mandir)/man6"
|
|
|
|
install -Dm 644 $(WADS)/$*.wad -t "$(target)$(waddir)"
|
|
|
|
install -Dm 644 dist/$*.png -t "$(target)/share/icons"
|
2019-09-12 11:20:54 -07:00
|
|
|
install -Dm 644 CREDITS NEWS.html README.html -t "$(target)$(docdir)/$*"
|
|
|
|
install -Dm 644 COPYING.adoc "$(target)$(docdir)/$*/COPYING"
|
2014-09-28 01:00:57 -07:00
|
|
|
|
2019-09-07 11:27:21 -07:00
|
|
|
uninstall-%: uninstall_metadata_%
|
2019-09-04 14:22:49 -07:00
|
|
|
$(RM) "$(target)$(bindir)/$*"
|
|
|
|
$(RM) "$(target)$(mandir)/man6/$*.6"
|
|
|
|
$(RM) "$(target)$(waddir)/$*.wad"
|
|
|
|
$(RM) "$(target)/share/icons/$*.png"
|
2019-09-12 11:20:54 -07:00
|
|
|
$(RM) "$(target)$(docdir)/$*/CREDITS" "$(target)$(docdir)/$*/COPYING"
|
|
|
|
$(RM) "$(target)$(docdir)/$*/NEWS.html" "$(target)$(docdir)/$*/README.html"
|
2014-09-29 18:54:22 -07:00
|
|
|
-rmdir -p "$(target)$(bindir)"
|
|
|
|
-rmdir -p "$(target)$(mandir)/man6"
|
|
|
|
-rmdir -p "$(target)$(waddir)"
|
|
|
|
-rmdir -p "$(target)/share/icons"
|
2019-09-12 11:20:54 -07:00
|
|
|
-rmdir -p "$(target)$(docdir)/$*"
|
2014-09-29 18:54:22 -07:00
|
|
|
|
2014-09-28 01:00:57 -07:00
|
|
|
install: install-freedm install-freedoom1 install-freedoom2
|
2014-09-29 18:54:22 -07:00
|
|
|
|
|
|
|
uninstall: uninstall-freedm uninstall-freedoom1 uninstall-freedoom2
|