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.
5 ## Copyright (C) 1998, 1999 J. Kean Johnston.
7 ## This file is part of XEmacs.
9 ## XEmacs is free software; you can redistribute it and/or modify it
10 ## under the terms of the GNU General Public License as published by the
11 ## Free Software Foundation; either version 2, or (at your option) any
14 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
15 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 ## You should have received a copy of the GNU General Public License
20 ## along with XEmacs; see the file COPYING. If not, write to
21 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ## Boston, MA 02111-1307, USA.
24 ## Synched up with: Not synched with FSF.
32 DUMP_TARGET = ${PROGNAME}.dmp
33 EXE_TARGET = ${PROGNAME}
36 DUMP_TARGET = ${PROGNAME}
41 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
43 ## For performance and consistency, no built-in rules.
45 .SUFFIXES: .c .h .o .i .s .dep
48 RECURSIVE_MAKE=$(MAKE)
51 RECURSIVE_MAKE=@RECURSIVE_MAKE@
57 lispdir = ${srcdir}/../lisp/
58 moduledir = ${srcdir}/../modules/
62 ## Here are the things that we expect ../configure to edit.
73 c_switch_all=@c_switch_all@
74 ld_switch_all=@ld_switch_all@
75 ld_libs_all=@ld_libs_all@
76 ld_dynamic_link_flags=@ld_dynamic_link_flags@
78 extra_objs=@extra_objs@
81 ld_switch_shared=@ld_switch_shared@
82 start_files=@start_files@
83 start_flags=@start_flags@
86 ##libmcheck=@libmcheck@
89 ## With the traditional VPATH setting, it is not possible to
90 ## simultaneously compile in-place and in another directory. The
91 ## mistaken definition is that *all* dependencies are searched for in
92 ## the VPATH directory, rather than just the dependencies that are not
93 ## themselves targets. Thus, if there is an up-to-date .o file in the
94 ## in-place location, it will not get recompiled in the not-in-place
97 ## The GNU Make "vpath" directive continues this tradition, but at
98 ## least lets you restrict the classes of files that it applies to.
99 ## This allows us to kludge around the problem.
104 ## now list files that should NOT be searched in the srcdir.
105 ## This includes any .c or .h built from something else
106 ## (e.g. a .in file).
118 LWLIB_SRCDIR = ${srcdir}/../lwlib
120 #ifdef HAVE_X_WINDOWS
121 lwlib_libs = ../lwlib/liblw.a
122 lwlib_deps = $(lwlib_libs)
124 cd ../lwlib && $(RECURSIVE_MAKE)
126 x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
127 glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
133 X11_libs = $(LIBI18N)
134 #endif /* HAVE_X_WINDOWS */
136 #if defined (HEAP_IN_DATA) && !defined (PDUMP)
140 #if defined (WIN32_NATIVE) || defined (CYGWIN)
141 win32_objs=win32.o xemacs_res.o
144 ## -Demacs is needed to make some files produce the correct version
147 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
148 cflags = $(CFLAGS) $(cppflags)
149 #if defined (WIN32_NATIVE) || defined (CYGWIN)
150 ldflags = $(LDFLAGS) -mwindows $(ld_switch_all) $(ld_dynamic_link_flags)
152 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
160 $(CC) -c $(cflags) $<
162 ## Create preprocessor output (debugging purposes only)
165 $(CC) -E $(cppflags) -o $@ $<
166 #else /* works on Solaris; what about other systems? */
167 $(CC) -P $(cppflags) $<
168 #endif /* compiler */
170 ## Create assembler output (debugging purposes only)
172 $(CC) -S -c $(cflags) $<
176 $(CC) -dr -c $(cflags) $<
178 ## lastfile must follow all files whose initialized data areas should
179 ## be dumped as pure by dump-emacs.
181 ## NOTE: The last line cannot be all macros, because make will barf
182 ## if they all come out null.
185 abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
186 callint.o callproc.o casefiddle.o casetab.o chartab.o\
187 cmdloop.o cmds.o console.o console-stream.o\
188 data.o device.o dired.o doc.o doprnt.o dynarr.o\
189 editfns.o elhash.o emacs.o\
190 eval.o events.o $(extra_objs)\
191 event-stream.o extents.o faces.o\
192 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
193 frame.o general.o glyphs.o glyphs-eimage.o glyphs-widget.o\
194 gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
195 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
196 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
197 print.o process.o profile.o\
198 rangetab.o redisplay.o redisplay-output.o regex.o\
199 search.o select.o $(sheap_objs) signal.o sound.o\
200 specifier.o strftime.o symbols.o syntax.o sysdep.o\
201 undo.o $(x_objs) widget.o window.o $(win32_objs)
203 obj_rtl = $(objs:.o=.c.rtl)
206 rallocdocsrc = ralloc.c
207 rallocobjs = ralloc.o
210 malloclib = $(libmcheck)
211 #ifndef SYSTEM_MALLOC
212 # ifdef GNU_MALLOC /* GNU malloc */
213 # ifdef ERROR_CHECK_MALLOC
214 #ifdef DOUG_LEA_MALLOC
215 mallocobjs = free-hook.o vm-limit.o
217 mallocobjs = gmalloc.o free-hook.o vm-limit.o
219 mallocdocsrc = free-hook.c
220 # else /* New GNU malloc, sans error checking */
221 #ifdef DOUG_LEA_MALLOC
222 mallocobjs = vm-limit.o
224 mallocobjs = gmalloc.o vm-limit.o
227 # endif /* ERROR_CHECK_MALLOC */
228 # else /* Older GNU malloc */
229 mallocobjs = malloc.o
231 # endif /* Older GNU malloc */
232 #else /* SYSTEM_MALLOC */
235 #ifdef USE_DEBUG_MALLOC
236 malloclib = -ldmalloc
237 #endif /* USE_DEBUG_MALLOC */
238 #endif /* SYSTEM_MALLOC */
240 #ifdef HAVE_X_WINDOWS
242 # ifdef EXTERNAL_WIDGET
243 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
245 ## Now we try to figure out how to link a shared library.
246 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
247 ## library will not be created.
251 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
252 extw_link_beg = $(CC) -shared
253 extw_link_mid = -Xlinker -z -Xlinker text -o
255 ## I cannot figure out how to do shared a.out libraries, so just punt.
256 # elif !defined (LINUX) || defined (__ELF__)
257 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
258 extw_link_beg = $(CC) -shared
262 # elif defined (USG5)
264 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
265 extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
268 # else /* not IRIX */
269 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
270 extw_link_beg = $(CC) -G
271 extw_link_mid = -z text -o
273 # endif /* not IRIX */
274 # else /* not USG5 */
275 # if defined (DEC_ALPHA) && defined (OSF1)
276 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
277 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
279 extw_link_end = $(LIBES)
280 # else /* !(DEC_ALPHA && OSF1) */
281 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
282 extw_link_beg = $(LD) -dc
283 extw_link_mid = -assert pure-text -o
285 # endif /* !(DEC_ALPHA && OSF1) */
286 # endif /* not USG5 */
288 # ifdef LWLIB_USES_MOTIF
290 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
292 motif_other_files = libextcli_Xm.a
294 #endif /* LWLIB_USES_MOTIF */
297 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
300 ${motif_other_files}\
301 libextcli_Xt.a libextcli_Xlib.a\
302 ${shared_other_files}
305 # endif /* EXTERNAL_WIDGET */
307 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
308 dnd_objs = @dnd_objs@
309 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
311 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
312 #endif /* HAVE_X_WINDOWS */
314 ## define otherobjs as list of object files that make-docfile
315 ## should not be told about.
316 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
317 otherrtls = $(otherobjs:.o=.c.rtl)
318 othersrcs = $(otherobjs:.o=.c)
320 LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
324 mo_file = ${mo_dir}emacs.mo
327 temacs_loadup = ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el
328 dump_temacs = ${temacs_loadup} dump
329 run_temacs = ${temacs_loadup} run-temacs
330 debug_temacs = gdb ${EXE_TARGET}
332 release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files}
334 ln ${EXE_TARGET} ${PROGNAME}
336 -if [ -w ${srcdir}/../lisp ]; then \
337 w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/inc-vers; \
339 -./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el dump
341 #endif /* ! defined (CANNOT_DUMP) */
343 ${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
345 @$(RM) $@ && touch SATISFIED
347 @if test -f $@; then if test -f SATISFIED; then \
348 echo "Testing for Lisp shadows ..."; \
349 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
350 $(RM) SATISFIED; exit 0; fi; \
351 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
353 $(RECURSIVE_MAKE) $@;
357 @echo "Testing for Lisp shadows ..."
358 @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
361 fastdump: ${EXE_TARGET}
362 @$(RM) ${DUMP_TARGET} && touch SATISFIED
364 @./${PROGNAME} -batch -vanilla -f list-load-path-shadows
366 FRC.update-elc.stamp :
368 update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp
370 ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
371 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
374 obj_src = $(objs:.o=.c)
376 dortl : $(obj_rtl) $(otherrtls)
377 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
378 (for a in $(obj_src) $(othersrcs);do \
379 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
381 echo "))" >> ${srcdir}/../lisp/source-files.el
384 dynodump_deps = ../dynodump/dynodump.so
385 ../dynodump/dynodump.so:
386 cd ../dynodump && $(RECURSIVE_MAKE)
387 #endif /* DYNODUMP */
389 ${libsrc}DOC: ${EXE_TARGET} update-elc.stamp
390 $(RM) ${libsrc}DOC; \
391 ${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/make-docfile.el -- \
392 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
393 ${obj_src} ${mallocdocsrc} ${rallocdocsrc} ${extra_doc_files}
397 dump-elcs: ${EXE_TARGET}
398 -${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
401 cd .. && $(RECURSIVE_MAKE) all-elc
405 # if defined(SPARC) && !defined(USG)
406 xgettext= /usr/openwin/bin/xgettext
407 xgettext_args= -o emacs -m_X messages
408 msgfmt= /usr/openwin/bin/msgfmt
411 xgettext_args= -s -d emacs -M_X messages
415 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
416 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
417 cd ${libsrc} && ${xgettext} ${xgettext_args}
418 $(RM) ${mo_dir}emacs.po
419 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
421 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
422 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
424 ${libsrc}make-msgfile:
425 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
428 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
432 ${libsrc}make-dump-id:
433 cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id
435 ${libsrc}make-docfile:
436 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
439 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
440 LINTFILES= $(objs:.o=.ln)
441 LINTINCLUDES = $(cppflags)
442 ## LINTFLAGS= -fd -m -p -s -u -v -x
443 LINTFLAGS= -fd -m -s -u -v -x
445 $(LINT.c) $(LINTFILES)
446 ## end of Lint Section
449 $(start_files) ${objs} ${otherobjs}\
450 $(lwlib_deps) $(dynodump_deps)
452 temacs_deps = $(link_deps) ${DUMP_ID}
455 ${start_flags} ${ldflags}\
456 -o $@ ${start_files} ${objs} ${otherobjs} ${DUMP_ID} ${LIBES}
458 ${EXE_TARGET}: $(temacs_deps)
459 $(LD) $(temacs_link_args)
461 dump-id.c: ${libsrc}make-dump-id ${link_deps}
462 ${libsrc}make-dump-id
466 run-temacs: ${EXE_TARGET}
469 ## We have automated tests!!
470 testdir = ${srcdir}/../tests/automated
471 batch_test_emacs = -batch -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir}
473 .PHONY: check check-temacs
475 ./${PROGNAME} ${batch_test_emacs}
477 ${run_temacs} ${batch_test_emacs}
479 ## Debugging targets:
481 ## None of the debugging products work with a dumped xemacs binary,
482 ## because it does unexpected things like free memory that has been
483 ## malloc'ed in a *different* process!! So we need to run these on
486 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
490 rtcmacs: $(temacs_deps) rtc_patch.o
491 $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o
492 mv ${EXE_TARGET} rtcmacs
497 'dbxenv rtc_error_log_file_name /dev/fd/1; \
498 dbxenv suppress_startup_message 5.0; \
502 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
505 debug-temacs: ${EXE_TARGET}
508 ## Purify, Quantify, PureCoverage are software quality products from
509 ## Rational, formerly Pure Atria, formerly Pure Software.
518 -chain-length=32 -ignore-signals=SIGPOLL\
519 -cache-dir=${blddir}/purecache -always-use-cache-dir=yes
521 puremacs: $(temacs_deps)
522 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
527 QUANTIFY_PROG = quantify
528 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
529 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
530 cppflags += -I$(QUANTIFY_HOME)
531 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
533 quantmacs: $(temacs_deps)
534 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
536 #endif /* QUANTIFY */
540 covmacs: $(temacs_deps)
541 $(PURECOV_PROG) $(LD) $(temacs_link_args)
544 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
545 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
546 mv EmacsShell-sub.o TopLevelEmacsShell.o
548 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
549 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
550 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
552 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
553 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
554 mv EmacsShell-sub.o TransientEmacsShell.o
556 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
557 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
558 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
560 ## The above rules are subject to a race condition if using a parallel make.
561 TransientEmacsShell.o : TopLevelEmacsShell.o
562 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
564 ## Position-independent code for shared library creation
573 #ifdef EXTERNAL_WIDGET
575 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
576 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
577 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
578 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
579 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
580 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
582 ## Add dependencies so things work right with a parallel make
583 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
584 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
585 mv ExternalClient.o ExternalClient-Xm-shared.o
587 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
588 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
589 mv ExternalClient.o ExternalClient-Xt-shared.o
591 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
592 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
593 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
595 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
596 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
597 mv ExternalClient.o ExternalClient-Xm-nonshared.o
599 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
600 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
601 mv ExternalClient.o ExternalClient-Xt-nonshared.o
603 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
604 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
605 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
607 ## We compile the common files twice (once with PIC and once without)
608 ## because on some systems, compiling with PIC but not linking into
609 ## a shared library messes things up.
611 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
612 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
613 mv extw-Xt.o extw-Xt-shared.o
615 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
616 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
617 mv extw-Xlib.o extw-Xlib-shared.o
619 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
620 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
621 mv extw-Xt.o extw-Xt-nonshared.o
623 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
624 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
625 mv extw-Xlib.o extw-Xlib-nonshared.o
627 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
628 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
630 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
631 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
633 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
634 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
638 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
639 ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end}
641 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
642 ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end}
644 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
645 ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end}
647 #endif /* EXTW_LINK */
649 #endif /* EXTERNAL_WIDGET */
651 config.h: ${srcdir}/config.h.in
652 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
654 config.h sheap-adjust.h paths.h Emacs.ad.h :
655 @echo "The file $@ needs to be re-generated."
656 @echo "Please run a make in the top level directory."
657 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
660 ## Some machines have alloca built-in.
661 ## They should define HAVE_ALLOCA, or may just let alloca.s
662 ## be used but generate no code.
663 ## Some have it written in assembler in alloca.s.
664 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
668 ## We could put something in alloca.c to #define free and malloc
669 ## whenever emacs was #defined, but that's not appropriate for all
670 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
672 alloca.o : ${srcdir}/alloca.c
673 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
676 alloca.o : ${srcdir}/alloca.s config.h
677 ## $(CPP) is cc -E, which may get confused by filenames
678 ## that do not end in .c. So copy file to a safe name. */
679 ## cp ${srcdir}/alloca.s allocatem.c
680 ## Remove any ^L, blank lines, and preprocessor comments,
681 ## since some assemblers barf on them. Use a different basename for the
682 ## output file, since some stupid compilers (Green Hill) use that
683 ## name for the intermediate assembler file.
684 $(CPP) $(cppflags) allocatem.c | \
685 sed -e 's/
\f//' -e 's/^#.*//' | \
686 sed -n -e '/^..*$$/p' > allocax.s
688 ## Xenix, in particular, needs to run assembler via cc.
690 mv allocax.o alloca.o
691 $(RM) allocax.s allocatem.c
692 #endif /* HAVE_ALLOCA */
693 #endif /* ! defined (C_ALLOCA) */
695 #ifdef HAVE_NATIVE_SOUND
696 sound_cflags=@sound_cflags@
697 sunplay.o: ${srcdir}/sunplay.c
698 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
699 hpplay.o: ${srcdir}/hpplay.c
700 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
701 #endif /* HAVE_NATIVE_SOUND */
703 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H)
708 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files)
711 xemacs_res.o: ${srcdir}/../nt/xemacs.rc
712 windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@
714 ## System-specific programs to be made.
715 ## ${other_files}, $(objects_system) and $(objects_machine)
716 ## select which of these should be compiled. */
718 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
720 $(RM) temacs puremacs quantmacs *.o *.i \
721 core temacs.exe sheap-adjust.h
722 clean: mostlyclean versionclean
723 $(RM) libextcli* update-elc.stamp
724 ## This is used in making a distribution.
725 ## Do not use it on development directories!
727 $(RM) config.h paths.h Emacs.ad.h \
728 GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
731 $(RM) ${EXE_TARGET} ${DUMP_TARGET} ${libsrc}DOC
732 extraclean: realclean
733 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
736 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
737 config.h.in README COPYING ChangeLog
744 ## Header files for ellcc
746 MAKEPATH=../lib-src/make-path
748 ${MAKEPATH} ${archlibdir}/include ${archlibdir}/include/m ${archlibdir}/include/s
749 -@echo "Copying include files for ellcc..."
751 cd ${srcdir}; hdrdir2=`pwd`; cd $$hdir; \
752 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \
753 (for thisdir in $$hdir; do \
756 for hdrfile in *.h; do \
757 hdrtars="$$hdrtars $$hdrfile"; \
759 test -d s && hdrtars="$$hdrtars s/*"; \
760 test -d m && hdrtars="$$hdrtars m/*"; \
761 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
762 (cd ${archlibdir}/include && umask 022 && tar xf -); \
763 chmod 755 ${archlibdir}/include; \
764 test -d ${archlibdir}/include/s && \
765 chmod 755 ${archlibdir}/include/s; \
766 test -d ${archlibdir}/include/m && \
767 chmod 755 ${archlibdir}/include/s;) \
771 ## Dependency processing using home-grown script, not makedepend
775 cd ${srcdir} && $(RM) depend.tmp && \
776 perl ./make-src-depend > depend.tmp && \
777 if cmp -s depend depend.tmp; \
778 then $(RM) depend.tmp; \
779 else $(RM) depend && mv depend.tmp depend; \