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