Move autoconf expansion for EXE and gdoi up among the other macros.
Add $(EXE) suffix where needed.
diff --git a/Makefile.in b/Makefile.in
index 0b61949..f4b4c1e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,6 +42,13 @@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
+# EXE defines the suffix on executables - it's .exe for Windows, and
+# null on linux, bsd, and OS X and other OSes.
+EXE = @EXE@
+# gdoi is the group domain of interpretation for isakmp, a group key
+# management system which can provide keys for srtp
+gdoi = @GDOI_OBJS@
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
@@ -57,8 +64,8 @@
%.o: %.c
$(COMPILE) -c $< -o $@
-%: %.c libsrtp.a
- $(COMPILE) $(LDFLAGS) $< -o $@ $(LIBS) $(SRTPLIB)
+%$(EXE): %.c libsrtp.a
+ $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS)
# libcrypt.a (the crypto engine)
@@ -91,11 +98,6 @@
aesicmobj = $(aesicm) $(rng)
-# gdoi is the group domain of interpretation for isakmp, a group key
-# management system which can provide keys for srtp
-
-gdoi = @GDOI_OBJS@
-
# libsrtp.a (implements srtp processing)
srtpobj = srtp/srtp.o
@@ -123,12 +125,14 @@
# test applications
-testapp = test/cipher_driver test/datatypes_driver test/srtp_driver \
- test/replay_driver test/roc_driver test/rdbx_driver \
- test/stat_driver test/sha1_driver test/kernel_driver \
- test/aes_calc test/rand_gen test/rtpw
+testapp = test/cipher_driver$(EXE) test/datatypes_driver$(EXE) \
+ test/srtp_driver$(EXE) test/replay_driver$(EXE) \
+ test/roc_driver$(EXE) test/rdbx_driver$(EXE) \
+ test/stat_driver$(EXE) test/sha1_driver$(EXE) \
+ test/kernel_driver$(EXE) test/aes_calc$(EXE) test/rand_gen$(EXE) \
+ test/rtpw$(EXE)
-test/rtpw: test/rtpw.c test/rtp.c
+test/rtpw$(EXE): test/rtpw.c test/rtp.c
$(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB)
test: $(testapp)
@@ -176,12 +180,6 @@
libsrtpdoc:
$(MAKE) -C doc
-# EXE defines the suffix on executables - it's .exe for cygwin, and
-# null on linux, bsd, and OS X and other OSes. we define this so that
-# `make clean` will work on the cygwin platform
-
-EXE = @EXE@
-
.PHONY: clean superclean install
install: