1999-10-03 15:10:50 +00:00
|
|
|
# Makefile for creating Basilisk II distributions
|
|
|
|
# Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de>
|
|
|
|
|
1999-10-04 23:20:01 +00:00
|
|
|
VERSION := $(shell sed <BasiliskII.spec -n '/^Version: */s///p')
|
|
|
|
RELEASE := $(shell sed <BasiliskII.spec -n '/^Release: */s///p')
|
|
|
|
VERNAME := BasiliskII-$(VERSION)
|
1999-10-03 17:21:45 +00:00
|
|
|
|
1999-10-04 23:20:01 +00:00
|
|
|
SRCARCHIVE := $(shell date +BasiliskII_src_%d%m%Y.tar.gz)
|
|
|
|
SRCRPM := $(VERNAME)-$(RELEASE).src.rpm
|
|
|
|
BINRPM := $(VERNAME)-$(RELEASE).i386.rpm
|
|
|
|
AMIGAARCHIVE := $(VERNAME)-$(RELEASE).amiga.lha
|
|
|
|
BEOSPPCARCHIVE := $(VERNAME)-$(RELEASE).beosppc.zip
|
|
|
|
BEOSX86ARCHIVE := $(VERNAME)-$(RELEASE).beosx86.zip
|
1999-10-03 16:21:28 +00:00
|
|
|
|
1999-10-05 10:36:41 +00:00
|
|
|
TMPDIR := $(shell date +/tmp/build%M%S)
|
1999-10-04 23:20:01 +00:00
|
|
|
RPMDIR := /usr/src/redhat
|
1999-10-05 10:36:41 +00:00
|
|
|
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
|
1999-10-03 17:11:52 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
@echo "This top-level Makefile is for creating Basilisk II distributions."
|
1999-10-03 17:21:45 +00:00
|
|
|
@echo "If you want to install Basilisk II V$(VERSION) on your system, please follow"
|
1999-10-03 17:11:52 +00:00
|
|
|
@echo "the instructions in the file INSTALL."
|
1999-10-03 17:21:45 +00:00
|
|
|
@echo "If you want to create a Basilisk II V$(VERSION) distribution, type \"make help\""
|
1999-10-03 17:11:52 +00:00
|
|
|
@echo "to get a list of possible targets."
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "The following targets are available:"
|
|
|
|
@echo " tarball source tarball ($(SRCARCHIVE))"
|
1999-10-04 23:11:18 +00:00
|
|
|
@echo " rpm source and binary RPMs ($(SRCRPM) and $(BINRPM))"
|
1999-10-03 17:11:52 +00:00
|
|
|
@echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))"
|
|
|
|
@echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
|
|
|
|
@echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
|
1999-10-03 15:10:50 +00:00
|
|
|
|
1999-10-03 20:40:05 +00:00
|
|
|
clean:
|
|
|
|
-rm -f $(SRCARCHIVE)
|
1999-10-04 23:11:18 +00:00
|
|
|
-rm -f $(SRCRPM) $(BINRPM)
|
1999-10-03 20:40:05 +00:00
|
|
|
-rm -f $(AMIGAARCHIVE) $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
|
|
|
|
|
1999-10-03 15:10:50 +00:00
|
|
|
#
|
|
|
|
# Source tarball
|
|
|
|
#
|
1999-10-03 16:21:28 +00:00
|
|
|
tarball: $(SRCARCHIVE)
|
1999-10-03 15:10:50 +00:00
|
|
|
|
1999-10-03 17:11:52 +00:00
|
|
|
$(SRCARCHIVE): $(SRCS) $(DOCS)
|
1999-10-04 00:39:43 +00:00
|
|
|
-rm -rf $(TMPDIR)
|
|
|
|
mkdir $(TMPDIR)
|
1999-10-05 10:36:41 +00:00
|
|
|
cd $(TMPDIR); cvs export -D "$(ISODATE)" BasiliskII
|
1999-10-04 00:39:43 +00:00
|
|
|
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)
|
1999-10-03 15:10:50 +00:00
|
|
|
|
|
|
|
#
|
1999-10-03 20:40:05 +00:00
|
|
|
# RPMs (source and i386 binary)
|
1999-10-03 15:10:50 +00:00
|
|
|
#
|
1999-10-04 23:11:18 +00:00
|
|
|
rpm: $(SRCRPM) $(BINRPM)
|
1999-10-03 20:40:05 +00:00
|
|
|
|
|
|
|
$(RPMDIR)/SOURCES/$(SRCARCHIVE): $(SRCARCHIVE)
|
|
|
|
cp $(SRCARCHIVE) $(RPMDIR)/SOURCES
|
|
|
|
|
1999-10-04 23:11:18 +00:00
|
|
|
$(RPMDIR)/SRPMS/$(SRCRPM) $(RPMDIR)/RPMS/i386/$(BINRPM): $(RPMDIR)/SOURCES/$(SRCARCHIVE) BasiliskII.spec
|
1999-10-03 17:11:52 +00:00
|
|
|
rpm -ba BasiliskII.spec
|
1999-10-03 15:10:50 +00:00
|
|
|
|
1999-10-03 20:40:05 +00:00
|
|
|
$(SRCRPM): $(RPMDIR)/SRPMS/$(SRCRPM)
|
|
|
|
cp $(RPMDIR)/SRPMS/$(SRCRPM) .
|
|
|
|
|
1999-10-04 23:11:18 +00:00
|
|
|
$(BINRPM): $(RPMDIR)/RPMS/i386/$(BINRPM)
|
|
|
|
cp $(RPMDIR)/RPMS/i386/$(BINRPM) .
|
1999-10-03 16:21:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Binary archive for AmigaOS
|
|
|
|
#
|
|
|
|
amiga: $(AMIGAARCHIVE)
|
|
|
|
|
1999-10-03 17:11:52 +00:00
|
|
|
$(AMIGAARCHIVE): $(SRCS) $(DOCS) src/AmigaOS/BasiliskII
|
1999-10-04 00:39:43 +00:00
|
|
|
-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)
|
1999-10-03 16:21:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Binary archive for BeOS/ppc
|
|
|
|
#
|
|
|
|
beosppc: $(BEOSPPCARCHIVE)
|
|
|
|
|
1999-10-03 17:11:52 +00:00
|
|
|
$(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/BasiliskII
|
1999-10-04 00:39:43 +00:00
|
|
|
-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)
|
1999-10-03 16:21:28 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Binary archive for BeOS/x86
|
|
|
|
#
|
|
|
|
beosx86: $(BEOSX86ARCHIVE)
|
|
|
|
|
1999-10-03 17:11:52 +00:00
|
|
|
$(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/BasiliskII
|
1999-10-04 00:39:43 +00:00
|
|
|
-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)
|