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