ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/Makefile
Revision: 1.5
Committed: 1999-10-03T20:40:05Z (25 years, 1 month ago) by cebix
Branch: MAIN
Changes since 1.4: +27 -10 lines
Log Message:
- updated documentation
- building RPMs works now

File Contents

# User Rev Content
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.4
7 cebix 1.1 SRCARCHIVE = $(shell date +BasiliskII_src_%d%m%Y.tar.gz)
8 cebix 1.5 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 cebix 1.2
14     BUILDDIR = /tmp/build
15 cebix 1.5 RPMDIR = /usr/src/redhat
16     DOCS = $(shell sed <BasiliskII.spec -n '/^\%doc */s///p')
17 cebix 1.3 SRCS = src
18    
19     default:
20     @echo "This top-level Makefile is for creating Basilisk II distributions."
21 cebix 1.4 @echo "If you want to install Basilisk II V$(VERSION) on your system, please follow"
22 cebix 1.3 @echo "the instructions in the file INSTALL."
23 cebix 1.4 @echo "If you want to create a Basilisk II V$(VERSION) distribution, type \"make help\""
24 cebix 1.3 @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 cebix 1.5 @echo " rpm source and binary RPMs ($(SRCRPM) and $(I386RPM))"
30 cebix 1.3 @echo " amiga AmigaOS binary archive ($(AMIGAARCHIVE))"
31     @echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
32     @echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
33 cebix 1.1
34 cebix 1.5 clean:
35     -rm -f $(SRCARCHIVE)
36     -rm -f $(SRCRPM)
37     -rm -f $(AMIGAARCHIVE) $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
38    
39 cebix 1.1 #
40     # Source tarball
41     #
42 cebix 1.2 tarball: $(SRCARCHIVE)
43 cebix 1.1
44 cebix 1.3 $(SRCARCHIVE): $(SRCS) $(DOCS)
45 cebix 1.1 -rm -rf $(BUILDDIR)
46     mkdir $(BUILDDIR)
47     cd $(BUILDDIR); cvs checkout BasiliskII
48 cebix 1.3 rm -rf $(BUILDDIR)/BasiliskII/src/powerrom_cpu #not yet ready for distribution
49 cebix 1.4 mv $(BUILDDIR)/BasiliskII $(BUILDDIR)/BasiliskII-$(VERSION)
50     cd $(BUILDDIR); tar cfz $@ BasiliskII-$(VERSION)
51 cebix 1.1 mv $(BUILDDIR)/$@ .
52     rm -rf $(BUILDDIR)
53    
54     #
55 cebix 1.5 # RPMs (source and i386 binary)
56 cebix 1.1 #
57 cebix 1.5 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 cebix 1.3 rpm -ba BasiliskII.spec
64 cebix 1.1
65 cebix 1.5 $(SRCRPM): $(RPMDIR)/SRPMS/$(SRCRPM)
66     cp $(RPMDIR)/SRPMS/$(SRCRPM) .
67    
68     $(I386RPM): $(RPMDIR)/RPMS/i386/$(I386RPM)
69     cp $(RPMDIR)/RPMS/i386/$(I386RPM) .
70 cebix 1.2
71     #
72     # Binary archive for AmigaOS
73     #
74     amiga: $(AMIGAARCHIVE)
75    
76 cebix 1.3 $(AMIGAARCHIVE): $(SRCS) $(DOCS) src/AmigaOS/BasiliskII
77 cebix 1.2 -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 cebix 1.3 cd $(BUILDDIR); lha a $@ BasiliskII
84 cebix 1.2 mv $(BUILDDIR)/$@ .
85     rm -rf $(BUILDDIR)
86    
87     #
88     # Binary archive for BeOS/ppc
89     #
90     beosppc: $(BEOSPPCARCHIVE)
91    
92 cebix 1.3 $(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/BasiliskII
93 cebix 1.2 -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 cebix 1.3 $(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/BasiliskII
108 cebix 1.2 -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)