/^CPPFLAGS *=/s/@[^@\n]*@//
/^LDFLAGS *=/s/@[^@\n]*@//
/^LIBS *=/s/@[^@\n]*@//
-s/@LIB_MATH@/-lm/
/^LIBES *=/,/^ *$/ {
s/@[^@\n]*@//g
}
/^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/
/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
+/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@//
+/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
/^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
/^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
/^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@//
/^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@//
/^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
/^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
+/^LIB_STANDARD *=/s/@LIB_STANDARD@//
+/^LIB_MATH *=/s/@LIB_MATH@/-lm/
/^LIBTIFF *=/s/@LIBTIFF@//
/^LIBJPEG *=/s/@LIBJPEG@//
/^LIBPNG *=/s/@LIBPNG@//
/^LIBGIF *=/s/@LIBGIF@//
/^LIBXPM *=/s/@LIBXPM@//
/^XFT_LIBS *=/s/@XFT_LIBS@//
+/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@//
+/^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@//
+/^FREETYPE_CFLAGS *=/s/@FREETYPE_CFLAGS@//
+/^FREETYPE_LIBS *=/s/@FREETYPE_LIBS@//
+/^LIBOTF_CFLAGS *=/s/@LIBOTF_CFLAGS@//
+/^LIBOTF_LIBS *=/s/@LIBOTF_LIBS@//
+/^M17N_FLT_CFLAGS *=/s/@M17N_FLT_CFLAGS@//
+/^M17N_FLT_LIBS *=/s/@M17N_FLT_LIBS@//
/^DBUS_CFLAGS *=/s/@DBUS_CFLAGS@//
/^DBUS_LIBS *=/s/@DBUS_LIBS@//
/^DBUS_OBJ *=/s/@DBUS_OBJ@//
/^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@//
/^NS_OBJ *=/s/@NS_OBJ@//
/^NS_SUPPORT *=/s/@NS_SUPPORT@//
+/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@//
+/^GNUSTEP_SYSTEM_LIBRARIES *=/s/@GNUSTEP_SYSTEM_LIBRARIES@//
+/^LIBRESOLV *=/s/@LIBRESOLV@//
/^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@//
/^GETLOADAVG_LIBS *=/s/@[^@\n]*@//
/^START_FILES *=/s/@START_FILES@//
/^OTHER_FILES *=/s/@OTHER_FILES@//
/^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/
/^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o ftfont.o xftfont.o ftxfont.o/
+/^LIBGPM *=/s/@LIBGPM@//
/^EXEEXT *=/s/@EXEEXT@/.exe/
/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
-s/@unexec@/unexec.o/g
+/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/
/^version *=/s/@[^@\n]*@//
/^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
/^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
## System-specific CFLAGS.
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
+
+## Currently only set if NS_IMPL_GNUSTEP.
+## C_SWITCH_X_SITE may override this.
+C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
+
+## Define C_SWITCH_X_SITE to contain any special flags your compiler
+## may need to deal with X Windows. For instance, if you've defined
+## HAVE_X_WINDOWS and your X include files aren't in a place that your
+## compiler can find on its own, you might want to add "-I/..." or
+## something similar. This is normally set by configure.
+## This is used before C_SWITCH_X_SYSTEM and may override it.
+C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
+
## This holds any special options for linking temacs only (ie, not
## used by configure). Not used elsewhere because it sometimes
## contains options that have to do with using Emacs's crt0,
## which are only good with temacs.
LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
+
## Next two must come before LD_SWITCH_SYSTEM.
## If needed, a -R option that says where to find X windows at run time.
LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
## As above, but using -rpath instead.
LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
+
## System-specific LDFLAGS.
LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@
+
## Flags to pass to ld only for temacs.
TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS)
## Where to find libgcc.a, if using gcc and necessary.
LIB_GCC=@LIB_GCC@
+## May use $CRT_DIR.
+LIB_STANDARD=@LIB_STANDARD@
+
+## -lm, or empty.
+LIB_MATH=@LIB_MATH@
+
LIBTIFF=@LIBTIFF@
LIBJPEG=@LIBJPEG@
LIBPNG=@LIBPNG@
XFT_LIBS=@XFT_LIBS@
LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
+LIBOTF_LIBS = @LIBOTF_LIBS@
+M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
+M17N_FLT_LIBS = @M17N_FLT_LIBS@
+
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DBUS_OBJ = @DBUS_OBJ@
NS_OBJ=@NS_OBJ@
NS_SUPPORT=@NS_SUPPORT@
+## Next two only set if NS_IMPL_GNUSTEP.
+GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
+GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@
## Only used if HAVE_X_WINDOWS and HAVE_WINDOW_SYSTEM.
FONT_OBJ=@FONT_OBJ@
## ${lispsource}mouse.elc if HAVE_GPM, otherwise empty.
## Not used if HAVE_MOUSE.
GPM_MOUSE_SUPPORT=@GPM_MOUSE_SUPPORT@
+LIBGPM = @LIBGPM@
BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \
${lispsource}international/fontset.elc ${lispsource}dnd.elc \
X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \
${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc
+## -lresolv, or empty.
+LIBRESOLV = @LIBRESOLV@
+
LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
INTERVALS_H = dispextern.h intervals.h composite.h
START_FILES = @START_FILES@
+UNEXEC_OBJ = @unexec@
+
# ========================== start of cpp stuff =======================
/* From here on, comments must be done in C syntax. */
the information in ``config.h''. */
/* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
- since it may have -I options that should override those two. */
+ since it may have -I options that should override those. */
/* MYCPPFLAGS only referenced in etc/DEBUG. */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
-ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS}
+ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
.SUFFIXES: .m
.c.o:
cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
alloc.o data.o doc.o editfns.o callint.o \
eval.o floatfns.o fns.o font.o print.o lread.o \
- syntax.o @unexec@ bytecode.o \
+ syntax.o $(UNEXEC_OBJ) bytecode.o \
process.o callproc.o \
region-cache.o sound.o atimer.o \
doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
with GCC, we might need gnulib again after them. */
LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
- $(RSVG_LIBS) $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ $(LIBS_SYSTEM) \
+ $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
$(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
- @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
- $(GNULIB_VAR) @LIB_MATH@ @LIB_STANDARD@ $(GNULIB_VAR)
+ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
+ $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR)
all: emacs${EXEEXT} $(OTHER_FILES)
temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
#ifdef NS_IMPL_GNUSTEP
$(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
- -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
+ -L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \
-lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
${obj} ${otherobj} ${LIBES}
#else