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