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
|
280
|
25 PROGNAME=@PROGNAME@
|
|
26
|
|
27 all: ${PROGNAME}
|
183
|
28 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
|
0
|
29
|
163
|
30 ## For performance and consistency, no built-in rules.
|
70
|
31 .SUFFIXES:
|
272
|
32 .SUFFIXES: .c .h .o .i .s .dep
|
0
|
33
|
173
|
34 @SET_MAKE@
|
|
35 SHELL=/bin/sh
|
|
36 RM = rm -f
|
|
37
|
163
|
38 lispdir = ${srcdir}/../lisp/
|
|
39 libsrc = ../lib-src/
|
|
40 etcdir = ../etc/
|
|
41
|
|
42 ## Here are the things that we expect ../configure to edit.
|
203
|
43 prefix=@prefix@
|
0
|
44 srcdir=@srcdir@
|
263
|
45 blddir=@blddir@
|
203
|
46 version=@version@
|
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\
|
278
|
172 frame.o general.o getloadavg.o glyphs.o glyphs-eimage.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
|
274
|
268 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
269 dnd_objs = @dnd_objs@
|
|
270 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
271
|
|
272 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
149
|
273 #endif /* HAVE_X_WINDOWS */
|
0
|
274
|
163
|
275 ## define otherobjs as list of object files that make-docfile
|
|
276 ## should not be told about.
|
151
|
277 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
263
|
278 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
279 othersrcs = $(otherobjs:.o=.c)
|
0
|
280
|
177
|
281 LIBES = $(lwlib_libs) $(quantify_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
0
|
282
|
|
283 #ifdef I18N3
|
149
|
284 mo_dir = ${etcdir}
|
|
285 mo_file = ${mo_dir}emacs.mo
|
0
|
286 #endif
|
|
287
|
267
|
288 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
|
0
|
289 DUMPENV = $(LOADPATH)
|
|
290
|
167
|
291 release: temacs ${libsrc}DOC $(mo_file) ${other_files}
|
0
|
292 #ifdef CANNOT_DUMP
|
280
|
293 ln temacs ${PROGNAME}
|
0
|
294 #else
|
|
295 #ifdef HAVE_SHM
|
|
296 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
297 w=`pwd`; cd ${srcdir} && $${w}/temacs -nl -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
298 else true; fi
|
104
|
299 @touch SATISFIED
|
267
|
300 -$(DUMPENV) ./temacs -nl -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
301 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
302 @$(RM) SATISFIED
|
0
|
303 #else /* ! defined (HAVE_SHM) */
|
|
304 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
305 w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
306 else true; fi
|
104
|
307 @touch SATISFIED
|
267
|
308 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
309 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
310 @$(RM) SATISFIED
|
0
|
311 #endif /* ! defined (HAVE_SHM) */
|
|
312 touch release
|
|
313 #endif /* ! defined (CANNOT_DUMP) */
|
|
314
|
280
|
315 ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
|
183
|
316 @$(RM) $@ && touch SATISFIED
|
267
|
317 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
193
|
318 @if test -f $@; then if test -f SATISFIED; then \
|
272
|
319 echo "Testing for Lisp shadows ..."; \
|
280
|
320 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
193
|
321 $(RM) SATISFIED; exit 0; fi; \
|
251
|
322 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
|
|
323 $(RECURSIVE_MAKE) $@;
|
173
|
324
|
267
|
325 fastdump: temacs
|
280
|
326 @$(RM) ${PROGNAME} && touch SATISFIED
|
269
|
327 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
280
|
328 @if test -f ${PROGNAME}; then if test -f SATISFIED; then \
|
|
329 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
267
|
330 $(RM) SATISFIED; exit 0; fi; \
|
|
331 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi;
|
|
332
|
183
|
333 FRC.update-elc.stamp :
|
|
334
|
215
|
335 update-elc.stamp : temacs FRC.update-elc.stamp
|
173
|
336 @touch NOBYTECOMPILE
|
267
|
337 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
183
|
338 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
|
|
339 $(RM) NOBYTECOMPILE
|
0
|
340
|
|
341 obj_src = $(objs:.o=.c)
|
|
342
|
263
|
343 dortl : $(obj_rtl) $(otherrtls)
|
272
|
344 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
|
263
|
345 (for a in $(obj_src) $(othersrcs);do \
|
|
346 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
|
272
|
347 done)
|
263
|
348 echo "))" >> ${srcdir}/../lisp/source-files.el
|
|
349
|
70
|
350 #ifdef DYNODUMP
|
163
|
351 dynodump_deps = ../dynodump/dynodump.so
|
|
352 ../dynodump/dynodump.so:
|
173
|
353 cd ../dynodump && $(RECURSIVE_MAKE)
|
149
|
354 #endif /* DYNODUMP */
|
0
|
355
|
185
|
356 ${libsrc}DOC: temacs update-elc.stamp
|
169
|
357 $(RM) ${libsrc}DOC; \
|
267
|
358 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \
|
163
|
359 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
|
|
360 ${obj_src} ${mallocdocsrc} ${rallocdocsrc}
|
0
|
361
|
|
362 dump_elcs: dump-elcs
|
|
363
|
|
364 dump-elcs: temacs
|
267
|
365 -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
0
|
366
|
80
|
367 all-elc all-elcs:
|
173
|
368 cd .. && $(RECURSIVE_MAKE) all-elc
|
80
|
369
|
70
|
370 #ifdef I18N3
|
|
371
|
|
372 # if defined(SPARC) && !defined(USG)
|
|
373 xgettext= /usr/openwin/bin/xgettext
|
|
374 xgettext_args= -o emacs -m_X messages
|
|
375 msgfmt= /usr/openwin/bin/msgfmt
|
|
376 # else
|
|
377 xgettext= xgettext
|
|
378 xgettext_args= -s -d emacs -M_X messages
|
|
379 msgfmt= msgfmt
|
|
380 #endif
|
|
381
|
167
|
382 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
|
|
383 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
|
80
|
384 cd ${libsrc} && ${xgettext} ${xgettext_args}
|
163
|
385 $(RM) ${mo_dir}emacs.po
|
149
|
386 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
|
70
|
387
|
149
|
388 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
|
|
389 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
|
70
|
390
|
|
391 ${libsrc}make-msgfile:
|
173
|
392 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
|
70
|
393
|
|
394 ${libsrc}make-po:
|
173
|
395 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
|
70
|
396
|
|
397 #endif /* I18N3 */
|
|
398
|
0
|
399 ${libsrc}make-docfile:
|
173
|
400 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
|
0
|
401
|
163
|
402 ## Lint Section
|
153
|
403 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
0
|
404 LINTFILES= $(objs:.o=.ln)
|
149
|
405 LINTINCLUDES = $(cppflags)
|
163
|
406 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
2
|
407 LINTFLAGS= -fd -m -s -u -v -x
|
0
|
408 lint: $(LINTFILES)
|
|
409 $(LINT.c) $(LINTFILES)
|
163
|
410 ## end of Lint Section
|
0
|
411
|
157
|
412 temacs_deps=\
|
183
|
413 $(start_files) ${objs} ${otherobjs}\
|
255
|
414 $(lwlib_deps) $(dynodump_deps)
|
0
|
415
|
157
|
416 temacs_link_args=\
|
173
|
417 ${start_flags} ${ldflags}\
|
163
|
418 -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
|
0
|
419
|
149
|
420 temacs: $(temacs_deps)
|
183
|
421 $(LD) $(temacs_link_args)
|
|
422
|
|
423 .PHONY : run-temacs
|
|
424
|
219
|
425 run-temacs: temacs
|
267
|
426 ./temacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
183
|
427
|
|
428 ## Debugging targets:
|
|
429 ##
|
|
430 ## RTC is Sun WorkShop's Run Time Checking
|
|
431 ##
|
|
432 ## Purify, Quantify, PureCoverage are software quality products from
|
|
433 ## Rational, formerly Pure Atria, formerly Pure Software.
|
272
|
434 ##
|
183
|
435 ## None of these products work with a dumped xemacs binary, because it
|
|
436 ## does unexpected things like free memory that has been malloc'ed in
|
|
437 ## a *different* process!! So we need to run these on temacs.
|
272
|
438 ##
|
183
|
439
|
|
440 .PHONY : run-rtcmacs run-puremacs run-quantmacs
|
0
|
441
|
78
|
442 rtc_patch.o:
|
|
443 rtc_patch_area -o $@
|
|
444
|
149
|
445 rtcmacs: $(temacs_deps) rtc_patch.o
|
173
|
446 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
|
78
|
447 mv temacs rtcmacs
|
|
448
|
183
|
449 run-rtcmacs: rtcmacs
|
78
|
450 dbx -q -C -c \
|
|
451 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
452 dbxenv suppress_startup_message 5.0; \
|
|
453 ignore POLL; \
|
|
454 check -access; \
|
|
455 suppress rui; \
|
267
|
456 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
|
78
|
457 run' rtcmacs
|
|
458
|
183
|
459 ## Purify
|
|
460 PURIFY_PROG=purify
|
|
461 PURIFY_FLAGS=-chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
|
|
462 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff
|
149
|
463 puremacs: $(temacs_deps)
|
181
|
464 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) -lpthread
|
|
465
|
|
466 run-puremacs: puremacs
|
267
|
467 ./puremacs -batch -l ${srcdir}/../lisp/loadup.el run-temacs
|
0
|
468
|
183
|
469 ## Quantify
|
|
470 #ifdef QUANTIFY
|
|
471 quantify_prog = quantify
|
|
472 quantify_flags = -windows=no -record-data=no
|
|
473 quantify_includes = -I/local/include
|
|
474 quantify_libs = /local/lib/quantify_stubs.a
|
|
475
|
149
|
476 quantmacs: $(temacs_deps)
|
|
477 $(quantify_prog) $(quantify_flags) $(LD) $(temacs_link_args)
|
183
|
478 #endif /* QUANTIFY */
|
0
|
479
|
183
|
480 PURECOV_PROG=purecov
|
149
|
481 covmacs: $(temacs_deps)
|
|
482 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
0
|
483
|
183
|
484
|
223
|
485 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
149
|
486 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
487 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
488
|
263
|
489 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
490 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
491 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
492
|
223
|
493 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
149
|
494 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
495 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
496
|
263
|
497 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
498 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
499 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
500
|
163
|
501 ## Position-independent code for shared library creation
|
149
|
502 #if USE_GCC
|
|
503 pic_arg = -fpic
|
|
504 #elif defined (IRIX)
|
|
505 pic_arg = -KPIC
|
|
506 # else
|
|
507 pic_arg = -K pic
|
|
508 #endif
|
|
509
|
0
|
510 #ifdef EXTERNAL_WIDGET
|
|
511
|
157
|
512 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
513 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
514 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
515 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
516 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
517 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
0
|
518
|
163
|
519 ## Add dependencies so things work right with a parallel make
|
0
|
520 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
149
|
521 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
522 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
523
|
|
524 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
525 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
|
0
|
526 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
527
|
|
528 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
149
|
529 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
530 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
531
|
|
532 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
533 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
534 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
535
|
|
536 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
|
149
|
537 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
|
0
|
538 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
539
|
|
540 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
|
149
|
541 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
542 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
543
|
163
|
544 ## We compile the common files twice (once with PIC and once without)
|
|
545 ## because on some systems, compiling with PIC but not linking into
|
|
546 ## a shared library messes things up.
|
|
547
|
0
|
548 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
|
149
|
549 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
|
0
|
550 mv extw-Xt.o extw-Xt-shared.o
|
|
551
|
|
552 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
|
149
|
553 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
554 mv extw-Xlib.o extw-Xlib-shared.o
|
|
555
|
|
556 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
|
149
|
557 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
|
0
|
558 mv extw-Xt.o extw-Xt-nonshared.o
|
|
559
|
|
560 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
|
149
|
561 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
562 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
563
|
157
|
564 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
|
|
565 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
|
0
|
566
|
157
|
567 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
|
|
568 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
|
0
|
569
|
157
|
570 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
|
|
571 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
|
0
|
572
|
|
573 #ifdef EXTW_LINK
|
|
574
|
157
|
575 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
|
|
576 EXTW_LINK(${external_client_motif_objs_shared}, libextcli_Xm.so.1)
|
0
|
577
|
157
|
578 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
|
|
579 EXTW_LINK(${external_client_xt_objs_shared}, libextcli_Xt.so.1)
|
0
|
580
|
157
|
581 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
|
|
582 EXTW_LINK(${external_client_xlib_objs_shared}, libextcli_Xlib.so.1)
|
0
|
583
|
149
|
584 #endif /* EXTW_LINK */
|
0
|
585
|
|
586 #endif /* EXTERNAL_WIDGET */
|
|
587
|
|
588 config.h: ${srcdir}/config.h.in
|
183
|
589 puresize-adjust.h: ${srcdir}/puresize.h
|
163
|
590 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
|
0
|
591
|
251
|
592 config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h :
|
163
|
593 @echo "The file $@ needs to be re-generated."
|
|
594 @echo "Please run a make in the top level directory."
|
|
595 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
596 @exit 1
|
0
|
597
|
163
|
598 ## Some machines have alloca built-in.
|
|
599 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
600 ## be used but generate no code.
|
|
601 ## Some have it written in assembler in alloca.s.
|
|
602 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
|
603
|
0
|
604
|
|
605 #ifdef C_ALLOCA
|
163
|
606 ## We could put something in alloca.c to #define free and malloc
|
|
607 ## whenever emacs was #defined, but that's not appropriate for all
|
|
608 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
|
|
609
|
0
|
610 alloca.o : ${srcdir}/alloca.c
|
193
|
611 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
|
0
|
612 #else
|
|
613 #ifndef HAVE_ALLOCA
|
|
614 alloca.o : ${srcdir}/alloca.s config.h
|
163
|
615 ## $(CPP) is cc -E, which may get confused by filenames
|
|
616 ## that do not end in .c. So copy file to a safe name. */
|
|
617 ## cp ${srcdir}/alloca.s allocatem.c
|
|
618 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
619 ## since some assemblers barf on them. Use a different basename for the
|
|
620 ## output file, since some stupid compilers (Green Hill) use that
|
|
621 ## name for the intermediate assembler file.
|
149
|
622 $(CPP) $(cppflags) allocatem.c | \
|
0
|
623 sed -e 's///' -e 's/^#.*//' | \
|
|
624 sed -n -e '/^..*$$/p' > allocax.s
|
163
|
625 @$(RM) alloca.o
|
|
626 ## Xenix, in particular, needs to run assembler via cc.
|
0
|
627 $(CC) -c allocax.s
|
|
628 mv allocax.o alloca.o
|
163
|
629 $(RM) allocax.s allocatem.c
|
0
|
630 #endif /* HAVE_ALLOCA */
|
|
631 #endif /* ! defined (C_ALLOCA) */
|
|
632
|
|
633 #ifdef EMACS_BTL
|
149
|
634 BTL_includes = -I$(BTL_dir)
|
|
635 BTL_compile = -DEMACS_BTL -D`lucid-arch` -I. $(BTL_includes) $(BTL_dir)/$(@:.o=.c)
|
0
|
636
|
|
637 cadillac-btl.o cadillac-btl-process.o cadillac-btl-emacs.o:
|
149
|
638 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
639 cadillac-btl-asm.o:
|
149
|
640 $(CC) $(CFLAGS) -c $(BTL_compile)
|
0
|
641 #endif /* EMACS_BTL */
|
|
642
|
|
643 #ifdef HAVE_NATIVE_SOUND
|
|
644 sunplay.o: ${srcdir}/sunplay.c
|
193
|
645 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
|
0
|
646 hpplay.o: ${srcdir}/hpplay.c
|
193
|
647 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
|
0
|
648 #endif /* HAVE_NATIVE_SOUND */
|
|
649
|
163
|
650 ## System-specific programs to be made.
|
|
651 ## ${other_files}, $(objects_system) and $(objects_machine)
|
|
652 ## select which of these should be compiled. */
|
|
653
|
171
|
654 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
0
|
655 mostlyclean:
|
272
|
656 $(RM) temacs puremacs quantmacs prefix-args *.o *.i \
|
259
|
657 core temacs.exe puresize-adjust.h sheap-adjust.h
|
171
|
658 clean: mostlyclean versionclean
|
183
|
659 $(RM) libextcli* update-elc.stamp
|
163
|
660 ## This is used in making a distribution.
|
|
661 ## Do not use it on development directories!
|
171
|
662 distclean: clean
|
276
|
663 $(RM) config.h paths.h Emacs.ad.h \
|
280
|
664 Makefile Makefile.in TAGS ${PROGNAME}.*
|
0
|
665 realclean: distclean
|
|
666 versionclean:
|
280
|
667 $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
|
0
|
668 extraclean: realclean
|
171
|
669 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
0
|
670
|
163
|
671 .PHONY : lock unlock
|
276
|
672 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
120
|
673 config.h.in README COPYING ChangeLog
|
0
|
674 unlock:
|
|
675 chmod u+w $(SOURCES)
|
|
676
|
|
677 relock:
|
|
678 chmod -w $(SOURCES)
|
|
679
|
272
|
680 ## Dependency processing using home-grown script, not makedepend
|
|
681 depend: FRC.depend
|
280
|
682 $(RM) ${srcdir}/depend; mv depend.tmp ${srcdir}/depend
|
272
|
683 perl ${srcdir}/make-src-depend > depend.tmp
|
|
684 mv depend.tmp ${srcdir}/depend
|