1 |
# Makefile for creating Basilisk II distributions |
2 |
# Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de> |
3 |
|
4 |
VERSION = $(shell grep '^Version' <BasiliskII.spec | sed 's/Version: *//') |
5 |
|
6 |
SRCARCHIVE = $(shell date +BasiliskII_src_%d%m%Y.tar.gz) |
7 |
AMIGAARCHIVE = $(shell date +BasiliskII_amiga_%d%m%Y.lha) |
8 |
BEOSPPCARCHIVE = $(shell date +BasiliskII_beos_ppc_%d%m%Y.zip) |
9 |
BEOSX86ARCHIVE = $(shell date +BasiliskII_beos_x86_%d%m%Y.zip) |
10 |
|
11 |
BUILDDIR = /tmp/build |
12 |
DOCS = ChangeLog COPYING INSTALL README TECH TODO |
13 |
SRCS = src |
14 |
|
15 |
default: |
16 |
@echo "This top-level Makefile is for creating Basilisk II distributions." |
17 |
@echo "If you want to install Basilisk II V$(VERSION) on your system, please follow" |
18 |
@echo "the instructions in the file INSTALL." |
19 |
@echo "If you want to create a Basilisk II V$(VERSION) distribution, type \"make help\"" |
20 |
@echo "to get a list of possible targets." |
21 |
|
22 |
help: |
23 |
@echo "The following targets are available:" |
24 |
@echo " tarball source tarball ($(SRCARCHIVE))" |
25 |
@echo " rpm source and binary RPMs" |
26 |
@echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))" |
27 |
@echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))" |
28 |
@echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))" |
29 |
|
30 |
# |
31 |
# Source tarball |
32 |
# |
33 |
tarball: $(SRCARCHIVE) |
34 |
|
35 |
$(SRCARCHIVE): $(SRCS) $(DOCS) |
36 |
-rm -rf $(BUILDDIR) |
37 |
mkdir $(BUILDDIR) |
38 |
cd $(BUILDDIR); cvs checkout BasiliskII |
39 |
rm -rf $(BUILDDIR)/BasiliskII/src/powerrom_cpu #not yet ready for distribution |
40 |
mv $(BUILDDIR)/BasiliskII $(BUILDDIR)/BasiliskII-$(VERSION) |
41 |
cd $(BUILDDIR); tar cfz $@ BasiliskII-$(VERSION) |
42 |
mv $(BUILDDIR)/$@ . |
43 |
rm -rf $(BUILDDIR) |
44 |
|
45 |
# |
46 |
# RPMs |
47 |
# |
48 |
rpm: /usr/src/redhat/SOURCES/$(SRCARCHIVE) BasiliskII.spec |
49 |
rpm -ba BasiliskII.spec |
50 |
|
51 |
/usr/src/redhat/SOURCES/$(SRCARCHIVE): $(SRCARCHIVE) |
52 |
cp $(SRCARCHIVE) /usr/src/redhat/SOURCES |
53 |
|
54 |
# |
55 |
# Binary archive for AmigaOS |
56 |
# |
57 |
amiga: $(AMIGAARCHIVE) |
58 |
|
59 |
$(AMIGAARCHIVE): $(SRCS) $(DOCS) src/AmigaOS/BasiliskII |
60 |
-rm -rf $(BUILDDIR) |
61 |
mkdir $(BUILDDIR) |
62 |
mkdir $(BUILDDIR)/BasiliskII |
63 |
cp $(DOCS) $(BUILDDIR)/BasiliskII |
64 |
cp src/AmigaOS/BasiliskII $(BUILDDIR)/BasiliskII |
65 |
cp src/AmigaOS/BasiliskII.info $(BUILDDIR)/BasiliskII.info |
66 |
cd $(BUILDDIR); lha a $@ BasiliskII |
67 |
mv $(BUILDDIR)/$@ . |
68 |
rm -rf $(BUILDDIR) |
69 |
|
70 |
# |
71 |
# Binary archive for BeOS/ppc |
72 |
# |
73 |
beosppc: $(BEOSPPCARCHIVE) |
74 |
|
75 |
$(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/BasiliskII |
76 |
-rm -rf $(BUILDDIR) |
77 |
mkdir $(BUILDDIR) |
78 |
mkdir $(BUILDDIR)/BasiliskII |
79 |
cp $(DOCS) $(BUILDDIR)/BasiliskII |
80 |
mv src/BeOS/obj.ppc/BasiliskII $(BUILDDIR)/BasiliskII |
81 |
cd $(BUILDDIR); zip -ry $@ BasiliskII/ |
82 |
mv $(BUILDDIR)/$@ . |
83 |
rm -rf $(BUILDDIR) |
84 |
|
85 |
# |
86 |
# Binary archive for BeOS/x86 |
87 |
# |
88 |
beosx86: $(BEOSX86ARCHIVE) |
89 |
|
90 |
$(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/BasiliskII |
91 |
-rm -rf $(BUILDDIR) |
92 |
mkdir $(BUILDDIR) |
93 |
mkdir $(BUILDDIR)/BasiliskII |
94 |
cp $(DOCS) $(BUILDDIR)/BasiliskII |
95 |
mv src/BeOS/obj.x86/BasiliskII $(BUILDDIR)/BasiliskII |
96 |
cd $(BUILDDIR); zip -ry $@ BasiliskII/ |
97 |
mv $(BUILDDIR)/$@ . |
98 |
rm -rf $(BUILDDIR) |