-
Notifications
You must be signed in to change notification settings - Fork 46
/
exclMakefile
165 lines (133 loc) · 4.91 KB
/
exclMakefile
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
#
# Makefile for CLX
# (X11 R4.4 release, Franz Allegro Common Lisp version)
#
# *************************************************************************
# * Change the next line to point to where you have Common Lisp installed *
# * (make sure the Lisp doesn't already have CLX loaded in) *
# *************************************************************************
CL = /usr/local/bin/cl
RM = /bin/rm
SHELL = /bin/sh
ECHO = /bin/echo
TAGS = /usr/local/lib/emacs/etc/etags
# Name of dumped lisp
CLX = CLX
CLOPTS = -qq
# Use this one for Suns
CFLAGS = -O -DUNIXCONN
# Use this one for Silicon Graphics & Mips Inc MIPS based machines
# CFLAGS = -O -G 0 -I/usr/include/bsd
# Use this one for DEC MIPS based machines
# CFLAGS = -O -G 0 -DUNIXCONN
# Use this one for HP machines
# CFLAGS = -O -DSYSV -DUNIXCONN
# Lisp optimization for compiling
SPEED = 3
SAFETY = 0
C_SRC = excldep.c socket.c
C_OBJS = excldep.o socket.o
L_OBJS = defsystem.fasl package.fasl excldep.fasl depdefs.fasl clx.fasl \
dependent.fasl exclcmac.fasl macros.fasl bufmac.fasl buffer.fasl \
display.fasl gcontext.fasl requests.fasl input.fasl fonts.fasl \
graphics.fasl text.fasl attributes.fasl translate.fasl keysyms.fasl \
manager.fasl image.fasl resource.fasl
L_NOMACROS_OBJS = package.fasl excldep.fasl depdefs.fasl clx.fasl \
dependent.fasl buffer.fasl display.fasl gcontext.fasl \
requests.fasl input.fasl fonts.fasl graphics.fasl text.fasl \
attributes.fasl translate.fasl keysyms.fasl manager.fasl image.fasl \
resource.fasl
L_SRC = defsystem.cl package.cl excldep.cl depdefs.cl clx.cl \
dependent.cl exclcmac.cl macros.cl bufmac.cl buffer.cl \
display.cl gcontext.cl requests.cl input.cl fonts.cl \
graphics.cl text.cl attributes.cl translate.cl keysyms.cl \
manager.cl image.cl resource.cl
# default and aliases
all: no-clos
# all: partial-clos
compile-CLX-for-CLUE: compile-partial-clos-CLX
clue: partial-clos
#
# Three build rules are provided: no-clos, partial-clos, and full-clos.
# The first is no-clos, which results in a CLX whose datastructures are
# all defstructs. partial-clos results in xlib:window, xlib:pixmap, and
# xlib:drawable being CLOS instances, all others defstructs. full-clos
# makes all CLX complex datatypes into CLOS instances.
#
# (note that the :clos feature implies native CLOS *not* PCL).
#
no-clos: $(C_OBJS) compile-no-clos-CLX cat
#
# This rule is used to compile CLX to be used with XCW version 2, or CLUE.
#
partial-clos: $(C_OBJS) compile-partial-clos-CLX cat
full-clos: $(C_OBJS) compile-full-clos-CLX cat
c: $(C_OBJS)
compile-no-clos-CLX: $(C_OBJS)
$(ECHO) " \
(set-case-mode :case-sensitive-lower) \
(proclaim '(optimize (speed $(SPEED)) (safety $(SAFETY)))) \
(load \"defsystem\") \
#+allegro (compile-system :clx) \
#-allegro (compile-clx) \
#+allegro (compile-system :clx-debug)" \
| $(CL) $(CLOPTS) -batch
compile-partial-clos-CLX: $(C_OBJS)
$(ECHO) " \
#+clos (set-case-mode :case-sensitive-lower) \
#-clos (setq excl::*print-nickname* t) \
(proclaim '(optimize (speed $(SPEED)) (safety $(SAFETY)))) \
(unless (or (find-package 'clos) (find-package 'pcl)) \
(let ((spread (sys:gsgc-parameter :generation-spread))) \
(setf (sys:gsgc-parameter :generation-spread) 1) \
(require :pcl) \
(provide :pcl) \
(gc) (gc) \
(setf (sys:gsgc-parameter :generation-spread) spread))) \
(load \"defsystem\") \
(load \"package\") \
(setq xlib::*def-clx-class-use-defclass* '(xlib:window xlib:pixmap xlib:drawable)) \
#+allegro (compile-system :clx) \
#-allegro (compile-clx \"\" \"\" :for-clue t) \
#+allegro (compile-system :clx-debug)" \
| $(CL) $(CLOPTS) -batch
compile-full-clos-CLX: $(C_OBJS)
$(ECHO) " \
#+clos (set-case-mode :case-sensitive-lower) \
#-clos (setq excl::*print-nickname* t) \
(proclaim '(optimize (speed $(SPEED)) (safety $(SAFETY)))) \
(unless (or (find-package 'clos) (find-package 'pcl)) \
(let ((spread (sys:gsgc-parameter :generation-spread))) \
(setf (sys:gsgc-parameter :generation-spread) 1) \
(require :pcl) \
(provide :pcl) \
(gc) (gc) \
(setf (sys:gsgc-parameter :generation-spread) spread))) \
(load \"defsystem\") \
(load \"package\") \
(setq xlib::*def-clx-class-use-defclass* t) \
#+allegro (compile-system :clx) \
#-allegro (compile-clx \"\" \"\" :for-clue t) \
#+allegro (compile-system :clx-debug)" \
| $(CL) $(CLOPTS) -batch
cat:
-cat $(L_NOMACROS_OBJS) > CLX.fasl
load-CLX:
$(ECHO) " \
(let ((spread (sys:gsgc-parameter :generation-spread))) \
(setf (sys:gsgc-parameter :generation-spread) 1) \
(load \"defsystem\") \
#+allegro (load-system :clx) \
#-allegro (load-clx) \
(gc :tenure) \
(setf (sys:gsgc-parameter :generation-spread) spread)) \
(gc t)" \
'(dumplisp :name "$(CLX)" #+allegro :checkpoint #+allegro nil)' \
"(exit)" | $(CL) $(CLOPTS)
clean:
$(RM) -f *.fasl debug/*.fasl $(CLX) core $(C_OBJS) make.out
install:
mv CLX.fasl $(DEST)/clx.fasl
mv *.o $(DEST)
tags:
$(TAGS) $(L_SRC) $(C_SRC)