update.
[chise/xemacs-chise.git.1] / src / Makefile.in.in
index 4e86817..3ad0cc2 100644 (file)
@@ -45,14 +45,15 @@ all: ${DUMP_TARGET}
 .SUFFIXES: .c .h .o .i .s .dep
 
 #ifdef USE_GNU_MAKE
-RECURSIVE_MAKE=$(MAKE)
+RECURSIVE_MAKE_ARGS=
 #else
 @SET_MAKE@
-RECURSIVE_MAKE=@RECURSIVE_MAKE@
+RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@
 #endif
 
 SHELL=/bin/sh
 RM = rm -f
+TAR = tar
 
 lispdir = ${srcdir}/../lisp/
 moduledir = ${srcdir}/../modules/
@@ -121,7 +122,7 @@ LWLIB_SRCDIR = ${srcdir}/../lwlib
 lwlib_libs = ../lwlib/liblw.a
 lwlib_deps = $(lwlib_libs)
 $(lwlib_libs) :
-       cd ../lwlib && $(RECURSIVE_MAKE)
+       cd ../lwlib && $(MAKE) $(RECURSIVE_MAKE_ARGS)
 
 x_objs=console-x.o device-x.o event-Xt.o frame-x.o\
  glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o
@@ -141,17 +142,25 @@ sheap_objs=sheap.o
 win32_objs=win32.o xemacs_res.o
 #endif
 
+#ifdef HAVE_SETITIMER
+profile_objs=profile.o
+#endif
+
 ## -Demacs is needed to make some files produce the correct version
 ## for use in Emacs.
 
 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
 cflags   = $(CFLAGS) $(cppflags)
-#if defined (WIN32_NATIVE) || defined (CYGWIN)
-ldflags  = $(LDFLAGS) -mwindows $(ld_switch_all) $(ld_dynamic_link_flags)
+#if defined (WIN32_NATIVE)
+ldflags  = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
 #else
 ldflags  = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
 #endif
 
+#if defined (CYGWIN) && !defined (PDUMP)
+ldflags += -Wl,--script=s/cygwin.sc
+#endif
+
 #ifdef SOLARIS2
 %.o : %.c
 #else
@@ -194,7 +203,7 @@ objs=\
  gui.o gutter.o $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
  keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
  macros.o marker.o md5.o minibuf.o objects.o opaque.o\
- print.o process.o profile.o\
+ print.o process.o $(profile_objs)\
  rangetab.o redisplay.o redisplay-output.o regex.o\
  search.o select.o $(sheap_objs) signal.o sound.o\
  specifier.o strftime.o symbols.o syntax.o sysdep.o\
@@ -383,7 +392,7 @@ dortl : $(obj_rtl) $(otherrtls)
 #ifdef DYNODUMP
 dynodump_deps = ../dynodump/dynodump.so
 ../dynodump/dynodump.so:
-       cd ../dynodump && $(RECURSIVE_MAKE)
+       cd ../dynodump && $(MAKE) $(RECURSIVE_MAKE_ARGS)
 #endif /* DYNODUMP */
 
 ${libsrc}DOC: ${EXE_TARGET} update-elc.stamp
@@ -398,7 +407,7 @@ dump-elcs: ${EXE_TARGET}
        -${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
 
 all-elc all-elcs:
-       cd .. && $(RECURSIVE_MAKE) all-elc
+       cd .. && $(MAKE) $(RECURSIVE_MAKE_ARGS) all-elc
 
 #ifdef I18N3
 
@@ -422,18 +431,18 @@ ${mo_dir}emacs.mo: ${mo_dir}emacs.po
        cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
 
 ${libsrc}make-msgfile:
-       cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
+       cd ${libsrc} && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-msgfile
 
 ${libsrc}make-po:
-       cd ${libsrc} && $(RECURSIVE_MAKE) make-po
+       cd ${libsrc} && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-po
 
 #endif /* I18N3 */
 
 ${libsrc}make-dump-id:
-       cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id
+       cd ${libsrc} && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-dump-id
 
 ${libsrc}make-docfile:
-       cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
+       cd ${libsrc} && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-docfile
 
 ## Lint Section
 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
@@ -758,8 +767,8 @@ install: ${PROGNAME}
                done; \
                test -d s && hdrtars="$$hdrtars s/*"; \
                test -d m && hdrtars="$$hdrtars m/*"; \
-               test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
-                       (cd ${archlibdir}/include && umask 022 && tar xf -); \
+               test -n "$$hdrtars" && (${TAR} cf - $$hdrtars) | \
+                       (cd ${archlibdir}/include && umask 022 && ${TAR} xf -); \
                chmod 755 ${archlibdir}/include; \
                test -d ${archlibdir}/include/s && \
                  chmod 755 ${archlibdir}/include/s; \