Whamcloud - gitweb
689c2e11605cb5204ca44c1613273f2f62552afc
[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) 2014, Intel Corporation.
23 #
24
25 # Author:
26 #   Amir Shehata <amir.shehata@intel.com>
27 #
28
29 AM_CFLAGS  := -fPIC \
30               -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 \
31               -I$(top_builddir)/lnet/utils \
32               -I$(top_builddir)/lnet/utils/cyaml
33 AM_LDFLAGS := -L$(top_builddir)/libcfs/libcfs
34
35 lib_LIBRARIES = liblnetconfig.a
36 noinst_LIBRARIES = liblnetconfigtmp.a
37
38 CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c \
39          $(top_builddir)/lnet/utils/cyaml/cyaml.h
40 liblnetconfigtmp_a_SOURCES := liblnetconfig.c liblnetconfig.h $(CYAML)
41
42 # build static and share lib lnet config library
43 liblnetconfig.a : liblnetconfigtmp.a
44         rm -f liblnetconfig.a liblnetconfig.so
45         $(CC) $(LDFLAGS) $(AM_LDFLAGS) -shared -o liblnetconfig.so `$(AR) -t liblnetconfigtmp.a`
46         mv liblnetconfigtmp.a liblnetconfig.a
47
48 install-exec-hook:
49         cp liblnetconfig.so  $(DESTDIR)$(libdir)/
50
51 EXTRA_DIST =