163
|
1 ## Makefile for src subdirectory in XEmacs.
|
|
2 ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
|
|
3 ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
|
|
4 ## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
|
0
|
5
|
163
|
6 ## This file is part of XEmacs.
|
0
|
7
|
163
|
8 ## XEmacs is free software; you can redistribute it and/or modify it
|
|
9 ## under the terms of the GNU General Public License as published by the
|
|
10 ## Free Software Foundation; either version 2, or (at your option) any
|
|
11 ## later version.
|
0
|
12
|
163
|
13 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
14 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
15 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
16 ## for more details.
|
0
|
17
|
163
|
18 ## You should have received a copy of the GNU General Public License
|
|
19 ## along with XEmacs; see the file COPYING. If not, write to
|
|
20 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 ## Boston, MA 02111-1307, USA.
|
0
|
22
|
163
|
23 ## Synched up with: Not synched with FSF.
|
0
|
24
|
163
|
25 all: xemacs
|
183
|
26 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
|
0
|
27
|
163
|
28 ## For performance and consistency, no built-in rules.
|
70
|
29 .SUFFIXES:
|
272
|
30 .SUFFIXES: .c .h .o .i .s .dep
|
0
|
31
|
173
|
32 @SET_MAKE@
|
|
33 SHELL=/bin/sh
|
|
34 RM = rm -f
|
|
35
|
163
|
36 lispdir = ${srcdir}/../lisp/
|
|
37 libsrc = ../lib-src/
|
|
38 etcdir = ../etc/
|
|
39
|
|
40 ## Here are the things that we expect ../configure to edit.
|
203
|
41 prefix=@prefix@
|
0
|
42 srcdir=@srcdir@
|
263
|
43 blddir=@blddir@
|
203
|
44 version=@version@
|
|
45 infodir=@infodir@
|
|
46 infopath=@infopath@
|
0
|
47 CC=@CC@
|
|
48 CPP=@CPP@
|
|
49 CFLAGS=@CFLAGS@
|
149
|
50 CPPFLAGS=@CPPFLAGS@
|
|
51 LDFLAGS=@LDFLAGS@
|
173
|
52 RECURSIVE_MAKE=@RECURSIVE_MAKE@
|
149
|
53
|
|
54 c_switch_all=@c_switch_all@
|
|
55 ld_switch_all=@ld_switch_all@
|
|
56 ld_libs_all=@ld_libs_all@
|
263
|
57 ld_dynamic_link_flags=@ld_dynamic_link_flags@
|
149
|
58
|
|
59 extra_objs=@extra_objs@
|
0
|
60 LN_S=@LN_S@
|
|
61
|
163
|
62 ld_switch_shared=@ld_switch_shared@
|
|
63 start_files=@start_files@
|
|
64 start_flags=@start_flags@
|
|
65 LD=@ld@
|
|
66 lib_gcc=@lib_gcc@
|
269
|
67 ##libmcheck=@libmcheck@
|
163
|
68
|
0
|
69 #define NOT_C_CODE
|
|
70 #include "config.h"
|
|
71
|
163
|
72 ## With the traditional VPATH setting, it is not possible to
|
|
73 ## simultaneously compile in-place and in another directory. The
|
|
74 ## mistaken definition is that *all* dependencies are searched for in
|
|
75 ## the VPATH directory, rather than just the dependencies that are not
|
|
76 ## themselves targets. Thus, if there is an up-to-date .o file in the
|
|
77 ## in-place location, it will not get recompiled in the not-in-place
|
|
78 ## location.
|
0
|
79
|
163
|
80 ## The GNU Make "vpath" directive continues this tradition, but at
|
|
81 ## least lets you restrict the classes of files that it applies to.
|
|
82 ## This allows us to kludge around the problem.
|
|
83
|
0
|
84 #ifdef USE_GNU_MAKE
|
|
85 vpath %.c @srcdir@
|
|
86 vpath %.h @srcdir@
|
163
|
87 ## now list files that should NOT be searched in the srcdir.
|
|
88 ## This includes any .c or .h built from something else
|
|
89 ## (e.g. a .in file).
|
0
|
90 vpath config.h
|
|
91 vpath paths.h
|
|
92 vpath Emacs.ad.h
|
183
|
93 vpath puresize-adjust.h
|
251
|
94 vpath sheap-adjust.h
|
0
|
95 #else
|
|
96 VPATH=@srcdir@
|
|
97 #endif
|
|
98
|
163
|
99 RM = rm -f
|
0
|
100
|
|
101 #ifdef HAVE_NATIVE_SOUND
|
149
|
102 sound_cflags=@sound_cflags@
|
0
|
103 #endif
|
|
104
|
163
|
105 LWLIB_SRCDIR = ${srcdir}/../lwlib
|
70
|
106
|
149
|
107 #ifdef HAVE_X_WINDOWS
|
163
|
108 lwlib_libs = ../lwlib/liblw.a
|
|
109 lwlib_deps = $(lwlib_libs)
|
|
110 $(lwlib_libs) :
|
173
|
111 cd ../lwlib && $(RECURSIVE_MAKE)
|
0
|
112
|
157
|
113 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
|
267
|
114 glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
|
70
|
115
|
149
|
116 #ifdef AIX4
|
|
117 LIBI18N = -li18n
|
|
118 #endif /* AIX4 */
|
70
|
119
|
272
|
120 X11_libs = $(LIBI18N)
|
149
|
121 #endif /* HAVE_X_WINDOWS */
|
0
|
122
|
251
|
123 #ifdef HEAP_IN_DATA
|
|
124 sheap_obj=sheap.o
|
|
125 #endif
|
|
126
|
163
|
127 ## -Demacs is needed to make some files produce the correct version
|
|
128 ## for use in Emacs.
|
0
|
129
|
157
|
130 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
163
|
131 cflags = $(CFLAGS) $(cppflags)
|
272
|
132 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
0
|
133
|
193
|
134 #ifdef SOLARIS2
|
|
135 %.o : %.c
|
|
136 #else
|
0
|
137 .c.o:
|
193
|
138 #endif
|
149
|
139 $(CC) -c $(cflags) $<
|
0
|
140
|
163
|
141 ## Create preprocessor output (debugging purposes only)
|
70
|
142 .c.i:
|
272
|
143 #ifdef __GNUC__
|
|
144 $(CC) -E $(cppflags) -o $@ $<
|
|
145 #else /* works on Solaris; what about other systems? */
|
149
|
146 $(CC) -P $(cppflags) $<
|
272
|
147 #endif /* compiler */
|
|
148
|
|
149 ## Create assembler output (debugging purposes only)
|
|
150 .c.s:
|
|
151 $(CC) -S -c $(cflags) $<
|
0
|
152
|
263
|
153 ## Create RTL files
|
|
154 %.c.rtl : %.c
|
|
155 $(CC) -dr -c $(cflags) $<
|
|
156
|
163
|
157 ## lastfile must follow all files whose initialized data areas should
|
|
158 ## be dumped as pure by dump-emacs.
|
0
|
159
|
163
|
160 ## NOTE: The last line cannot be all macros, because make will barf
|
|
161 ## if they all come out null.
|
0
|
162
|
157
|
163 objs=\
|
|
164 abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
|
|
165 callint.o callproc.o casefiddle.o casetab.o chartab.o\
|
|
166 cmdloop.o cmds.o console.o console-stream.o\
|
|
167 data.o device.o dired.o doc.o doprnt.o dynarr.o\
|
|
168 editfns.o elhash.o emacs.o\
|
217
|
169 eval.o events.o $(extra_objs)\
|
163
|
170 event-stream.o extents.o faces.o\
|
173
|
171 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
|
157
|
172 frame.o general.o getloadavg.o glyphs.o\
|
267
|
173 $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
|
211
|
174 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
|
157
|
175 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
|
|
176 print.o process.o profile.o pure.o\
|
|
177 rangetab.o redisplay.o redisplay-output.o regex.o\
|
251
|
178 search.o $(sheap_obj) signal.o sound.o\
|
157
|
179 specifier.o strftime.o symbols.o syntax.o sysdep.o\
|
195
|
180 undo.o $(x_objs) widget.o window.o
|
0
|
181
|
263
|
182 obj_rtl = $(objs:.o=.c.rtl)
|
|
183
|
0
|
184 #ifdef REL_ALLOC
|
149
|
185 rallocdocsrc = ralloc.c
|
0
|
186 rallocobjs = ralloc.o
|
|
187 #endif
|
|
188
|
267
|
189 malloclib = $(libmcheck)
|
0
|
190 #ifndef SYSTEM_MALLOC
|
255
|
191 # ifdef GNU_MALLOC /* GNU malloc */
|
0
|
192 # ifdef ERROR_CHECK_MALLOC
|
255
|
193 #ifdef DOUG_LEA_MALLOC
|
|
194 mallocobjs = free-hook.o vm-limit.o
|
|
195 #else
|
0
|
196 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
255
|
197 #endif
|
0
|
198 mallocdocsrc = free-hook.c
|
149
|
199 # else /* New GNU malloc, sans error checking */
|
255
|
200 #ifdef DOUG_LEA_MALLOC
|
|
201 mallocobjs = vm-limit.o
|
|
202 #else
|
0
|
203 mallocobjs = gmalloc.o vm-limit.o
|
255
|
204 #endif
|
0
|
205 mallocdocsrc =
|
149
|
206 # endif /* ERROR_CHECK_MALLOC */
|
255
|
207 # else /* Older GNU malloc */
|
0
|
208 mallocobjs = malloc.o
|
|
209 mallocdocsrc =
|
255
|
210 # endif /* Older GNU malloc */
|
149
|
211 #else /* SYSTEM_MALLOC */
|
0
|
212 mallocobjs =
|
|
213 mallocdocsrc =
|
177
|
214 #ifdef USE_DEBUG_MALLOC
|
|
215 malloclib = -ldmalloc
|
|
216 #endif /* USE_DEBUG_MALLOC */
|
0
|
217 #endif /* SYSTEM_MALLOC */
|
|
218
|
|
219 #ifdef HAVE_X_WINDOWS
|
|
220
|
|
221 # ifdef EXTERNAL_WIDGET
|
149
|
222 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
0
|
223
|
163
|
224 ## Now we try to figure out how to link a shared library.
|
|
225 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
226 ## library will not be created.
|
0
|
227
|
|
228 # ifdef USE_GCC
|
|
229 # ifdef USG5
|
|
230 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
163
|
231 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
0
|
232 # elif !defined (LINUX) || defined (__ELF__)
|
|
233 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
|
234 # endif
|
|
235 # elif defined (USG5)
|
|
236 # if defined (IRIX)
|
|
237 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
|
|
238 # else /* not IRIX */
|
|
239 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
|
240 # endif /* not IRIX */
|
|
241 # else /* not USG5 */
|
|
242 # if defined (DEC_ALPHA) && defined (OSF1)
|
163
|
243 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
0
|
244 # else /* !(DEC_ALPHA && OSF1) */
|
|
245 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
|
246 # endif /* !(DEC_ALPHA && OSF1) */
|
|
247 # endif /* not USG5 */
|
|
248
|
|
249 # ifdef LWLIB_USES_MOTIF
|
|
250 # ifdef EXTW_LINK
|
157
|
251 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
0
|
252 # else
|
157
|
253 motif_other_files = libextcli_Xm.a
|
0
|
254 # endif
|
223
|
255 #endif /* LWLIB_USES_MOTIF */
|
0
|
256
|
|
257 # ifdef EXTW_LINK
|
157
|
258 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
0
|
259 # endif
|
157
|
260 other_files=\
|
|
261 ${motif_other_files}\
|
|
262 libextcli_Xt.a libextcli_Xlib.a\
|
|
263 ${shared_other_files}
|
165
|
264
|
|
265 all: ${other_files}
|
149
|
266 # endif /* EXTERNAL_WIDGET */
|
0
|
267
|
272
|
268 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs)
|
149
|
269 #endif /* HAVE_X_WINDOWS */
|
0
|
270
|
163
|
271 ## define otherobjs as list of object files that make-docfile
|
|
272 ## should not be told about.
|
151
|
273 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
263
|
274 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
275 othersrcs = $(otherobjs:.o=.c)
|
0
|
276
|
177
|
277 LIBES = $(lwlib_libs) $(quantify_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
0
|
278
|
|
279 #ifdef I18N3
|
149
|
280 mo_dir = ${etcdir}
|
|
281 mo_file = ${mo_dir}emacs.mo
|
0
|
282 #endif
|
|
283
|
267
|
284 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
|
0
|
285 DUMPENV = $(LOADPATH)
|
|
286
|
167
|
287 release: temacs ${libsrc}DOC $(mo_file) ${other_files}
|
0
|
288 #ifdef CANNOT_DUMP
|
|
289 ln temacs xemacs
|
|
290 #else
|
|
291 #ifdef HAVE_SHM
|
|
292 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
293 w=`pwd`; cd ${srcdir} && $${w}/temacs -nl -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
294 else true; fi
|
104
|
295 @touch SATISFIED
|
267
|
296 -$(DUMPENV) ./temacs -nl -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
297 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
298 @$(RM) SATISFIED
|
0
|
299 #else /* ! defined (HAVE_SHM) */
|
|
300 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
301 w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
302 else true; fi
|
104
|
303 @touch SATISFIED
|
267
|
304 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
305 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
306 @$(RM) SATISFIED
|
0
|
307 #endif /* ! defined (HAVE_SHM) */
|
|
308 touch release
|
|
309 #endif /* ! defined (CANNOT_DUMP) */
|
|
310
|
183
|
311 xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
|
|
312 @$(RM) $@ && touch SATISFIED
|
267
|
313 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
193
|
314 @if test -f $@; then if test -f SATISFIED; then \
|
272
|
315 echo "Testing for Lisp shadows ..."; \
|
207
|
316 ./xemacs -batch -vanilla -f list-load-path-shadows; fi; \
|
193
|
317 $(RM) SATISFIED; exit 0; fi; \
|
251
|
318 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
|
|
319 $(RECURSIVE_MAKE) $@;
|
173
|
320
|
267
|
321 fastdump: temacs
|
|
322 @$(RM) xemacs && touch SATISFIED
|
269
|
323 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
267
|
324 @if test -f xemacs; then if test -f SATISFIED; then \
|
|
325 ./xemacs -batch -vanilla -f list-load-path-shadows; fi; \
|
|
326 $(RM) SATISFIED; exit 0; fi; \
|
|
327 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi;
|
|
328
|
183
|
329 FRC.update-elc.stamp :
|
|
330
|
215
|
331 update-elc.stamp : temacs FRC.update-elc.stamp
|
173
|
332 @touch NOBYTECOMPILE
|
267
|
333 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
183
|
334 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
|
|
335 $(RM) NOBYTECOMPILE
|
0
|
336
|
|
337 obj_src = $(objs:.o=.c)
|
|
338
|
263
|
339 dortl : $(obj_rtl) $(otherrtls)
|
272
|
340 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
|
263
|
341 (for a in $(obj_src) $(othersrcs);do \
|
|
342 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
|
272
|
343 done)
|
263
|
344 echo "))" >> ${srcdir}/../lisp/source-files.el
|
|
345
|
70
|
346 #ifdef DYNODUMP
|
163
|
347 dynodump_deps = ../dynodump/dynodump.so
|
|
348 ../dynodump/dynodump.so:
|
173
|
349 cd ../dynodump && $(RECURSIVE_MAKE)
|
149
|
350 #endif /* DYNODUMP */
|
0
|
351
|
185
|
352 ${libsrc}DOC: temacs update-elc.stamp
|
169
|
353 $(RM) ${libsrc}DOC; \
|
267
|
354 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \
|
163
|
355 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
|
|
356 ${obj_src} ${mallocdocsrc} ${rallocdocsrc}
|
0
|
357
|
|
358 dump_elcs: dump-elcs
|
|
359
|
|
360 dump-elcs: temacs
|
267
|
361 -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
0
|
362
|
80
|
363 all-elc all-elcs:
|
173
|
364 cd .. && $(RECURSIVE_MAKE) all-elc
|
80
|
365
|
70
|
366 #ifdef I18N3
|
|
367
|
|
368 # if defined(SPARC) && !defined(USG)
|
|
369 xgettext= /usr/openwin/bin/xgettext
|
|
370 xgettext_args= -o emacs -m_X messages
|
|
371 msgfmt= /usr/openwin/bin/msgfmt
|
|
372 # else
|
|
373 xgettext= xgettext
|
|
374 xgettext_args= -s -d emacs -M_X messages
|
|
375 msgfmt= msgfmt
|
|
376 #endif
|
|
377
|
167
|
378 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
|
|
379 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
|
80
|
380 cd ${libsrc} && ${xgettext} ${xgettext_args}
|
163
|
381 $(RM) ${mo_dir}emacs.po
|
149
|
382 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
|
70
|
383
|
149
|
384 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
|
|
385 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
|
70
|
386
|
|
387 ${libsrc}make-msgfile:
|
173
|
388 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
|
70
|
389
|
|
390 ${libsrc}make-po:
|
173
|
391 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
|
70
|
392
|
|
393 #endif /* I18N3 */
|
|
394
|
0
|
395 ${libsrc}make-docfile:
|
173
|
396 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
|
0
|
397
|
163
|
398 ## Lint Section
|
153
|
399 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
0
|
400 LINTFILES= $(objs:.o=.ln)
|
149
|
401 LINTINCLUDES = $(cppflags)
|
163
|
402 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
2
|
403 LINTFLAGS= -fd -m -s -u -v -x
|
0
|
404 lint: $(LINTFILES)
|
|
405 $(LINT.c) $(LINTFILES)
|
163
|
406 ## end of Lint Section
|
0
|
407
|
157
|
408 temacs_deps=\
|
183
|
409 $(start_files) ${objs} ${otherobjs}\
|
255
|
410 $(lwlib_deps) $(dynodump_deps)
|
0
|
411
|
157
|
412 temacs_link_args=\
|
173
|
413 ${start_flags} ${ldflags}\
|
163
|
414 -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
|
0
|
415
|
149
|
416 temacs: $(temacs_deps)
|
183
|
417 $(LD) $(temacs_link_args)
|
|
418
|
|
419 .PHONY : run-temacs
|
|
420
|
219
|
421 run-temacs: temacs
|
267
|
422 ./temacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
183
|
423
|
|
424 ## Debugging targets:
|
|
425 ##
|
|
426 ## RTC is Sun WorkShop's Run Time Checking
|
|
427 ##
|
|
428 ## Purify, Quantify, PureCoverage are software quality products from
|
|
429 ## Rational, formerly Pure Atria, formerly Pure Software.
|
272
|
430 ##
|
183
|
431 ## None of these products work with a dumped xemacs binary, because it
|
|
432 ## does unexpected things like free memory that has been malloc'ed in
|
|
433 ## a *different* process!! So we need to run these on temacs.
|
272
|
434 ##
|
183
|
435
|
|
436 .PHONY : run-rtcmacs run-puremacs run-quantmacs
|
0
|
437
|
78
|
438 rtc_patch.o:
|
|
439 rtc_patch_area -o $@
|
|
440
|
149
|
441 rtcmacs: $(temacs_deps) rtc_patch.o
|
173
|
442 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
|
78
|
443 mv temacs rtcmacs
|
|
444
|
183
|
445 run-rtcmacs: rtcmacs
|
78
|
446 dbx -q -C -c \
|
|
447 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
448 dbxenv suppress_startup_message 5.0; \
|
|
449 ignore POLL; \
|
|
450 check -access; \
|
|
451 suppress rui; \
|
267
|
452 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
|
78
|
453 run' rtcmacs
|
|
454
|
183
|
455 ## Purify
|
|
456 PURIFY_PROG=purify
|
|
457 PURIFY_FLAGS=-chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
|
|
458 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff
|
149
|
459 puremacs: $(temacs_deps)
|
181
|
460 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) -lpthread
|
|
461
|
|
462 run-puremacs: puremacs
|
267
|
463 ./puremacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
0
|
464
|
183
|
465 ## Quantify
|
|
466 #ifdef QUANTIFY
|
|
467 quantify_prog = quantify
|
|
468 quantify_flags = -windows=no -record-data=no
|
|
469 quantify_includes = -I/local/include
|
|
470 quantify_libs = /local/lib/quantify_stubs.a
|
|
471
|
149
|
472 quantmacs: $(temacs_deps)
|
|
473 $(quantify_prog) $(quantify_flags) $(LD) $(temacs_link_args)
|
183
|
474 #endif /* QUANTIFY */
|
0
|
475
|
183
|
476 PURECOV_PROG=purecov
|
149
|
477 covmacs: $(temacs_deps)
|
|
478 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
0
|
479
|
183
|
480
|
223
|
481 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
149
|
482 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
483 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
484
|
263
|
485 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
486 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
487 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
488
|
223
|
489 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
149
|
490 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
491 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
492
|
263
|
493 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
494 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
495 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
496
|
163
|
497 ## Position-independent code for shared library creation
|
149
|
498 #if USE_GCC
|
|
499 pic_arg = -fpic
|
|
500 #elif defined (IRIX)
|
|
501 pic_arg = -KPIC
|
|
502 # else
|
|
503 pic_arg = -K pic
|
|
504 #endif
|
|
505
|
0
|
506 #ifdef EXTERNAL_WIDGET
|
|
507
|
157
|
508 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
509 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
510 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
511 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
512 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
513 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
0
|
514
|
163
|
515 ## Add dependencies so things work right with a parallel make
|
0
|
516 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
149
|
517 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
518 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
519
|
|
520 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
521 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
|
0
|
522 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
523
|
|
524 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
149
|
525 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
526 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
527
|
|
528 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
529 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
530 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
531
|
|
532 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
|
149
|
533 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
|
0
|
534 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
535
|
|
536 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
|
149
|
537 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
538 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
539
|
163
|
540 ## We compile the common files twice (once with PIC and once without)
|
|
541 ## because on some systems, compiling with PIC but not linking into
|
|
542 ## a shared library messes things up.
|
|
543
|
0
|
544 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
|
149
|
545 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
|
0
|
546 mv extw-Xt.o extw-Xt-shared.o
|
|
547
|
|
548 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
|
149
|
549 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
550 mv extw-Xlib.o extw-Xlib-shared.o
|
|
551
|
|
552 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
|
149
|
553 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
|
0
|
554 mv extw-Xt.o extw-Xt-nonshared.o
|
|
555
|
|
556 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
|
149
|
557 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
558 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
559
|
157
|
560 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
|
|
561 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
|
0
|
562
|
157
|
563 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
|
|
564 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
|
0
|
565
|
157
|
566 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
|
|
567 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
|
0
|
568
|
|
569 #ifdef EXTW_LINK
|
|
570
|
157
|
571 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
|
|
572 EXTW_LINK(${external_client_motif_objs_shared}, libextcli_Xm.so.1)
|
0
|
573
|
157
|
574 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
|
|
575 EXTW_LINK(${external_client_xt_objs_shared}, libextcli_Xt.so.1)
|
0
|
576
|
157
|
577 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
|
|
578 EXTW_LINK(${external_client_xlib_objs_shared}, libextcli_Xlib.so.1)
|
0
|
579
|
149
|
580 #endif /* EXTW_LINK */
|
0
|
581
|
|
582 #endif /* EXTERNAL_WIDGET */
|
|
583
|
|
584 config.h: ${srcdir}/config.h.in
|
183
|
585 puresize-adjust.h: ${srcdir}/puresize.h
|
0
|
586 paths.h: ${srcdir}/paths.h.in
|
163
|
587 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
|
0
|
588
|
251
|
589 config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h :
|
163
|
590 @echo "The file $@ needs to be re-generated."
|
|
591 @echo "Please run a make in the top level directory."
|
|
592 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
593 @exit 1
|
0
|
594
|
163
|
595 ## Some machines have alloca built-in.
|
|
596 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
597 ## be used but generate no code.
|
|
598 ## Some have it written in assembler in alloca.s.
|
|
599 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
|
600
|
0
|
601
|
|
602 #ifdef C_ALLOCA
|
163
|
603 ## We could put something in alloca.c to #define free and malloc
|
|
604 ## whenever emacs was #defined, but that's not appropriate for all
|
|
605 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
|
|
606
|
0
|
607 alloca.o : ${srcdir}/alloca.c
|
193
|
608 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
|
0
|
609 #else
|
|
610 #ifndef HAVE_ALLOCA
|
|
611 alloca.o : ${srcdir}/alloca.s config.h
|
163
|
612 ## $(CPP) is cc -E, which may get confused by filenames
|
|
613 ## that do not end in .c. So copy file to a safe name. */
|
|
614 ## cp ${srcdir}/alloca.s allocatem.c
|
|
615 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
616 ## since some assemblers barf on them. Use a different basename for the
|
|
617 ## output file, since some stupid compilers (Green Hill) use that
|
|
618 ## name for the intermediate assembler file.
|
149
|
619 $(CPP) $(cppflags) allocatem.c | \
|
0
|
620 sed -e 's///' -e 's/^#.*//' | \
|
|
621 sed -n -e '/^..*$$/p' > allocax.s
|
163
|
622 @$(RM) alloca.o
|
|
623 ## Xenix, in particular, needs to run assembler via cc.
|
0
|
624 $(CC) -c allocax.s
|
|
625 mv allocax.o alloca.o
|
163
|
626 $(RM) allocax.s allocatem.c
|
0
|
627 #endif /* HAVE_ALLOCA */
|
|
628 #endif /* ! defined (C_ALLOCA) */
|
|
629
|
|
630 #ifdef EMACS_BTL
|
149
|
631 BTL_includes = -I$(BTL_dir)
|
|
632 BTL_compile = -DEMACS_BTL -D`lucid-arch` -I. $(BTL_includes) $(BTL_dir)/$(@:.o=.c)
|
0
|
633
|
|
634 cadillac-btl.o cadillac-btl-process.o cadillac-btl-emacs.o:
|
149
|
635 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
636 cadillac-btl-asm.o:
|
149
|
637 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
638 #endif /* EMACS_BTL */
|
|
639
|
|
640 #ifdef HAVE_NATIVE_SOUND
|
|
641 sunplay.o: ${srcdir}/sunplay.c
|
193
|
642 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
|
0
|
643 hpplay.o: ${srcdir}/hpplay.c
|
193
|
644 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
|
0
|
645 #endif /* HAVE_NATIVE_SOUND */
|
|
646
|
163
|
647 ## System-specific programs to be made.
|
|
648 ## ${other_files}, $(objects_system) and $(objects_machine)
|
|
649 ## select which of these should be compiled. */
|
|
650
|
171
|
651 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
0
|
652 mostlyclean:
|
272
|
653 $(RM) temacs puremacs quantmacs prefix-args *.o *.i \
|
259
|
654 core temacs.exe puresize-adjust.h sheap-adjust.h
|
171
|
655 clean: mostlyclean versionclean
|
183
|
656 $(RM) libextcli* update-elc.stamp
|
163
|
657 ## This is used in making a distribution.
|
|
658 ## Do not use it on development directories!
|
171
|
659 distclean: clean
|
249
|
660 $(RM) config.h paths.h Emacs.ad.h \
|
231
|
661 Makefile Makefile.in TAGS xemacs.*
|
0
|
662 realclean: distclean
|
|
663 versionclean:
|
259
|
664 $(RM) xemacs xemacs.exe ${libsrc}DOC
|
0
|
665 extraclean: realclean
|
171
|
666 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
0
|
667
|
163
|
668 .PHONY : lock unlock
|
171
|
669 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
120
|
670 config.h.in README COPYING ChangeLog
|
0
|
671 unlock:
|
|
672 chmod u+w $(SOURCES)
|
|
673
|
|
674 relock:
|
|
675 chmod -w $(SOURCES)
|
|
676
|
272
|
677 ## Dependency processing using home-grown script, not makedepend
|
|
678 FRC.depend :
|
|
679 depend: FRC.depend
|
|
680 $(RM) $@;
|
|
681 perl ${srcdir}/make-src-depend > depend.tmp
|
|
682 mv depend.tmp ${srcdir}/depend
|