/
Makefile.boot.in
152 lines (124 loc) · 3.96 KB
/
Makefile.boot.in
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# -*- Makefile -*-
#---------------------------------------------------------------------
# Bootstraping
# use the local emulator and local libraries
#---------------------------------------------------------------------
OZLOADSEP=@OZLOADSEP@
OZLOADWIN=@OZLOADWIN@
OZEXECFILE=@OZEXECFILE@
BUILDSHARE=$(BUILDTOP)/share
BUILDLIB=$(BUILDSHARE)/lib
BUILDTOOLS=$(BUILDSHARE)/tools
BUILDCONTRIB=$(BUILDTOP)/contrib
BUILDGDBM=$(BUILDCONTRIB)/gdbm
BUILDOS=$(BUILDCONTRIB)/os
BUILDGUMP=$(BUILDTOP)/platform/tools/gump
BUILDBISON=$(BUILDGUMP)/ozbison
BUILDEMU=$(BUILDTOP)/platform/emulator
CYG_PATH=$(SRCTOP)/share/lib/cygpath.sh
CYG_BUILDSHARE =$(shell $(CYG_PATH) "$(BUILDSHARE)")
CYG_BUILDLIB =$(shell $(CYG_PATH) "$(BUILDLIB)")
CYG_BUILDTOOLS =$(shell $(CYG_PATH) "$(BUILDTOOLS)")
CYG_BUILDCONTRIB=$(shell $(CYG_PATH) "$(BUILDCONTRIB)")
CYG_BUILDGDBM =$(shell $(CYG_PATH) "$(BUILDGDBM)")
CYG_BUILDOS =$(shell $(CYG_PATH) "$(BUILDOS)")
CYG_BUILDGUMP =$(shell $(CYG_PATH) "$(BUILDGUMP)")
CYG_BUILDBISON =$(shell $(CYG_PATH) "$(BUILDBISON)")
CYG_BUILDEMU =$(shell $(CYG_PATH) "$(BUILDEMU)")
SOURCELIB=$(SRCTOP)/share/lib
SOURCETOOLS=$(SRCTOP)/share/tools
CYG_SOURCELIB =$(shell $(CYG_PATH) "$(SOURCELIB)")
CYG_SOURCETOOLS =$(shell $(CYG_PATH) "$(SOURCETOOLS)")
EXE_EXT=@EXE_EXT@
BOOTDSS=$(BUILDTOP)/platform/dss
BOOTEMU=$(BUILDTOP)/platform/emulator/@EMULATOR_EXE@
BOOTENG=$(BUILDTOP)/share/ozengine.sh
BOOTCOM=$(BOOTENG) $(BUILDTOP)/share/lib/ozc$(EXE_EXT)
BOOTOZL=$(BOOTENG) $(BUILDTOP)/share/lib/ozl$(EXE_EXT)
BOOTOZTOOL=@BOOTOZTOOL@
BOOTOZTOOLINC="-I$(BUILDTOP)/platform/emulator -I$(SRCTOP)/platform/emulator -I$(SRCTOP)/platform/tools/gump @CPPFLAGS@"
BOOTOZFLEX=$(CYG_BUILDGUMP)/ozflex/flex.exe
BOOTWINOZTOOLCXXFLAGS=@WINOZTOOLCXXFLAGS@
BOOTWINOZTOOLLDFLAGS="@WINOZTOOLLDFLAGS@"
ifdef OZC
export OZC
endif
ifdef OZL
export OZL
endif
ifdef OZINIT
export OZINIT
endif
ifdef OZ_LOAD
export OZ_LOAD
endif
ifdef OZEMULATOR
export OZEMULATOR
endif
ifdef OZPATH
export OZPATH
endif
ifdef OZDOC_HOME
export OZDOC_HOME
endif
ifdef OZDOC_AUTHOR_PATH
export OZDOC_AUTHOR_PATH
endif
ifdef OZDOC_BIB_PATH
export OZDOC_BIB_PATH
endif
ifdef OZDOC_BST_PATH
export OZDOC_BST_PATH
endif
ifdef OZDOC_ELISP_PATH
export OZDOC_ELISP_PATH
endif
ifdef OZDOC_SBIN_PATH
export OZDOC_SBIN_PATH
endif
ifdef OZTOOL
export OZTOOL
endif
ifdef OZTOOL_INCLUDES
export OZTOOL_INCLUDES
endif
ifdef OZFLEX
ifneq ($(OZFLEX),)
export OZFLEX
endif
endif
ifdef @LD_VAR@
LD_VAR=$(BOOTDSS):$(@LD_VAR@)
else
LD_VAR=$(BOOTDSS)
endif
boot-%:
$(MAKE) $* \
@LD_VAR@=$(LD_VAR) \
OZEMULATOR=$(BOOTEMU) \
OZENGINE=$(BOOTENG) \
OZC="$(BOOTCOM)" \
OZINIT=$(BUILDLIB)/Init.ozf \
OZPATH="$(subst %,$(OZLOADSEP),.%$(CYG_BUILDLIB)%$(CYG_BUILDTOOLS)%$(CYG_SOURCELIB)%$(CYG_SOURCETOOLS))" \
OZ_LOAD=root="$(subst %,$(OZLOADSEP),.%prefix=/=/%prefix=./=./$(OZLOADWIN)%prefix=x-oz://system/=$(CYG_BUILDLIB)/%prefix=x-oz://system/=$(CYG_BUILDTOOLS)/%prefix=x-oz://contrib/=$(CYG_BUILDCONTRIB)/%prefix=x-oz://contrib/=$(CYG_BUILDGDBM)/%prefix=x-oz://contrib/os/=$(CYG_BUILDOS)/%prefix=x-oz://boot/=$(CYG_BUILDEMU)/%prefix=x-oz://system/=$(CYG_BUILDGUMP)/%prefix=x-oz://system/=$(CYG_BUILDBISON)/%=)" \
OZL="$(BOOTOZL)" \
OZDOC_HOME="$(SRCTOP)/doc/utilities" \
OZDOC_AUTHOR_PATH="$(SRCDIR):$(SRCTOP)/doc" \
OZDOC_BIB_PATH="$(SRCDIR)" \
OZDOC_BST_PATH="$(SRCDIR):$(SRCTOP)/doc/utilities" \
OZDOC_ELISP_PATH=".:$(SRCDIR):$(BUILDTOP)/doc:$(BUILDTOP)/doc/utilities:$(BUILDTOP)/share/elisp:$(SRCTOP)/share/elisp:$(BUILDTOP)/contrib/doc/code" \
OZDOC_SBIN_PATH="$(SRCTOP)/doc/utilities" \
OZDOC_CATALOG="$(BUILDTOP)/doc/bootcatalog" \
OZTOOL=$(BOOTOZTOOL) \
OZTOOL_INCLUDES=$(BOOTOZTOOLINC) \
WINOZTOOLCXXFLAGS=$(BOOTWINOZTOOLCXXFLAGS) \
WINOZTOOLLDFLAGS=$(BOOTWINOZTOOLLDFLAGS) \
OZFLEX=$(BOOTOZFLEX)
cboot-%:
$(MAKE) $* \
OZTOOL=$(BOOTOZTOOL) \
OZTOOL_INCLUDES=$(BOOTOZTOOLINC) \
WINOZTOOLCXXFLAGS=$(BOOTWINOZTOOLCXXFLAGS) \
WINOZTOOLLDFLAGS=$(BOOTWINOZTOOLLDFLAGS)
Makefile.boot: Makefile.boot.in $(BUILDTOP)/share/config.status
cd $(BUILDTOP)/share && ./config.status