chiark / gitweb /
test: udp-preload: Build system
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Oct 2019 20:50:34 +0000 (21:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Oct 2019 22:29:26 +0000 (23:29 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
configure
configure.in
test/Makefile.in [new file with mode: 0644]

index 3fbf47f..c503467 100644 (file)
@@ -13,7 +13,7 @@ conffile.yy.[ch]
 /config.h
 /config.status
 /stamp-h
-/Makefile
+Makefile
 /common.make
 
 msgcode-test
index dbfe51d..2519136 100755 (executable)
--- a/configure
+++ b/configure
@@ -4735,7 +4735,7 @@ else
 $as_echo "$as_me: WARNING: Disabling IPv6 support" >&2;}
 fi
 
-ac_config_files="$ac_config_files Makefile common.make"
+ac_config_files="$ac_config_files Makefile common.make test/Makefile"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -5437,6 +5437,7 @@ do
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "common.make") CONFIG_FILES="$CONFIG_FILES common.make" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
index 2239976..b021d57 100644 (file)
@@ -96,7 +96,7 @@ else
     AC_MSG_WARN([Disabling IPv6 support])
 fi
 
-AC_OUTPUT(Makefile common.make, echo timestamp >stamp-h)
+AC_OUTPUT(Makefile common.make test/Makefile, echo timestamp >stamp-h)
 
 AH_TOP([
 #ifndef _CONFIG_H
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644 (file)
index 0000000..a318dec
--- /dev/null
@@ -0,0 +1,11 @@
+
+CC:=@CC@
+
+TARGETS=udp-preload.so
+
+all: $(TARGETS)
+
+CFLAGS += -D_REENTRANT -fPIC
+
+udp-preload.so: udp-preload.o
+       ld -g -shared -soname $@.1 $^ -o $@ -ldl -lc