macemu/BasiliskII/Makefile

108 lines
3.1 KiB
Makefile
Raw Normal View History

# Makefile for creating Basilisk II distributions
# Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de>
2000-10-05 17:26:37 +00:00
VERSION := $(shell sed <BasiliskII.spec -n '/^\%define version */s///p')
RELEASE := $(shell sed <BasiliskII.spec -n '/^\%define release */s///p')
1999-10-04 23:20:01 +00:00
VERNAME := BasiliskII-$(VERSION)
1999-10-04 23:20:01 +00:00
SRCARCHIVE := $(shell date +BasiliskII_src_%d%m%Y.tar.gz)
1999-10-06 22:09:47 +00:00
AMIGAARCHIVE := $(VERNAME)-$(RELEASE).amiga.lzh
1999-10-04 23:20:01 +00:00
BEOSPPCARCHIVE := $(VERNAME)-$(RELEASE).beosppc.zip
BEOSX86ARCHIVE := $(VERNAME)-$(RELEASE).beosx86.zip
TMPDIR := $(shell date +/tmp/build%M%S)
ISODATE := $(shell date "+%Y-%m-%d %H:%M")
1999-10-04 23:20:01 +00:00
DOCS := $(shell sed <BasiliskII.spec -n '/^\%doc */s///p')
SRCS := src
default:
@echo "This top-level Makefile is for creating Basilisk II distributions."
@echo "If you want to install Basilisk II V$(VERSION) on your system, please follow"
@echo "the instructions in the file INSTALL."
@echo "If you want to create a Basilisk II V$(VERSION) distribution, type \"make help\""
@echo "to get a list of possible targets."
help:
@echo "The following targets are available:"
@echo " tarball source tarball ($(SRCARCHIVE))"
2000-10-05 17:26:37 +00:00
@echo " rpm source and binary RPMs"
@echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))"
@echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
@echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
clean:
-rm -f $(SRCARCHIVE)
-rm -f $(AMIGAARCHIVE) $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
#
# Source tarball
#
tarball: $(SRCARCHIVE)
$(SRCARCHIVE): $(SRCS) $(DOCS)
-rm -rf $(TMPDIR)
mkdir $(TMPDIR)
cd $(TMPDIR); cvs export -D "$(ISODATE)" BasiliskII
2000-10-05 17:26:37 +00:00
cp src/Unix/config.h.in src/Unix/configure $(TMPDIR)/BasiliskII/src/Unix
rm $(TMPDIR)/BasiliskII/Makefile
rm -rf $(TMPDIR)/BasiliskII/src/powerrom_cpu #not yet ready for distribution
mv $(TMPDIR)/BasiliskII $(TMPDIR)/$(VERNAME)
cd $(TMPDIR); tar cfz $@ $(VERNAME)
mv $(TMPDIR)/$@ .
rm -rf $(TMPDIR)
#
2000-10-05 17:26:37 +00:00
# RPMs (source and binary)
#
2000-10-05 17:26:37 +00:00
rpm: $(SRCARCHIVE)
rpm --tarball a $(SRCARCHIVE)
#
# Binary archive for AmigaOS
#
amiga: $(AMIGAARCHIVE)
$(AMIGAARCHIVE): $(SRCS) $(DOCS) src/AmigaOS/BasiliskII
-rm -rf $(TMPDIR)
mkdir $(TMPDIR)
mkdir $(TMPDIR)/$(VERNAME)
cp $(DOCS) $(TMPDIR)/$(VERNAME)
cp src/AmigaOS/BasiliskII $(TMPDIR)/$(VERNAME)
cp src/AmigaOS/BasiliskII.info $(TMPDIR)/$(VERNAME)
chmod 775 $(TMPDIR)/$(VERNAME)/BasiliskII
cd $(TMPDIR); lha a $@ $(VERNAME)
mv $(TMPDIR)/$@ .
rm -rf $(TMPDIR)
#
# Binary archive for BeOS/ppc
#
beosppc: $(BEOSPPCARCHIVE)
$(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/BasiliskII
-rm -rf $(TMPDIR)
mkdir $(TMPDIR)
mkdir $(TMPDIR)/$(VERNAME)
cp $(DOCS) $(TMPDIR)/$(VERNAME)
cp src/BeOS/obj.ppc/BasiliskII $(TMPDIR)/$(VERNAME)
mimeset -f $(TMPDIR)
cd $(TMPDIR); zip -ry $@ $(VERNAME)/
mv $(TMPDIR)/$@ .
rm -rf $(TMPDIR)
#
# Binary archive for BeOS/x86
#
beosx86: $(BEOSX86ARCHIVE)
$(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/BasiliskII
-rm -rf $(TMPDIR)
mkdir $(TMPDIR)
mkdir $(TMPDIR)/$(VERNAME)
cp $(DOCS) $(TMPDIR)/$(VERNAME)
cp src/BeOS/obj.x86/BasiliskII $(TMPDIR)/$(VERNAME)
mimeset -f $(TMPDIR)
cd $(TMPDIR); zip -ry $@ $(VERNAME)/
mv $(TMPDIR)/$@ .
rm -rf $(TMPDIR)