2014-01-06 21:26:12 -08:00
|
|
|
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
|
|
|
# 2010, 2011, 2013, 2014
|
2008-12-17 19:00:48 -08:00
|
|
|
# Contributors to the Freedoom project. All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met:
|
|
|
|
#
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution.
|
|
|
|
# * Neither the name of the freedoom project nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived from
|
|
|
|
# this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
|
|
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
|
|
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
|
|
|
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
|
|
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
|
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
|
|
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2013-12-31 17:04:21 -08:00
|
|
|
VERSION!=git describe
|
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
|
2008-12-26 09:47:14 -08:00
|
|
|
DEUTEX_BASIC_ARGS=-v0 -fullsnd -rate accept -rgb 0 255 255
|
2006-05-09 09:20:42 -07:00
|
|
|
DEUTEX_ARGS=$(DEUTEX_BASIC_ARGS) -doom2 bootstrap/
|
|
|
|
|
2014-01-07 17:45:41 -08:00
|
|
|
FREEDOOM1=$(WADS)/doom.wad
|
|
|
|
FREEDOOM2=$(WADS)/doom2.wad
|
|
|
|
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:
|
2013-11-30 17:55:57 -08:00
|
|
|
make -C graphics/text
|
2006-05-09 09:20:42 -07:00
|
|
|
make -C graphics/titlepic
|
|
|
|
make -C lumps
|
|
|
|
|
|
|
|
# this is a useless dependency to force builds
|
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
|
|
# build texture1.txt for different builds
|
|
|
|
|
|
|
|
textures/doom2/texture1.txt: textures/combined.txt
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p textures/doom2
|
2006-05-09 09:20:42 -07:00
|
|
|
$(CPP) -DDOOM1 -DDOOM2 < $< > $@
|
|
|
|
textures/doom/texture1.txt: textures/combined.txt
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p textures/doom
|
2008-12-21 15:47:29 -08:00
|
|
|
$(CPP) -DDOOM1 -DULTDOOM < $< > $@
|
2006-06-03 16:18:12 -07:00
|
|
|
textures/freedm/texture1.txt: textures/combined.txt
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p textures/freedm
|
2006-06-03 16:18:12 -07:00
|
|
|
$(CPP) -DFREEDM < $< > $@
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2008-03-01 12:29:22 -08:00
|
|
|
textures/doom/pnames.txt: textures/doom/texture1.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
scripts/extract-pnames.py -a > $@
|
2014-01-06 21:51:17 -08:00
|
|
|
textures/doom2/pnames.txt: textures/doom2/texture1.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
scripts/extract-pnames.py -a > $@
|
2008-03-01 12:29:22 -08:00
|
|
|
textures/freedm/pnames.txt: textures/freedm/texture1.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
scripts/extract-pnames.py -a > $@
|
2006-05-09 09:20:42 -07:00
|
|
|
|
|
|
|
# update wadinfo.txt
|
|
|
|
|
|
|
|
wadinfo.txt: buildcfg.txt force textures/doom2/pnames.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DDOOM2 < $< | scripts/wadinfo-builder.py > $@
|
2006-05-09 09:20:42 -07:00
|
|
|
wadinfo_iwad.txt: buildcfg.txt force textures/doom2/pnames.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DDOOM2 < $< | scripts/wadinfo-builder.py -dummy > $@
|
2008-12-21 13:56:28 -08:00
|
|
|
wadinfo_ult.txt: buildcfg.txt force textures/doom/pnames.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DDOOM1 -DULTDOOM < $< | scripts/wadinfo-builder.py -dummy > $@
|
2006-06-03 16:18:12 -07:00
|
|
|
wadinfo_freedm.txt : buildcfg.txt force textures/freedm/pnames.txt
|
2008-12-24 10:50:30 -08:00
|
|
|
$(CPP) -P -DFREEDM < $< | scripts/wadinfo-builder.py -dummy > $@
|
2006-05-09 09:20:42 -07:00
|
|
|
|
|
|
|
%.wad.gz: %.wad
|
|
|
|
gzip < $< > $@
|
|
|
|
chmod o-r $<
|
|
|
|
md5sum $<.gz > $<.md5sum
|
|
|
|
rm -f $<
|
|
|
|
|
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-07 17:45:41 -08:00
|
|
|
$(FREEDM): wadinfo_freedm.txt subdirs force
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2006-06-03 16:18:12 -07:00
|
|
|
ln -sf freedm/texture1.txt textures/texture1.txt
|
|
|
|
rm -f $@
|
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_freedm.txt $@
|
|
|
|
|
2006-05-09 09:20:42 -07:00
|
|
|
#---------------------------------------------------------
|
2014-01-06 22:34:47 -08:00
|
|
|
# doom2 iwad
|
2006-05-09 09:20:42 -07:00
|
|
|
|
2014-01-07 17:45:41 -08:00
|
|
|
$(FREEDOOM2): wadinfo_iwad.txt subdirs force
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2006-05-09 09:20:42 -07:00
|
|
|
ln -sf doom2/texture1.txt textures/texture1.txt
|
|
|
|
rm -f $@
|
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -textures -lumps -patch -flats -sounds -musics -graphics -sprites -levels -build wadinfo_iwad.txt $@
|
|
|
|
|
2008-12-21 13:52:46 -08:00
|
|
|
#---------------------------------------------------------
|
|
|
|
# udoom iwad
|
|
|
|
|
2014-01-07 17:45:41 -08:00
|
|
|
$(FREEDOOM1): wadinfo_ult.txt subdirs force
|
2014-01-06 21:51:17 -08:00
|
|
|
@mkdir -p $(WADS)
|
2008-12-21 13:52:46 -08:00
|
|
|
ln -sf doom/texture1.txt textures/texture1.txt
|
|
|
|
rm -f $@
|
|
|
|
$(DEUTEX) $(DEUTEX_ARGS) -iwad -textures -lumps -patch -flats -sounds -musics -graphics -sprites -levels -build wadinfo_ult.txt $@
|
|
|
|
|
2013-12-31 01:51:20 -08:00
|
|
|
doc: BUILD-SYSTEM.asc README.asc
|
2013-12-31 01:00:19 -08:00
|
|
|
asciidoc BUILD-SYSTEM.asc
|
|
|
|
asciidoc README.asc
|
2009-07-30 15:05:56 -07:00
|
|
|
|
2014-01-07 17:45:41 -08:00
|
|
|
DISTDOCS=COPYING CREDITS README.html
|
|
|
|
|
|
|
|
# Due to convoluted reasons, the WADs must directly proceed the game name.
|
2013-12-31 01:51:20 -08:00
|
|
|
dist: $(OBJS) doc
|
2014-01-07 17:45:41 -08:00
|
|
|
VERSION=$(VERSION) scripts/makepkgs freedm $(FREEDM) $(DISTDOCS)
|
|
|
|
VERSION=$(VERSION) scripts/makepkgs freedoom $(FREEDOOM1) $(FREEDOOM2) $(DISTDOCS)
|
2013-12-31 01:51:20 -08:00
|
|
|
|
2006-06-12 13:36:32 -07:00
|
|
|
clean:
|
2009-07-30 15:05:56 -07:00
|
|
|
rm -f *.html deutex.log $(OBJS) \
|
2006-06-13 14:23:23 -07:00
|
|
|
./wadinfo.txt ./wadinfo_sw.txt \
|
2006-09-02 09:38:29 -07:00
|
|
|
./wadinfo_freedm.txt ./wadinfo_iwad.txt \
|
2008-12-21 15:19:53 -08:00
|
|
|
./wadinfo_ult.txt \
|
2010-09-15 13:55:03 -07:00
|
|
|
./lumps/freedoom.lmp \
|
|
|
|
./lumps/freedm.lmp \
|
2008-12-21 15:19:53 -08:00
|
|
|
./textures/doom/pnames.txt \
|
|
|
|
./textures/doom/texture1.txt \
|
2006-09-02 09:38:29 -07:00
|
|
|
./textures/doom2/pnames.txt \
|
|
|
|
./textures/doom2/texture1.txt \
|
|
|
|
./textures/freedm/pnames.txt \
|
|
|
|
./textures/freedm/texture1.txt \
|
|
|
|
./textures/texture1.txt
|
2014-01-07 07:07:19 -08:00
|
|
|
-rmdir $(WADS) textures/doom textures/doom2 textures/freedm
|
2006-09-02 09:38:29 -07:00
|
|
|
|
2006-06-12 13:36:32 -07:00
|
|
|
make -C lumps clean
|
2013-11-30 20:07:39 -08:00
|
|
|
make -C graphics/text clean
|
2006-06-13 14:24:45 -07:00
|
|
|
make -C graphics/titlepic clean
|