Gobligine/Makefile

463 lines
16 KiB
Makefile
Raw Normal View History

2000-03-25 15:38:54 -07:00
## ___________ _________ _____ __
## \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
## | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\
## | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
## \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
## \/ \/ \/ \/ \/
## ______________________ ______________________
## T H E W A R B E G I N S
## FreeCraft - A free fantasy real time strategy game engine
##
## Makefile - The make file.
##
2002-02-14 14:40:22 -07:00
## (c) Copyright 1998-2002 by Lutz Sammer
2000-03-25 15:38:54 -07:00
##
2001-05-30 08:47:11 -06:00
## FreeCraft is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
2002-03-01 18:30:59 -07:00
## by the Free Software Foundation; only version 2 of the License.
2001-05-30 08:47:11 -06:00
##
## FreeCraft 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. See the
## GNU General Public License for more details.
##
2000-03-25 15:38:54 -07:00
## $Id$
##
TOPDIR= .
RULESFILE ?= Rules.make
WINRULESFILE = Rules.make.WIN32
include $(TOPDIR)/$(RULESFILE)
2002-04-17 13:31:32 -06:00
OBJDIR ?= .
2000-03-25 15:38:54 -07:00
2002-04-05 12:18:27 -07:00
CROSSDIR=/usr/local/cross-tools
2002-03-14 14:01:15 -07:00
MAKEFLAGS= TOPDIR=$(shell pwd)
2000-03-25 15:38:54 -07:00
MODULES= src tools
all: src freecraft$(EXE) tools
2000-03-25 15:38:54 -07:00
help:
@-echo "make cycle clean,depend,tags,all"
@-echo "make install install all files"
@-echo "make uninstall uninstall all files"
@-echo "make run create and run"
@-echo "make runp create and run with profiler"
@-echo "make clean cleanup keep only executables"
@-echo "make clobber clean all files"
@-echo "make distclean clean all files"
@-echo "make ci check in RS"
@-echo "make doc make source documention with doxygen"
@-echo "make doc++ make source documention with doc++"
@-echo "make lockver NAME="version" label current version with symbolic name"
2002-04-06 13:07:09 -07:00
@-echo "make strip strip freecraft and/or freecraft.exe"
2000-03-25 15:38:54 -07:00
@-echo "make tags create ctags"
@-echo "make depend create dependencies"
@-echo "make dist create distribution"
@-echo "make small-dist create small distribution"
@-echo "make buildit create data files from original data"
@-echo "make buildclean cleanup build data files"
@-echo "make win32new (CROSS-COMPILER ONLY) start new win32"
@-echo "make win32 (CROSS-COMPILER ONLY) build the win32 version"
@-echo "make win32distclean (CROSS-COMPILER ONLY) clean all files of win32"
2000-03-25 15:38:54 -07:00
@-echo "make release release it"
cycle::
@$(MAKE) clean
@$(MAKE) depend
@$(MAKE) tags
@$(MAKE) all
run::
@$(MAKE) && ./freecraft
2000-03-25 15:38:54 -07:00
runp::
@$(MAKE) && ./freecraft && if [ -e gmon.sum ]; then \
gprof -s freecraft gmon.out gmon.sum; \
2000-03-25 15:38:54 -07:00
else mv gmon.out gmon.sum; fi
doc::
2001-03-13 09:44:22 -07:00
doxygen contrib/doxygen-freecraft.cfg
2000-03-25 15:38:54 -07:00
doc++::
@$(MAKE) -C src RULESFILE=$(RULESFILE) doc
2000-03-25 15:38:54 -07:00
@if [ ! -d srcdoc ]; then mkdir srcdoc; fi
@$(DOCPP) -v -H -A -a -b -c -j -d srcdoc `find . -name "*.doc" -print`
src::
2002-04-17 13:31:32 -06:00
@$(MAKE) -C src RULESFILE=$(RULESFILE) OBJDIR=$(OBJDIR) all
2000-03-25 15:38:54 -07:00
2002-04-17 11:41:26 -06:00
etlib/$(OBJDIR)/hash.$(OE): etlib/hash.c
@if [ ! -d etlib/$(OBJDIR) ]; then mkdir etlib/$(OBJDIR); fi
$(CC) -c $(CFLAGS) $< -o $@
2002-04-17 11:41:26 -06:00
etlib/$(OBJDIR)/getopt.$(OE): etlib/getopt.c
@if [ ! -d etlib/$(OBJDIR) ]; then mkdir etlib/$(OBJDIR); fi
$(CC) -c $(CFLAGS) $< -o $@
2002-04-17 11:41:26 -06:00
etlib/$(OBJDIR)/prgname.$(OE): etlib/prgname.c
@if [ ! -d etlib/$(OBJDIR) ]; then mkdir etlib/$(OBJDIR); fi
$(CC) -c $(CFLAGS) $< -o $@
2000-03-25 15:38:54 -07:00
2002-04-17 11:41:26 -06:00
src/$(OBJDIR)/main.$(OE): src/main.c
@if [ ! -d src/$(OBJDIR) ]; then mkdir src/$(OBJDIR); fi
$(CC) -c $(CFLAGS) $< -o $@
2002-04-17 11:41:26 -06:00
src/$(OBJDIR)/libclone.a: ;
2000-03-25 15:38:54 -07:00
# UNIX-TARGET
2002-04-17 11:41:26 -06:00
freecraft: src etlib/$(OBJDIR)/hash.$(OE) src/$(OBJDIR)/libclone.a
$(CCLD) -o freecraft src/$(OBJDIR)/libclone.a etlib/$(OBJDIR)/hash.$(OE) $(CLONELIBS) -I. $(CFLAGS)
2000-03-25 15:38:54 -07:00
# WIN32-TARGET
2002-04-17 11:41:26 -06:00
freecraft.exe: src etlib/$(OBJDIR)/prgname.$(OE) etlib/$(OBJDIR)/getopt.$(OE) \
etlib/$(OBJDIR)/hash.$(OE) src/$(OBJDIR)/freecraftrc.$(OE) \
src/$(OBJDIR)/libclone.a src/$(OBJDIR)/main.$(OE)
$(CCLD) -o freecraft$(EXE) src/$(OBJDIR)/main.$(OE) \
src/$(OBJDIR)/libclone.a src/$(OBJDIR)/freecraftrc.$(OE) \
etlib/$(OBJDIR)/prgname.$(OE) etlib/$(OBJDIR)/getopt.$(OE) \
etlib/$(OBJDIR)/hash.$(OE) \
-lSDLmain $(CLONELIBS) -I. $(CFLAGS)
2000-03-25 15:38:54 -07:00
2002-04-05 12:18:27 -07:00
strip:
@if [ -f freecraft ]; then strip freecraft; fi
@if [ -f freecraft.exe ]; then $(CROSSDIR)/i386-mingw32msvc/bin/strip freecraft.exe; fi
2002-04-17 11:41:26 -06:00
src/$(OBJDIR)/freecraftrc.$(OE): src/freecraft.rc
windres --include-dir contrib -osrc/$(OBJDIR)/freecraftrc.$(OE) src/freecraft.rc
2000-06-26 16:44:13 -06:00
2001-03-13 09:44:22 -07:00
# -L. -lefence
# -Lccmalloc-0.2.3/src -lccmalloc -ldl
2000-03-25 15:38:54 -07:00
2001-09-23 12:36:29 -06:00
echo::
@-echo CFLAGS: $(CFLAGS)
@-echo LIBS: $(CLONELIBS)
2000-03-25 15:38:54 -07:00
tools::
@$(MAKE) -C tools RULESFILE=$(RULESFILE) all
2000-03-25 15:38:54 -07:00
clean::
@set -e; for i in $(MODULES) ; do $(MAKE) -C $$i RULESFILE=$(RULESFILE) clean ; done
2002-04-17 11:41:26 -06:00
$(RM) core gmon.out cscope.out *.doc etlib/$(OBJDIR)/*.$(OE) .#*
2000-03-25 15:38:54 -07:00
clobber: clean
@set -e; for i in $(MODULES) ; do $(MAKE) -C $$i RULESFILE=$(RULESFILE) clobber ; done
$(RM) freecraft$(EXE) gmon.sum *~ stderr.txt stdout.txt
2000-03-25 15:38:54 -07:00
$(RM) -r srcdoc/*
@$(MAKE) -C tools RULESFILE=$(RULESFILE) clobber
2000-03-25 15:38:54 -07:00
distclean: clobber
@echo
ci::
@set -e; for i in $(MODULES) ; do $(MAKE) -C $$i RULESFILE=$(RULESFILE) ci ; done
ci -l Makefile Common.mk $(RULESFILE) .indent.pro \
2001-03-13 09:44:22 -07:00
contrib/doxygen-freecraft.cfg \
2000-03-25 15:38:54 -07:00
$(CCLS) $(DOCS)
lockver::
@set -e; for i in $(MODULES) ; do $(MAKE) -C $$i RULESFILE=$(RULESFILE) lockver ; done
$(LOCKVER) Makefile Common.mk $(RULESFILE) .indent.pro \
2001-03-13 09:44:22 -07:00
contrib/doxygen-freecraft.cfg \
2000-03-25 15:38:54 -07:00
$(CCLS) $(DOCS)
tags::
@$(MAKE) -C src RULESFILE=$(RULESFILE) tags
2000-03-25 15:38:54 -07:00
depend::
@$(MAKE) -C src RULESFILE=$(RULESFILE) depend
2000-03-25 15:38:54 -07:00
##############################################################################
# Distributions
##############################################################################
DOCS = README README.BeOS doc/readme.html doc/install.html \
doc/freecraft.html doc/datadir.html \
doc/faq.html doc/ChangeLog.html doc/todo.html doc/freecraft.lsm \
2001-05-30 08:47:11 -06:00
doc/development.html doc/gpl.txt doc/gpl.html doc/SIOD.txt \
2001-09-23 12:36:29 -06:00
doc/ccl/ai.html doc/ccl/ccl.html doc/ccl/config.html \
doc/ccl/icon.html doc/ccl/tileset.html doc/ccl/unittype.html \
2002-03-01 18:30:59 -07:00
doc/ccl/research.html doc/graphic/*.html doc/graphic/*.png \
2002-03-08 09:38:42 -07:00
doc/trigger.txt debian/freecraft.6
2000-03-25 15:38:54 -07:00
2000-06-26 16:44:13 -06:00
PICS = contrib/freecraft.png contrib/freecraft.ico
2000-03-25 15:38:54 -07:00
2002-06-14 16:34:52 -06:00
PUDS = contrib/puds/single/*.pud.gz contrib/puds/multi/*.pud.gz \
contrib/puds/single/*.txt contrib/puds/multi/*.txt
2002-06-01 14:08:33 -06:00
CCLS = data/ccl/units.ccl data/ccl/human/units.ccl data/ccl/orc/units.ccl \
data/ccl/constructions.ccl data/ccl/human/constructions.ccl \
data/ccl/orc/constructions.ccl \
data/ccl/missiles.ccl data/ccl/icons.ccl \
data/ccl/sound.ccl data/ccl/freecraft.ccl \
data/ccl/ui.ccl data/ccl/human/ui.ccl data/ccl/orc/ui.ccl \
data/ccl/upgrade.ccl data/ccl/human/upgrade.ccl \
data/ccl/orc/upgrade.ccl \
data/ccl/buttons.ccl data/ccl/human/buttons.ccl \
data/ccl/orc/buttons.ccl \
data/ccl/fonts.ccl data/ccl/ai.ccl \
data/ccl/tilesets.ccl data/ccl/tilesets/summer.ccl \
data/ccl/tilesets/winter.ccl \
data/ccl/tilesets/wasteland.ccl data/ccl/tilesets/swamp.ccl \
data/ccl/campaigns.ccl data/ccl/credits.ccl \
2002-03-01 18:30:59 -07:00
data/ccl/human/campaign1.ccl data/ccl/human/campaign2.ccl \
data/ccl/orc/campaign1.ccl data/ccl/orc/campaign2.ccl \
2002-03-08 09:38:42 -07:00
data/ccl/anim.ccl data/ccl/wc2.ccl data/default.cm \
2002-06-16 03:03:51 -06:00
data/ccl/tips.ccl data/ccl/menus.ccl data/ccl/keystrokes.ccl \
2002-06-16 17:40:47 -06:00
data/ccl/editor.ccl data/campaigns/*/*.cm
2000-03-25 15:38:54 -07:00
2002-03-08 09:38:42 -07:00
CONTRIB = contrib/cross.png contrib/red_cross.png \
contrib/health.png contrib/mana.png \
2001-06-25 08:17:18 -06:00
contrib/health2.png contrib/mana2.png \
2001-08-01 16:39:42 -06:00
contrib/ore,stone,coal.png contrib/food.png contrib/score.png \
contrib/music/toccata.mod.gz \
2002-05-31 08:35:51 -06:00
contrib/msvc.zip contrib/macosx.tgz contrib/stdint.h
2000-03-25 15:38:54 -07:00
2001-03-13 09:44:22 -07:00
MISC = Makefile Common.mk Rules.make.orig FreeCraft-beos.proj setup \
contrib/doxygen-freecraft.cfg contrib/doxygen-header.html \
2000-03-25 15:38:54 -07:00
.indent.pro make/common.scc make/rules.scc make/makefile.scc \
make/README tools/udta.c tools/ugrd.c $(CONTRIB) \
2000-06-26 16:44:13 -06:00
etlib/hash.c etlib/getopt.c etlib/prgname.c etlib/prgname.h
2000-03-25 15:38:54 -07:00
mydate = $(shell date +%y%m%d)
distdir = freecraft-$(mydate)
2000-03-25 15:38:54 -07:00
dist::
$(RM) $(DISTLIST)
@set -e; for i in $(MODULES); do $(MAKE) -C $$i RULESFILE=$(RULESFILE) distlist ; done
2000-03-25 15:38:54 -07:00
echo >>$(DISTLIST)
echo $(PICS) >>$(DISTLIST)
2002-06-01 14:08:33 -06:00
echo $(PUDS) >>$(DISTLIST)
2000-03-25 15:38:54 -07:00
echo $(MISC) >>$(DISTLIST)
echo $(CCLS) >>$(DISTLIST)
echo $(DOCS) >>$(DISTLIST)
rm -rf $(distdir)
mkdir $(distdir)
chmod 777 $(distdir)
2001-03-13 09:44:22 -07:00
for i in `cat $(DISTLIST)`; do echo $$i; done | cpio -pdml --quiet $(distdir)
2001-06-25 08:17:18 -06:00
chown -R johns:freecraft $(distdir)
chmod -R a+rX $(distdir)
2000-03-25 15:38:54 -07:00
tar chzf $(distdir).tar.gz $(distdir)
tar cjhf $(distdir).tar.bz2 $(distdir)
2002-02-14 14:40:22 -07:00
echo "(c) 2002 by the FreeCraft Project http://FreeCraft.Org" | \
2000-06-26 16:44:13 -06:00
zip -zq9r $(distdir).zip $(distdir)
2000-03-25 15:38:54 -07:00
$(RM) $(DISTLIST)
$(RM) -r $(distdir)
du -h $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
small-dist::
@$(RM) $(DISTLIST)
$(MAKE) -C src RULESFILE=$(RULESFILE) distlist
$(MAKE) -C tools RULESFILE=$(RULESFILE) distlist
2000-03-25 15:38:54 -07:00
echo $(MISC) >>$(DISTLIST)
echo $(CCLS) >>$(DISTLIST)
echo $(DOCS) >>$(DISTLIST)
rm -rf $(distdir)
mkdir $(distdir)
chmod 777 $(distdir)
2001-03-13 09:44:22 -07:00
for i in `cat $(DISTLIST)`; do echo $$i; done | cpio -pdml --quiet $(distdir)
2001-06-25 08:17:18 -06:00
chown -R johns:freecraft $(distdir)
chmod -R a+rX $(distdir)
2000-03-25 15:38:54 -07:00
tar chzf $(distdir)-small.tar.gz $(distdir)
tar cjhf $(distdir)-small.tar.bz2 $(distdir)
2002-02-14 14:40:22 -07:00
echo "(c) 2002 by the FreeCraft Project http://FreeCraft.Org" | \
2000-06-26 16:44:13 -06:00
zip -zq9r $(distdir)-small.zip $(distdir)
2000-03-25 15:38:54 -07:00
$(RM) $(DISTLIST)
$(RM) -r $(distdir)
du -h $(distdir)-small.tar.gz $(distdir)-small.tar.bz2 $(distdir)-small.zip
bin-dist:: all
$(RM) $(DISTLIST)
echo $(PICS) >>$(DISTLIST)
2002-06-01 14:08:33 -06:00
echo $(PUDS) >>$(DISTLIST)
2000-03-25 15:38:54 -07:00
echo $(CONTRIB) >>$(DISTLIST)
echo $(CCLS) >>$(DISTLIST)
echo $(DOCS) >>$(DISTLIST)
echo freecraft$(EXE) >>$(DISTLIST)
2000-03-25 15:38:54 -07:00
echo tools/wartool$(EXE) >>$(DISTLIST)
echo tools/build.sh >>$(DISTLIST)
rm -rf $(distdir)
mkdir $(distdir)
chmod 777 $(distdir)
2001-03-13 09:44:22 -07:00
for i in `cat $(DISTLIST)`; do echo $$i; done | cpio -pdml --quiet $(distdir)
2001-06-25 08:17:18 -06:00
chown -R johns:freecraft $(distdir)
chmod -R a+rX $(distdir)
strip -s -R .comment $(distdir)/freecraft$(EXE)
2000-03-25 15:38:54 -07:00
strip -s -R .comment $(distdir)/tools/wartool$(EXE)
tar chzf freecraft-$(mydate)-bin.tar.gz $(distdir)
tar cjhf freecraft-$(mydate)-bin.tar.bz2 $(distdir)
2000-03-25 15:38:54 -07:00
$(RM) $(DISTLIST)
$(RM) -r $(distdir)
2000-07-12 17:19:13 -06:00
#----------------------------------------------------------------------------
2000-03-25 15:38:54 -07:00
win32-bin-dist2:: win32
@$(RM) $(DISTLIST)
@echo $(PICS) >>$(DISTLIST)
2002-06-01 14:08:33 -06:00
@echo $(PUDS) >>$(DISTLIST)
2000-03-25 15:38:54 -07:00
@echo $(CONTRIB) >>$(DISTLIST)
@echo $(CCLS) >>$(DISTLIST)
@echo $(DOCS) >>$(DISTLIST)
2001-05-30 08:47:11 -06:00
@echo SDL.dll doc/README-SDL.txt doc/ZIP-LICENSE >>$(DISTLIST)
@echo freecraft$(EXE) >>$(DISTLIST)
2000-03-25 15:38:54 -07:00
@echo tools/wartool$(EXE) >>$(DISTLIST)
@echo tools/build.bat >>$(DISTLIST)
@rm -rf $(distdir)
@mkdir $(distdir)
@chmod 777 $(distdir)
2001-03-13 09:44:22 -07:00
@for i in `cat $(DISTLIST)`; do echo $$i; done | cpio -pdml --quiet $(distdir)
2000-06-26 16:44:13 -06:00
@cp tools/build.bat $(distdir)
2001-06-25 08:17:18 -06:00
chown -R johns:freecraft $(distdir)
@chmod -R a+rX $(distdir)
@strip -s -R .comment $(distdir)/freecraft$(EXE)
2000-03-25 15:38:54 -07:00
@strip -s -R .comment $(distdir)/tools/wartool$(EXE)
2002-02-14 14:40:22 -07:00
@echo "(c) 2002 by the FreeCraft Project http://FreeCraft.Org" | \
2000-06-26 16:44:13 -06:00
zip -zq9r freecraft-$(mydate)-win32bin.zip $(distdir)
2000-03-25 15:38:54 -07:00
@$(RM) $(DISTLIST)
@$(RM) -r $(distdir)
du -h freecraft-$(mydate)-win32bin.zip
2000-03-25 15:38:54 -07:00
2000-06-26 16:44:13 -06:00
win32-bin-dist: win32
@export PATH=$(CROSSDIR)/i386-mingw32msvc/bin:$(CROSSDIR)/bin:$$PATH; \
$(MAKE) RULESFILE=$(WINRULESFILE) $(WIN32) win32-bin-dist2
2000-06-26 16:44:13 -06:00
win32-exe-dist: win32-bin-dist
cat tools/SFXWiz32-gcc.exe freecraft-$(mydate)-win32bin.zip \
> freecraft-$(mydate)-win32bin.exe
2000-03-25 15:38:54 -07:00
2000-07-12 17:19:13 -06:00
#----------------------------------------------------------------------------
MYDATE = $(shell date +%y%m%d)
PCRAFT= freecraft-$(MYDATE).tar.bz2
LCRAFT= freecraft-$(MYDATE)-bin.tar.bz2
WCRAFT= freecraft-$(MYDATE)-win32bin.zip
2002-05-26 07:42:33 -06:00
FCMP= ../fcmp-*.tar.gz
2000-07-12 17:19:13 -06:00
linux-complete:
mkdir freecraft-complete
tar xjf $(PCRAFT)
tar xjf $(LCRAFT)
cp -a freecraft-$(MYDATE)/* freecraft-complete
mv freecraft-complete/data freecraft-complete/data.wc2
2002-03-08 09:38:42 -07:00
tar xzCf freecraft-complete $(FCMP)
rm -rf freecraft-$(MYDATE)
2001-05-02 16:43:35 -06:00
chmod 777 freecraft-complete
chown -R johns:freecraft freecraft-complete
2001-05-02 16:43:35 -06:00
chmod -R a+rX freecraft-complete
2001-02-19 09:56:17 -07:00
-tar czhf freecraft-$(MYDATE)-complete-linux.tar.gz freecraft-complete
-tar cjhf freecraft-$(MYDATE)-complete-linux.tar.bz2 freecraft-complete
rm -rf freecraft-complete
2000-07-12 17:19:13 -06:00
win32-complete:
mkdir freecraft-complete
tar xjf $(PCRAFT)
2000-07-12 17:19:13 -06:00
unzip -oq $(WCRAFT)
cp -a freecraft-$(MYDATE)/* freecraft-complete
mv freecraft-complete/data freecraft-complete/data.wc2
2002-03-08 09:38:42 -07:00
tar xzCf freecraft-complete $(FCMP)
rm -rf freecraft-$(MYDATE)
2001-05-02 16:43:35 -06:00
chmod 777 freecraft-complete
chown -R johns:freecraft freecraft-complete
2001-05-02 16:43:35 -06:00
chmod -R a+rX freecraft-complete
2002-02-14 14:40:22 -07:00
echo "(c) 2002 by the FreeCraft Project http://FreeCraft.Org" | \
zip -zq9r freecraft-$(MYDATE)-complete-win32.zip freecraft-complete
cat tools/SFXWiz32-gcc.exe freecraft-$(MYDATE)-complete-win32.zip \
> freecraft-$(MYDATE)-complete-win32.exe
rm -rf freecraft-complete
complete: linux-complete win32-complete
2000-07-12 17:19:13 -06:00
#----------------------------------------------------------------------------
difffile= freecraft-`date +%y%m%d`.diff
2001-03-13 09:44:22 -07:00
diff:
2000-03-25 15:38:54 -07:00
@$(RM) $(difffile)
@$(RM) $(DISTLIST)
$(MAKE) -C src RULESFILE=$(RULESFILE) distlist
$(MAKE) -C tools RULESFILE=$(RULESFILE) distlist
2000-03-25 15:38:54 -07:00
echo $(MISC) >>$(DISTLIST)
echo $(CCLS) >>$(DISTLIST)
echo $(DOCS) >>$(DISTLIST)
rcsdiff -u `cat $(DISTLIST)` > $(difffile)
buildit: tools
. tools/build.sh
buildclean:
rm -rf data/*.rgb data/*.gimp data/puds data/sound data/graphic \
data/interface data/campaigns data/text data/health.png data/mana.png \
2000-04-15 19:34:54 -06:00
data/default.pud.gz data/freecraft.png
2002-03-08 09:38:42 -07:00
rm -rf data/graphics data/sounds data/texts data/music data/videos
2000-03-25 15:38:54 -07:00
release:
2000-06-26 16:44:13 -06:00
$(MAKE) distclean
$(MAKE) depend
2001-07-23 17:52:00 -06:00
$(MAKE) bin-dist
2000-06-26 16:44:13 -06:00
$(MAKE) win32new
$(MAKE) win32-bin-dist
2000-07-12 17:19:13 -06:00
$(MAKE) win32-exe-dist
2000-06-26 16:44:13 -06:00
$(MAKE) win32distclean
2000-07-12 17:19:13 -06:00
$(MAKE) dist
2000-03-25 15:38:54 -07:00
##############################################################################
# WIN32 Crosscompiler Build
##############################################################################
#-lws2_32 -Wl,--stack,63550000 -Wl,--stack,16777216
2000-03-25 15:38:54 -07:00
WIN32= \
EXE='.exe' \
2001-07-23 17:52:00 -06:00
XLDFLAGS='' \
XIFLAGS='' \
VIDEO='-DUSE_WIN32 $(SDL)' \
VIDEOLIB='-L$(CROSSDIR)/i386-mingw32msvc/lib $(SDLLIB) -lwsock32 -lws2_32' \
RULESFILE=$(WINRULESFILE)
2000-03-25 15:38:54 -07:00
win32new:
@$(MAKE) RULESFILE=$(WINRULESFILE) distclean
export PATH=$(CROSSDIR)/i386-mingw32msvc/bin:$(CROSSDIR)/bin:$$PATH; \
2002-03-27 13:37:46 -07:00
$(MAKE) $(WIN32) depend
2000-03-25 15:38:54 -07:00
win32_2:
2002-03-27 13:37:46 -07:00
$(MAKE) $(WIN32) all
2000-03-25 15:38:54 -07:00
win32:
export PATH=$(CROSSDIR)/i386-mingw32msvc/bin:$(CROSSDIR)/bin:$$PATH; \
$(MAKE) $(WIN32) win32_2
2000-03-25 15:38:54 -07:00
win32distclean:
export PATH=$(CROSSDIR)/i386-mingw32msvc/bin:$(CROSSDIR)/bin:$$PATH; \
2002-03-27 13:37:46 -07:00
$(MAKE) $(WIN32) distclean
2000-03-25 15:38:54 -07:00
##############################################################################
2001-03-13 09:44:22 -07:00
# INSTALL/UNINSTALL
2000-03-25 15:38:54 -07:00
##############################################################################
2002-03-29 18:53:19 -07:00
install: all install-freecraft install-tools
install-freecraft:
@echo installing freecraft
mkdir -p $(PREFIX)/lib/games/freecraft
mkdir -p /var/lib/games
install -m 755 freecraft $(PREFIX)/lib/games/freecraft
cp -R data $(PREFIX)/lib/games/freecraft
echo "$(PREFIX)/lib/games/freecraft/freecraft \
-d $(PREFIX)/lib/games/freecraft/data "\$$\@" | tee /var/lib/games/freecraft.log" \
2002-03-29 18:53:19 -07:00
>$(PREFIX)/bin/freecraft
chmod +x $(PREFIX)/bin/freecraft
@echo installation of freecraft complete
2000-03-25 15:38:54 -07:00
install-tools: all
2002-03-29 18:53:19 -07:00
@echo installing freecraft tools
mkdir -p $(PREFIX)/lib/games/freecraft/tools
install -m 755 tools/wartool $(PREFIX)/lib/games/freecraft/tools
install -m 755 tools/build.sh $(PREFIX)/lib/games/freecraft/tools
@echo installation of freecraft tools complete
2000-03-25 15:38:54 -07:00
uninstall:
2002-03-29 18:53:19 -07:00
@echo uninstalling freecraft and freecraft tools
rm -rf $(PREFIX)/lib/games/freecraft
rm $(PREFIX)/bin/freecraft
@echo uninstallation complete