# ========================== 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
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@
## 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)
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 emacsclient${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 emacscient.res
## Makefile ends here.