summaryrefslogtreecommitdiffhomepage
path: root/auto/make
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2018-08-06 17:27:33 +0300
committerMax Romanov <max.romanov@nginx.com>2018-08-06 17:27:33 +0300
commit1bb22d1e922c87d3c86c67bdce626767ee48fb5c (patch)
tree6e067a82b309c3a0d0f592f037f26d886a7f8c13 /auto/make
parentb6ce2da65c9c5229d744b2d964623b2d0f731ee9 (diff)
downloadunit-1bb22d1e922c87d3c86c67bdce626767ee48fb5c.tar.gz
unit-1bb22d1e922c87d3c86c67bdce626767ee48fb5c.tar.bz2
Unit application library.
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
Diffstat (limited to 'auto/make')
-rw-r--r--auto/make29
1 files changed, 27 insertions, 2 deletions
diff --git a/auto/make b/auto/make
index 9af63c97..121d575b 100644
--- a/auto/make
+++ b/auto/make
@@ -54,6 +54,18 @@ done
$echo >> $NXT_MAKEFILE
+$echo "NXT_LIB_UNIT_OBJS = \\" >> $NXT_MAKEFILE
+$echo " $NXT_BUILD_DIR/src/nxt_lvlhsh.o \\" >> $NXT_MAKEFILE
+$echo " $NXT_BUILD_DIR/src/nxt_murmur_hash.o \\" >> $NXT_MAKEFILE
+
+for nxt_src in $NXT_LIB_UNIT_SRCS
+do
+ nxt_obj=${nxt_src%.c}.o
+ $echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE
+done
+
+$echo >> $NXT_MAKEFILE
+
# Shared and static library.
@@ -70,12 +82,17 @@ $NXT_BUILD_DIR/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS)
$NXT_STATIC_LINK $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
\$(NXT_LIB_OBJS)
+$NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS)
+ $NXT_STATIC_LINK $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
+ \$(NXT_LIB_UNIT_OBJS)
+
END
# Object files.
-for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS
+for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS $NXT_LIB_UNIT_SRCS \
+ src/test/nxt_unit_app_test.c
do
nxt_obj=${nxt_src%.c}.o
nxt_dep=${nxt_src%.c}.dep
@@ -129,6 +146,13 @@ $NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS
+$NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
+ \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_app_test \\
+ \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
+
END
@@ -241,7 +265,8 @@ cat << END > Makefile
include $NXT_MAKEFILE
.PHONY: tests
-tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test
+tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\
+ $NXT_BUILD_DIR/unit_app_test
.PHONY: clean
clean: