2017-02-15 16:41:53 -08:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2017-02-08 16:33:19 -08:00
|
|
|
VERSION=$(shell git describe --dirty 2>/dev/null || cat VERSION)
|
2006-06-16 02:05:44 -07:00
|
|
|
WADS=wads
|
2008-12-22 11:01:21 -08:00
|
|
|
CPP=scripts/simplecpp
|
2006-05-09 09:54:05 -07:00
|
|
|
DEUTEX=deutex
|
2017-07-17 03:05:46 -07:00
|
|
|
DEUTEX_BASIC_ARGS=-v0 -rate accept -rgb 0 255 255
|
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
|
|
|
|
2014-01-06 22:34:47 -08:00
|
|
|
all: $(OBJS)
|
2006-05-09 09:20:42 -07:00
|
|
|
|
|
|
|
subdirs:
|
2014-01-15 22:30:15 -08:00
|
|
|
$(MAKE) -C graphics/text
|
2014-01-22 19:32:25 -08:00
|
|
|
$(MAKE) VERSION=$(VERSION) -C graphics/titlepic
|
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) > $@
|
|
|
|
|
2006-05-09 09:20:42 -07:00
|
|
|
# update wadinfo.txt
|
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
wadinfo.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DDOOM2 < $< | scripts/wadinfo-builder.py > $@
|
2014-01-21 21:02:29 -08:00
|
|
|
wadinfo_phase1.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DDOOM1 -DULTDOOM < $< | scripts/wadinfo-builder.py -dummy > $@
|
2014-01-21 21:02:29 -08:00
|
|
|
wadinfo_phase2.txt: buildcfg.txt subdirs lumps/freedoom.lmp
|
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
|
|
|
$(CPP) -P -DDOOM2 < $< | scripts/wadinfo-builder.py -dummy > $@
|
2014-01-21 21:02:29 -08:00
|
|
|
wadinfo_freedm.txt : buildcfg.txt subdirs lumps/freedoom.lmp lumps/freedm.lmp
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DFREEDM < $< | scripts/wadinfo-builder.py -dummy > $@
|
2006-05-09 09:20:42 -07:00
|
|
|
|
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
|
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDM): wadinfo_freedm.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2006-06-03 16:18:12 -07:00
|
|
|
rm -f $@
|
|
|
|
$(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
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDOOM1): wadinfo_phase1.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2006-05-09 09:20:42 -07:00
|
|
|
rm -f $@
|
2014-01-15 20:18:22 -08:00
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -lumps -patch -flats -sounds -musics -graphics -sprites -levels -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
|
|
|
|
2014-01-21 21:02:29 -08:00
|
|
|
$(FREEDOOM2): wadinfo_phase2.txt subdirs
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2008-12-21 13:52:46 -08:00
|
|
|
rm -f $@
|
2014-01-15 20:18:22 -08:00
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -lumps -patch -flats -sounds -musics -graphics -sprites -levels -build wadinfo_phase2.txt $@
|
2008-12-21 13:52:46 -08:00
|
|
|
|
2014-10-07 09:39:21 -07:00
|
|
|
%.html: %.adoc
|
2016-03-06 00:30:30 -08:00
|
|
|
TZ=UTC asciidoc $<
|
2014-10-07 09:39:21 -07:00
|
|
|
|
|
|
|
doc: $(patsubst %.adoc,%.html,$(wildcard *.adoc))
|
2009-07-30 15:05:56 -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 $< $@
|
|
|
|
|
|
|
|
DISTDOCS=COPYING.txt CREDITS.txt README.html
|
2014-01-07 17:45:41 -08:00
|
|
|
|
2014-10-05 03:10:08 -07:00
|
|
|
.PHONY: dist
|
|
|
|
|
2014-01-07 17:45:41 -08:00
|
|
|
# Due to convoluted reasons, the WADs must directly proceed the game name.
|
2017-02-19 11:43:04 -08:00
|
|
|
dist: $(OBJS) COPYING.txt CREDITS.txt README.html
|
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
|
|
|
|
|
2006-06-12 13:36:32 -07:00
|
|
|
clean:
|
2009-07-30 15:05:56 -07:00
|
|
|
rm -f *.html deutex.log $(OBJS) \
|
2017-02-19 11:43:04 -08:00
|
|
|
./COPYING.txt ./CREDITS.txt \
|
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
|
|
|
./wadinfo.txt ./wadinfo_phase1.txt \
|
|
|
|
./wadinfo_phase2.txt ./wadinfo_freedm.txt \
|
2010-09-15 13:55:03 -07:00
|
|
|
./lumps/freedoom.lmp \
|
2014-01-16 19:59:52 -08:00
|
|
|
./lumps/freedm.lmp
|
2014-01-15 20:18:22 -08:00
|
|
|
-rmdir $(WADS)
|
2006-09-02 09:38:29 -07:00
|
|
|
|
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
|
|
|
|
$(MAKE) -C graphics/titlepic 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
|
2014-04-09 13:25:27 -07:00
|
|
|
$(MAKE) -C bootstrap clean
|
2014-01-15 22:30:15 -08:00
|
|
|
|
2014-09-28 01:00:57 -07:00
|
|
|
prefix?=/usr/local
|
|
|
|
bindir?=/bin
|
|
|
|
mandir?=/share/man
|
|
|
|
waddir?=/share/games/doom
|
|
|
|
target=$(DESTDIR)$(prefix)
|
|
|
|
|
|
|
|
%.6:
|
2014-09-30 23:01:38 -07:00
|
|
|
$(MAKE) -C dist man-$*
|
|
|
|
|
|
|
|
%.png:
|
|
|
|
$(MAKE) -C dist icon-$*
|
2014-09-28 01:00:57 -07:00
|
|
|
|
2014-09-30 23:01:38 -07:00
|
|
|
install-%: $(WADS)/%.wad %.6 %.png
|
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/$*.desktop -t "$(target)/share/applications"
|
|
|
|
install -Dm 644 dist/$*.appdata.xml -t "$(target)/share/appdata"
|
|
|
|
install -Dm 644 dist/$*.png -t "$(target)/share/icons"
|
2014-09-28 01:00:57 -07:00
|
|
|
|
2014-09-29 18:54:22 -07:00
|
|
|
uninstall-%:
|
|
|
|
rm "$(target)$(bindir)/$*"
|
|
|
|
rm "$(target)$(mandir)/man6/$*.6"
|
|
|
|
rm "$(target)$(waddir)/$*.wad"
|
|
|
|
rm "$(target)/share/applications/$*.desktop"
|
|
|
|
rm "$(target)/share/appdata/$*.appdata.xml"
|
|
|
|
rm "$(target)/share/icons/$*.png"
|
|
|
|
-rmdir -p "$(target)$(bindir)"
|
|
|
|
-rmdir -p "$(target)$(mandir)/man6"
|
|
|
|
-rmdir -p "$(target)$(waddir)"
|
|
|
|
-rmdir -p "$(target)/share/applications"
|
|
|
|
-rmdir -p "$(target)/share/appdata"
|
|
|
|
-rmdir -p "$(target)/share/icons"
|
|
|
|
|
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
|