]> code.delx.au - gnu-emacs/blobdiff - src/Makefile.in
(temacs${EXEEXT}): On GNUstep, link to appropriate GNUstep library
[gnu-emacs] / src / Makefile.in
index bdf5181f77873c24a985064297de6ffaf176b87a..32bdef6546d886e3ac1959c02b97c44dfc15170e 100644 (file)
@@ -254,11 +254,13 @@ DBUS_OBJ = dbusbind.o
 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
    since it may have -I options that should override those two.  */
 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@
+ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
+
 .SUFFIXES: .m
 .c.o:
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
 .m.o:
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) GNU_OBJC_CFLAGS $<
+       $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
 
 #ifndef LIBX11_SYSTEM
 #define LIBX11_SYSTEM
@@ -910,10 +912,7 @@ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} ${SOME_MACHINE_LISP}
        @: bootstrap-emacs, so let us replace it.
        -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #endif /* ! defined (CANNOT_DUMP) */
-/* XXX: not working under NS currently due to path shenanigans.. */
-#ifndef HAVE_NS
        -./emacs -q -batch -f list-load-path-shadows
-#endif
 
 /* We run make-docfile twice because the command line may get too long
    on some systems.  */
@@ -939,7 +938,10 @@ ${libsrc}make-docfile${EXEEXT}:
 temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
        echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst
 #ifdef NS_IMPL_GNUSTEP
-       $(CC) -rdynamic YMF_PASS_LDFLAGS (${TEMACS_LDFLAGS} -lgnustep-gui -lgnustep-base -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs ${obj} ${otherobj} OBJECTS_MACHINE ${LIBES}
+       $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
+       -L@GNUSTEP_SYSTEM_LIBRARIES@ $(LDFLAGS) -lgnustep-gui -lgnustep-base \
+       -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
+       ${obj} ${otherobj} OBJECTS_MACHINE ${LIBES}
 #else
        $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
     -o temacs ${STARTFILES} ${obj} ${otherobj}  \
@@ -1115,6 +1117,19 @@ mktime.o: mktime.c $(config_h)
 msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
    termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \
    keyboard.h intervals.h buffer.h commands.h blockinput.h atimer.h $(config_h)
+nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
+  dispextern.h nsgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
+  atimer.h systime.h epaths.h termhooks.h coding.h systime.h $(config_h)
+nsfont.o: nsterm.h dispextern.h frame.h lisp.h $(config_h)
+nsimage.o: nsimage.m nsterm.h $(config_h)
+nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
+  nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
+  nsterm.h $(config_h)
+nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
+  nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
+  termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
+  $(INTERVAL_SRC) process.h coding.h $(config_h)
+nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h $(config_h)
 process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
    commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
    blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
@@ -1239,22 +1254,11 @@ composite.o: composite.c buffer.h  character.h $(INTERVAL_SRC) $(config_h)
    select which of these should be compiled.  */
 
 #ifdef HAVE_NS
-buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
-  fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
-  scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o sound.o: nsgui.h
-nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
-  dispextern.h nsgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \
-  atimer.h systime.h epaths.h termhooks.h coding.h systime.h $(config_h)
-nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
-  nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
-  nsterm.h $(config_h)
-nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
-  nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
-  termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
-  $(INTERVAL_SRC) process.h coding.h $(config_h)
-nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h $(config_h)
-nsimage.o: nsimage.m nsterm.h
-nsfont.o: nsterm.h dispextern.h frame.h lisp.h $(config_h)
+/* In fact, every .o file depends directly or indirectly on dispextern.h
+   and hence nsgui.h under NS.  But the ones that actually use stuff there
+   are more limited.  */
+dispnew.o font.o fontset.o frame.o fringe.o image.o keyboard.o menu.o \
+   window.o xdisp.o xfaces.o: nsgui.h
 
 ${ns_appdir}: ${ns_appsrc}
        rm -fr ${ns_appdir}
@@ -1282,9 +1286,6 @@ clean: mostlyclean
        rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
 #ifdef HAVE_NS
        rm -fr ${ns_appdir}
-#ifdef NS_IMPL_GNUSTEP
-       rm -f *.d
-#endif
 #endif
 /* bootstrap-clean is used to clean up just before a bootstrap.
    It should remove all files generated during a compilation/bootstrap,
@@ -1374,7 +1375,7 @@ ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
        cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
 #ifdef CANNOT_DUMP
-       ln temacs${EXEEXT} bootstrap-emacs${EXEEXT}
+       ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #else
        $(RUN_TEMACS) --batch --load loadup bootstrap
        mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}