This library will contain common functions and etc which may be used
by some of the binaries.

Signed-off-by: Stanislav Kholmanskikh <[email protected]>
---
 .../network/rpc/rpc-tirpc/tests_pack/Makefile      |   16 ++++++++++++
 .../network/rpc/rpc-tirpc/tests_pack/Makefile.inc  |   18 +++++++++++++-
 .../network/rpc/rpc-tirpc/tests_pack/lib/Makefile  |   25 ++++++++++++++++++++
 .../rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.c    |   17 +++++++++++++
 .../rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.h    |   17 +++++++++++++
 5 files changed, 92 insertions(+), 1 deletions(-)
 create mode 100644 testcases/network/rpc/rpc-tirpc/tests_pack/lib/Makefile
 create mode 100644 
testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.c
 create mode 100644 
testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.h

diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile 
b/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile
index 6703ebb..d16e1ca 100644
--- a/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile
@@ -19,5 +19,21 @@
 top_srcdir             ?= ../../../../..
 
 include        $(top_srcdir)/include/mk/env_pre.mk
+
+LIBDIR                 := lib
+FILTER_OUT_DIRS                := $(LIBDIR)
+LIB                    := $(LIBDIR)/librpc-tirpc.a
+
+$(LIBDIR):
+       mkdir -p "$@"
+
+$(LIB): $(LIBDIR)
+       $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
+
+trunk-clean:: | lib-clean
+
+lib-clean:: $(LIBDIR)
+       $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean
+
 include ./Makefile.inc
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile.inc 
b/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile.inc
index 8513677..636f0d1 100644
--- a/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile.inc
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/Makefile.inc
@@ -16,5 +16,21 @@
 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
-LDLIBS         += $(TIRPC_LIBS) -lpthread
+LIBRELDIR      := testcases/network/rpc/rpc-tirpc/tests_pack/lib
+LIBDIR         := $(abs_top_builddir)/$(LIBRELDIR)
+LIBSRCDIR      := $(abs_top_srcdir)/$(LIBRELDIR)
+LIBRPC-TIRPC   := $(LIBDIR)/librpc-tirpc.a
+
+$(LIBDDIR):
+       mkdir -p "$@"
+
+$(LIBRPC-TIRPC): $(LIBDIR)
+       $(MAKE) -C $^ -f "$(LIBSRCDIR)/Makefile" all
+
+MAKE_DEPS      += $(LIBRPC-TIRPC)
+
+LDLIBS         += $(TIRPC_LIBS) -lpthread -lrpc-tirpc
+LDFLAGS                += -L$(LIBDIR)
+
 CPPFLAGS       += $(TIRPC_CPPFLAGS)
+CPPFLAGS       += -I$(LIBSRCDIR)
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/lib/Makefile 
b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/Makefile
new file mode 100644
index 0000000..8afb3da
--- /dev/null
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/Makefile
@@ -0,0 +1,25 @@
+#
+#    Copyright (C) 2014, Oracle and/or its affiliates. All Rights Reserved.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+top_srcdir             ?= ../../../../../..
+
+include        $(top_srcdir)/include/mk/env_pre.mk
+
+LIB    := librpc-tirpc.a
+
+include $(top_srcdir)/include/mk/lib.mk
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.c 
b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.c
new file mode 100644
index 0000000..68abbd8
--- /dev/null
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.h 
b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.h
new file mode 100644
index 0000000..68abbd8
--- /dev/null
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
-- 
1.7.1


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to