blob: f63ba0f5dc4e6193b2fafee5fb9f5986db023290 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
--- Makefile.orig Fri Mar 28 13:15:40 1997
+++ Makefile Tue Jun 16 14:28:16 1998
@@ -4,10 +4,9 @@
# in "compiler/OMachine.Mod" accordingly.
# where to install the binaries?
-BIN = $(HOME)/bin
-MANPATH = /usr/man
-
-
+BIN = ${PREFIX}/bin
+MANPATH = ${PREFIX}/man
+LIBPATH = ${PREFIX}/lib/o2c-1.16
# you shouldn't have to change anything below
@@ -28,7 +27,7 @@
fi
-rm -f o2c_stage0 o2c_stage1 o2c_stage2 o2c all
# check the hardcoded type sizes against the C types
- gcc -o sizes system/sizes.c
+ gcc -o sizes system/sizes.c -Isystem
./sizes
# build compiler executable from the distributed C sources
$(MAKE) -f makefile_o2c CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' build
@@ -62,26 +61,31 @@
./o2c -MORv --redir system/o2c.red.template UpdateLib
mv o2c o2c_stage2
-install: all
- if [ ! -f $(HOME)/.o2c.red ]; then \
- cp system/o2c.red.template $(HOME)/.o2c.red; \
- fi
+install.man:
+ for i in $(COMMANDS) ; do \
+ cp docs/$$i.1 $(MANPATH)/man1/$$i.1 ; \
+ chmod 644 $(MANPATH)/man1/$$i.1 ; \
+ done
+
+install: all install.man
chmod -R ugo+rX *
-rm -f o2c
- ln o2c_stage2 o2c
+ cp o2c_stage2 o2c
+ mkdir $(LIBPATH)
+ cp system/_OGCC.c $(LIBPATH)
+ cp system/_OGCC.h $(LIBPATH)
+ cp system/ErrorList.Txt $(LIBPATH)
+ cp lib/* $(LIBPATH)
+ chmod 644 $(LIBPATH)/*
for i in $(COMMANDS) ; do \
cp $$i $(BIN)/$$i ; \
chmod 755 $(BIN)/$$i ; \
done
-
-install.man:
- for i in $(COMMANDS) ; do \
- cp docs/$$i.1 $(MANPATH)/man1/$$i.1 ; \
- chmod 644 $(MANPATH)/man1/$$i.1 ; \
- done
+ cp o2 $(BIN)
+ chmod 755 $(BIN)/o2
clean:
- -rm -f makefile_o2c Makefile sizes
+ -rm -f sizes
-rm -f o2c_stage0 o2c_stage1 o2c_stage2 o2c all UpdateLib
-rm -rf obj.distrib
-for i in $(COMMANDS) UpdateLib ; do rm -f $$i obj/_$$i.[co] ; done
|