summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-28 21:31:01 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-28 21:31:01 +0000
commit3ff46930b57dd9be5832acb8e03832ea3773d163 (patch)
tree47722583612724a8c0c29615b7d080925ea7aa18 /src
parentdeactivated option for ld_kdr (diff)
reenabled ld-kdr
cleaning up Makefile
Diffstat (limited to 'src')
-rw-r--r--src/Makefile24
-rwxr-xr-xsrc/configure10
-rw-r--r--src/options.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/src/Makefile b/src/Makefile
index ef90eeb..5488bfe 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -34,12 +34,11 @@
include include.mk
-DEPENDFILE = .depend
-EXECUTABLE = uanytun
+EXECUTABLE := uanytun
-CRYPT_OBJ = key_derivation.o \
+CRYPT_OBJ := key_derivation.o \
auth_algo.o
-OBJ = log.o \
+OBJ := log.o \
signal.o \
options.o \
tun.o \
@@ -55,16 +54,17 @@ ifndef NO_CRYPT_OBJ
OBJ += $(CRYPT_OBJ)
endif
-SRC = $(OBJ:%.o=%.c)
+SRC := $(OBJ:%.o=%.c)
-.PHONY: dep distclean clean
+all: $(EXECUTABLE)
-all: dep $(EXECUTABLE)
+%.d: %.c
+ @set -e; rm -f $@; \
+ $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$; echo '(re)building $@'
-dep: $(SRC)
- $(CC) -MM $(SRC) > $(DEPENDFILE)
-
--include $(DEPENDFILE)
+-include $(SRC:%.c=%.d)
uanytun: $(OBJ)
$(LD) $(OBJ) -o $@ $(LDFLAGS)
@@ -81,5 +81,5 @@ distclean: clean
clean:
rm -f *.o
- rm -f $(DEPENDFILE)
+ rm -f *.d
rm -f $(EXECUTABLE)
diff --git a/src/configure b/src/configure
index d105f87..c54d555 100755
--- a/src/configure
+++ b/src/configure
@@ -141,11 +141,11 @@ if [ $V4_MAPPED -eq 0 ]; then
fi
cat >> include.mk <<EOF
-TARGET = $TARGET
-CC = gcc
-CFLAGS = $CFLAGS
-LD = gcc
-LDFLAGS = $LDFLAGS
+TARGET := $TARGET
+CC := gcc
+CFLAGS := $CFLAGS
+LD := gcc
+LDFLAGS := $LDFLAGS
EOF
exit 0
diff --git a/src/options.c b/src/options.c
index db7d4e1..9931c51 100644
--- a/src/options.c
+++ b/src/options.c
@@ -197,7 +197,7 @@ int options_parse(options_t* opt, int argc, char* argv[])
PARSE_INT_PARAM("-w","--window-size", opt->seq_window_size_)
#ifndef NO_CRYPT
PARSE_STRING_PARAM("-k","--kd-prf", opt->kd_prf_)
-// PARSE_INT_PARAM("-l","--ld-kdr", opt->ld_kdr_)
+ PARSE_INT_PARAM("-l","--ld-kdr", opt->ld_kdr_)
#ifndef NO_PASSPHRASE
PARSE_STRING_PARAM_SEC("-E","--passphrase", opt->passphrase_)
#endif
@@ -337,7 +337,7 @@ void options_print_usage()
printf(" [-w|--window-size] <window size> seqence number window size\n");
#ifndef NO_CRYPT
printf(" [-k|--kd-prf] <kd-prf type> key derivation pseudo random function\n");
-// printf(" [-l|--ld-kdr] <ld-kdr> log2 of key derivation rate\n");
+ printf(" [-l|--ld-kdr] <ld-kdr> log2 of key derivation rate\n");
#ifndef NO_PASSPHRASE
printf(" [-E|--passphrase] <pass phrase> a passprhase to generate master key and salt from\n");
#endif