1#
2# Copyright (c) International Business Machines  Corp., 2007
3#
4# This program is free software;  you can redistribute it and#or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12# for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program;  if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17#
18
19top_srcdir		?= ../../..
20
21include $(top_srcdir)/include/mk/env_pre.mk
22
23LIBDIR			:= libclone
24
25FILTER_OUT_DIRS		:= $(LIBDIR)
26
27LIB			:= $(LIBDIR)/libclone.a
28
29LDLIBS			:= -ldl -lltp
30
31INSTALL_TARGETS		:= *.sh
32
33$(LIBDIR):
34	mkdir -p "$@"
35
36# Make the target the real lib so we don't have to deal with rebuilding this
37# every time the dependency is evaluated, like with PHONY rules.
38$(LIB): $(LIBDIR)
39	$(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" all
40
41MAKE_DEPS		:= $(LIB)
42
43trunk-clean:: | lib-clean
44
45lib-clean:: $(LIBDIR)
46	$(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" clean
47
48include $(top_srcdir)/include/mk/generic_trunk_target.mk
49