Whamcloud - gitweb
LU-2456 lnet: DLC user space Configuration library
[fs/lustre-release.git] / lnet / utils / lnetconfig / Makefile.am
1 #
2 # LGPL HEADER START
3 #
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # This library is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 #
19 # LGPL HEADER END
20
21 #
22 # Copyright (c) 2013, Intel Corporation.
23 #
24
25 # Author:
26 #   Amir Shehata <amir.shehata@intel.com>
27 #
28
29 SUBDIRS =
30
31 AM_CFLAGS=$(LLCFLAGS)
32 AM_CPPFLAGS=$(LLCPPFLAGS) -I$(top_builddir)/lnet/utils \
33                           -I$(top_builddir)/lnet/utils/cyaml \
34                           -DLUSTRE_UTILS=1
35 AM_LDFLAGS := -L$(top_builddir)/libcfs/libcfs
36
37 lib_LIBRARIES = liblnetconfig.a
38 noinst_LIBRARIES = liblnetconfigtmp.a
39
40 CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c \
41          $(top_builddir)/lnet/utils/cyaml/cyaml.h
42 liblnetconfigtmp_a_SOURCES := liblnetconfig.c liblnetconfig.h $(CYAML)
43 liblnetconfigtmp_a_CPPFLAGS := $(AM_CPPFLAGS)
44
45 # build static and share lib lnet config library
46 liblnetconfig.a : liblnetconfigtmp.a
47         rm -f liblnetconfig.a liblnetconfig.so
48         $(CC) $(LDFLAGS) $(AM_LDFLAGS) -shared -o liblnetconfig.so `$(AR) -t liblnetconfigtmp.a`
49         mv liblnetconfigtmp.a liblnetconfig.a
50
51 install-exec-hook:
52         cp liblnetconfig.so  $(DESTDIR)$(libdir)/
53
54 EXTRA_DIST =