Fixed a typo in emacsclientw.exe's name.
[bpt/emacs.git] / lib-src / Makefile.in
index c5acca2..5e96166 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for lib-src subdirectory in GNU Emacs.
-# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2012
-#   Free Software Foundation, Inc.
+# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2013 Free Software
+# Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -113,8 +113,11 @@ MKDIR_P = @MKDIR_P@
 
 # ========================== Lists of Files ===========================
 
+# emacsclientw.exe for MinGW, empty otherwise
+CLIENTW = @CLIENTW@
+
 # Things that a user might actually run, which should be installed in bindir.
-INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \
+INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
                ebrowse${EXEEXT}
 
 INSTALLABLE_SCRIPTS = grep-changelog
@@ -161,11 +164,20 @@ LIBRESOLV=@LIBRESOLV@
 LIBS_MAIL=@LIBS_MAIL@
 ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+## empty or -lrt or -lposix4 if HAVE_FDATASYNC
+LIB_FDATASYNC = @LIB_FDATASYNC@
+## empty of -lwsock32 for MinGW
+LIB_WSOCK32 = @LIB_WSOCK32@
 
 ## Extra libraries to use when linking movemail.
 LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
             $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV)
 
+## Extra object files for linking emacsclient
+NTLIB = @NTLIB@
+CLIENTRES = @CLIENTRES@
+WINDRES = @WINDRES@
+
 ## Some systems define this to request special libraries.
 LIBS_SYSTEM = @LIBS_SYSTEM@
 
@@ -244,20 +256,21 @@ install: $(DESTDIR)${archlibdir}
        @echo "Installing utilities for users to run."
        umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
        for file in ${INSTALLABLES} ; do \
-         $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
+         $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
        done
        for file in ${INSTALLABLE_SCRIPTS} ; do \
          $(INSTALL_SCRIPT) ${srcdir}/$${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'`  ; \
        done
 
 uninstall:
-       (cd $(DESTDIR)${bindir}; \
-       for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}; do \
+       for file in ${INSTALLABLES}; do \
+         rm -f $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
+       done
+       for file in ${INSTALLABLE_SCRIPTS}; do \
          rm -f $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
-       done)
+       done
        if [ -d $(DESTDIR)${archlibdir} ]; then \
-         (cd $(DESTDIR)${archlibdir} && \
-          rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}) \
+         (cd $(DESTDIR)${archlibdir} && rm -f ${UTILITIES} ${SCRIPTS}) \
        fi
 
 mostlyclean:
@@ -289,7 +302,7 @@ TAGS: etags${EXEEXT}
 ## distribute Emacs.  If they were clobbered, all the .elc files were
 ## clobbered too.
 test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
-       $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
+       $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c
        ./test-distrib ${srcdir}/testfile
 
 ../lib/libgnu.a: $(config_h)
@@ -302,44 +315,58 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
 etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h)
        $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
          -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) -o etags
+         regex.o $(LOADLIBES) -o etags${EXEEXT}
 
 ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h)
        $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
-         ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse
+         ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse${EXEEXT}
 
 ## We depend on etags to assure that parallel makes do not write two
 ## etags.o files on top of each other.
 ctags${EXEEXT}: etags${EXEEXT}
        $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
          -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) -o ctags
+         regex.o $(LOADLIBES) -o ctags${EXEEXT}
 
 profile${EXEEXT}: ${srcdir}/profile.c $(config_h)
        $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
-         $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile
+         $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT}
 
 make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h)
        $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \
-         -o make-docfile
+         -o make-docfile${EXEEXT}
 
-movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h)
+movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
        $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \
-         $(LOADLIBES) $(LIBS_MOVE) -o movemail
+         $(NTLIB) $(LIB_WSOCK32) $(LOADLIBES) $(LIBS_MOVE) \
+         -o movemail${EXEEXT}
 
 pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h)
        $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
 
-emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h)
+emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
        $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
-          -DVERSION="\"${version}\"" \
-          $(LOADLIBES) -o emacsclient
+          -DVERSION="\"${version}\"" $(LIB_WSOCK32) \
+          $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient${EXEEXT}
+
+emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
+       $(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \
+          -DVERSION="\"${version}\"" $(LIB_WSOCK32) \
+          $(LOADLIBES) -lcomctl32 $(LIB_FDATASYNC) -o emacsclientw${EXEEXT}
+
+ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h
+       $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c
 
 hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h)
-       $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
+       $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT}
 
-update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h)
+update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
        $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
-         ${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score
+         ${srcdir}/update-game-score.c $(NTLIB) $(LOADLIBES) \
+         -o update-game-score${EXEEXT}
+
+emacsclient.res: ${srcdir}/../nt/emacsclient.rc
+       $(WINDRES) -O coff --include-dir=${srcdir}/../nt -o emacsclient.res \
+         ${srcdir}/../nt/emacsclient.rc
 
 ## Makefile ends here.