blob: 02d2b6af6c5bee3f4d96bdcc2ab5e1c84da36855 (
plain)
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
#*=====================================================================*/
#* serrano/prgm/project/skribe/src/bigloo/Makefile */
#* ------------------------------------------------------------- */
#* Author : Manuel Serrano */
#* Creation : Mon Jul 21 18:21:11 2003 */
#* Last change : Fri Jun 4 10:10:50 2004 (serrano) */
#* Copyright : 2003-04 Manuel Serrano */
#* ------------------------------------------------------------- */
#* The Makefile to build the Bigloo API */
#*=====================================================================*/
#*---------------------------------------------------------------------*/
#* General inclusion */
#*---------------------------------------------------------------------*/
include ../../etc/bigloo/Makefile.skb
#*---------------------------------------------------------------------*/
#* Compilers and tools */
#*---------------------------------------------------------------------*/
BSKBFLAGS = -I $(SRCDIR)/bigloo
#*---------------------------------------------------------------------*/
#* Targets ... */
#*---------------------------------------------------------------------*/
PROJECT = skribe
CTARGET = $(SKRIBEBINDIR)/skribe.bigloo
JVMTARGET = $(SKRIBEBINDIR)/skribe.zip
PBASE = bigloo.$(PROJECT)
ODIR = o
CLASSDIR = class_s/bigloo/$(PROJECT)
OBJDIR = obj/bigloo/$(PROJECT)
#*---------------------------------------------------------------------*/
#* Objects */
#*---------------------------------------------------------------------*/
SRCDIR = ..
SKRIBECOMMON = param api bib index lib sui
SKRIBEBGL = types parseargs main eval evapi \
output resolve verify debug read prog source \
lisp xml c asm engine writer color
SKRIBEINCLUDE = api new debug
MODULES = $(SKRIBEBGL:%=%.scm) \
$(SKRIBECOMMON:%=%.bgl) \
configure.bgl
INCLUDES = $(SKRIBEINCLUDE:%=%.sch)
SOURCES = $(MODULES) \
$(SKRIBECOMMON:%=$(SRCDIR)/common/%.scm) \
$(SRCDIR)/common/configure.scm \
$(INCLUDES)
OBJECTS = $(SKRIBECOMMON) $(SKRIBEBGL) configure
COBJECTS = $(OBJECTS:%=$(ODIR)/%.o)
JVMCLASSES = $(OBJECTS:%=$(ODIR)/class_s/bigloo/$(PROJECT)/%.class)
#*---------------------------------------------------------------------*/
#* Population */
#*---------------------------------------------------------------------*/
POPULATIONBGL = $(MODULES) $(INCLUDES) Makefile
POPULATIONSCM = $(SKRIBECOMMON:%=%.scm) configure.scm.in
#*---------------------------------------------------------------------*/
#* Suffixes */
#*---------------------------------------------------------------------*/
.SUFFIXES:
.SUFFIXES: .scm .bgl .class .o .obj
#*---------------------------------------------------------------------*/
#* All */
#*---------------------------------------------------------------------*/
.PHONY: c jvm dotnet
all: $(TARGET)
c: $(CTARGET)
jvm: $(JVMTARGET)
dotnet:
echo "Not implemented yet"
#*--- c ---------------------------------------------------------------*/
$(CTARGET): $(SKRIBEBINDIR) .afile $(ODIR) $(COBJECTS)
$(BIGLOO) $(BLINKFLAGS) -o $@ $(COBJECTS)
#*--- jvm -------------------------------------------------------------*/
$(JVMTARGET): $(SKRIBEBINDIR) .afile .jfile $(ODIR) $(JVMCLASSES)
$(RM) -f $(JVMTARGET)
(cd $(ODIR)/class_s && \
$(ZIP) -q $(ZFLAGS) $(JVMTARGET) -r .)
$(SKRIBEBINDIR):
mkdir -p $(SKRIBEBINDIR)
#*---------------------------------------------------------------------*/
#* pop */
#*---------------------------------------------------------------------*/
.PHONY: pop
pop:
@ echo $(POPULATIONSCM:%=src/common/%)
@ echo $(POPULATIONBGL:%=src/bigloo/%)
#*---------------------------------------------------------------------*/
#* ude */
#*---------------------------------------------------------------------*/
.PHONY: ude .etags .afile
ude:
@ $(MAKE) -f Makefile .afile .etags dep
.afile:
@ $(AFILE) -o .afile $(MODULES)
.jfile:
@ $(JFILE) -I src -o .jfile -pbase $(PBASE) $(MODULES)
.etags:
@ $(BTAGS) -o .etags $(SOURCES)
dep:
@(num=`grep -n '^#bdepend start' Makefile | awk -F: '{ print $$1}' -`;\
head -`expr $$num - 1` Makefile > /tmp/Makefile.aux)
@ $(BDEPEND) -search-path ../common \
-search-path ../bigloo \
-strict-obj-dir $(ODIR) \
-strict-class-dir $(CLASSDIR) \
-fno-mco $(SOURCES) >> /tmp/Makefile.aux
@ mv /tmp/Makefile.aux Makefile
getbinary:
@ echo $(PROJECT)
getsources:
@ echo $(SOURCES)
#*---------------------------------------------------------------------*/
#* The implicit rules */
#*---------------------------------------------------------------------*/
$(ODIR)/%.o: $(SRCDIR)/bigloo/%.bgl $(SRCDIR)/common/%.scm
$(BIGLOO) $(BCFLAGS) $(BSKBFLAGS) $(BCOMMONFLAGS) -c \
$(SRCDIR)/bigloo/$*.bgl $(SRCDIR)/common/$*.scm -o $@
$(ODIR)/%.o: $(SRCDIR)/bigloo/%.scm
$(BIGLOO) $(BCFLAGS) $(BSKBFLAGS) $(BCOMMONFLAGS) -c \
$(SRCDIR)/bigloo/$*.scm -o $@
$(ODIR)/class_s/bigloo/$(PROJECT)/%.class: \
$(SRCDIR)/bigloo/%.bgl $(SRCDIR)/common/%.scm
$(BIGLOO) $(BJVMFLAGS) $(BSKBFLAGS) $(BCOMMONFLAGS) -c \
$(SRCDIR)/bigloo/$*.bgl $(SRCDIR)/common/$*.scm -o $@
$(ODIR)/class_s/bigloo/$(PROJECT)/%.class: $(SRCDIR)/bigloo/%.scm
$(BIGLOO) $(BJVMFLAGS) $(BSKBFLAGS) $(BCOMMONFLAGS) -c \
$(SRCDIR)/bigloo/$*.scm -o $@
$(OBJDIR)/%.obj: src/%.scm
$(BIGLOO) $(BDNFLAGS) $(BCOMMONFLAGS) -c $< -o $@
#*---------------------------------------------------------------------*/
#* Ad hoc rules */
#*---------------------------------------------------------------------*/
$(ODIR):
mkdir -p $(ODIR)
$(CLASSDIR):
mkdir -p $(CLASSDIR)
$(OBJDIR):
mkdir -p $(OBJDIR)
#*---------------------------------------------------------------------*/
#* install/uninstall */
#*---------------------------------------------------------------------*/
.PHONY: install uninstall install-c uninstall-c install-jvm uninstall-jvm
install:
$(MAKE) install-$(TARGET)
uninstall:
$(MAKE) uninstall-$(TARGET)
install-c: $(DESTDIR)$(INSTALL_BINDIR)
cp $(CTARGET) $(DESTDIR)$(INSTALL_BINDIR)/skribe.bigloo \
&& chmod $(BMASK) $(DESTDIR)$(INSTALL_BINDIR)/skribe.bigloo
$(RM) -f $(DESTDIR)$(INSTALL_BINDIR)/skribe
ln -s skribe.bigloo $(DESTDIR)$(INSTALL_BINDIR)/skribe
uninstall-c:
$(RM) -f $(DESTDIR)$(INSTALL_BINDIR)/skribe.bigloo
$(RM) -f $(DESTDIR)$(INSTALL_BINDIR)/skribe
install-jvm: $(DESTDIR)$(INSTALL_FILDIR)
cp $(JVMTARGET) $(DESTDIR)$(INSTALL_FILDIR)/skribe.zip
cp $(FILDIR)/bigloo_s.zip $(DESTDIR)$(INSTALL_FILDIR)
uninstall-jvm:
$(RM) -f $(DESTDIR)$(INSTALL_FILDIR)/skribe.zip
$(RM) -f $(DESTDIR)$(INSTALL_FILDIR)/bigloo_s.zip
$(DESTDIR)$(INSTALL_BINDIR):
mkdir -p $(DESTDIR)$(INSTALL_BINDIR) && chmod $(BMASK) $(DESTDIR)$(INSTALL_BINDIR)
$(DESTDIR)$(INSTALL_FILDIR):
mkdir -p $(DESTDIR)$(INSTALL_FILDIR) && chmod $(BMASK) $(DESTDIR)$(INSTALL_FILDIR)
#*---------------------------------------------------------------------*/
#* Clean */
#*---------------------------------------------------------------------*/
clean:
$(RM) -f .afile
$(RM) -f .jfile
$(RM) -rf $(ODIR)
$(RM) -f $(CTARGET)
$(RM) -f $(JVMTARGET)
#*---------------------------------------------------------------------*/
#* Cleanall */
#*---------------------------------------------------------------------*/
cleanall: clean
#*---------------------------------------------------------------------*/
#* Manual dependency */
#*---------------------------------------------------------------------*/
o/eval.o o/class/bigloo/skribe/eval.class: \
$(SRCDIR)/bigloo/api.bgl $(SRCDIR)/common/api.scm
#bdepend start (don't edit)
#*---------------------------------------------------------------------*/
#* Dependencies ... */
#*---------------------------------------------------------------------*/
o/index.o class_s/bigloo/skribe/index.class: ../bigloo/new.sch
o/bib.o class_s/bigloo/skribe/bib.class: ../bigloo/new.sch
o/writer.o class_s/bigloo/skribe/writer.class: ../bigloo/debug.sch
o/lisp.o class_s/bigloo/skribe/lisp.class: ../bigloo/new.sch
o/lib.o class_s/bigloo/skribe/lib.class: ../bigloo/debug.sch
o/resolve.o class_s/bigloo/skribe/resolve.class: ../bigloo/debug.sch
o/api.o class_s/bigloo/skribe/api.class: ../bigloo/new.sch \
../bigloo/api.sch
o/eval.o class_s/bigloo/skribe/eval.class: ../bigloo/debug.sch
o/xml.o class_s/bigloo/skribe/xml.class: ../bigloo/new.sch
o/parseargs.o class_s/bigloo/skribe/parseargs.class: ../bigloo/debug.sch
o/prog.o class_s/bigloo/skribe/prog.class: ../bigloo/new.sch
o/verify.o class_s/bigloo/skribe/verify.class: ../bigloo/debug.sch
o/sui.o class_s/bigloo/skribe/sui.class: ../bigloo/debug.sch
o/verify.o class_s/bigloo/skribe/verify.class: ../bigloo/debug.sch
o/source.o class_s/bigloo/skribe/source.class: ../bigloo/new.sch
o/bib.o class_s/bigloo/skribe/bib.class: ../bigloo/new.sch
o/asm.o class_s/bigloo/skribe/asm.class: ../bigloo/new.sch
o/source.o class_s/bigloo/skribe/source.class: ../bigloo/new.sch
o/engine.o class_s/bigloo/skribe/engine.class: ../bigloo/debug.sch
o/engine.o class_s/bigloo/skribe/engine.class: ../bigloo/debug.sch
o/lib.o class_s/bigloo/skribe/lib.class: ../bigloo/debug.sch
o/c.o class_s/bigloo/skribe/c.class: ../bigloo/new.sch
o/writer.o class_s/bigloo/skribe/writer.class: ../bigloo/debug.sch
o/xml.o class_s/bigloo/skribe/xml.class: ../bigloo/new.sch
o/main.o class_s/bigloo/skribe/main.class: ../bigloo/debug.sch
o/output.o class_s/bigloo/skribe/output.class: ../bigloo/debug.sch
o/prog.o class_s/bigloo/skribe/prog.class: ../bigloo/new.sch
o/output.o class_s/bigloo/skribe/output.class: ../bigloo/debug.sch
o/resolve.o class_s/bigloo/skribe/resolve.class: ../bigloo/debug.sch
o/sui.o class_s/bigloo/skribe/sui.class: ../bigloo/debug.sch
o/asm.o class_s/bigloo/skribe/asm.class: ../bigloo/new.sch
o/eval.o class_s/bigloo/skribe/eval.class: ../bigloo/debug.sch
o/c.o class_s/bigloo/skribe/c.class: ../bigloo/new.sch
o/index.o class_s/bigloo/skribe/index.class: ../bigloo/new.sch
o/lisp.o class_s/bigloo/skribe/lisp.class: ../bigloo/new.sch
o/api.o class_s/bigloo/skribe/api.class: ../bigloo/new.sch \
../bigloo/api.sch
o/parseargs.o class_s/bigloo/skribe/parseargs.class: ../bigloo/debug.sch
#bdepend stop
|