Whamcloud - gitweb
- fixed typo in a comment.
[fs/lustre-release.git] / lnet / utils / Makefile.am
1 # Copyright (C) 2001  Cluster File Systems, Inc.
2 #
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
5
6 ## $(srcdir)/../ for <portals/*.h>, ../../ for generated <config.h>
7 #COMPILE = $(CC) -Wall -g -I$(srcdir)/../include -I../../include
8 #LINK = $(CC) -o $@
9
10 if LIBLUSTRE
11 noinst_LIBRARIES = libuptlctl.a
12 endif
13
14 libuptlctl_a_SOURCES = portals.c nidstrings.c debug.c l_ioctl.c
15 libuptlctl_a_CPPFLAGS = $(LLCPPFLAGS)
16 libuptlctl_a_CFLAGS = $(LLCFLAGS) -DLUSTRE_UTILS=1
17
18 sbin_PROGRAMS = debugctl
19
20 lib_LIBRARIES = libptlctl.a
21
22 if LIBLUSTRE
23 noinst_LIBRARIES += liblst.a
24 liblst_a_SOURCES =
25 endif
26
27 libptlctl_a_SOURCES = portals.c nidstrings.c debug.c l_ioctl.c parser.c parser.h
28
29 if UTILS
30 sbin_PROGRAMS += ptlctl routerstat wirecheck lst
31 if LIBLUSTRE
32 sbin_PROGRAMS += lstclient
33 endif
34
35 if BUILD_GMLND
36 sbin_PROGRAMS += gmlndnid
37 endif
38 endif
39
40 wirecheck_SOURCES = wirecheck.c
41
42 gmlndnid_SOURCES = gmlndnid.c
43 gmlndnid_CFLAGS = $(GMCPPFLAGS)
44 gmlndnid_LDFLAGS = -static
45 gmlndnid_LDADD = $(GMLIBS) -lgm
46
47 ptlctl_SOURCES = ptlctl.c
48 ptlctl_LDADD =  -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
49 ptlctl_DEPENDENCIES = libptlctl.a
50
51 routerstat_SOURCES = routerstat.c
52
53 debugctl_SOURCES = debugctl.c
54 debugctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
55 debugctl_DEPENDENCIES = libptlctl.a
56
57 lst_SOURCES = lst.c
58 lst_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
59 lst_DEPENDENCIES = libptlctl.a
60
61 LND_LIBS =
62 if BUILD_USOCKLND
63 LND_LIBS +=    $(top_builddir)/lnet/ulnds/socklnd/libsocklnd.a
64 endif
65 if BUILD_UPTLLND
66 LND_LIBS +=   $(top_builddir)/lnet/ulnds/ptllnd/libptllnd.a
67 endif
68
69 if LIBLUSTRE
70 LIB_SELFTEST = $(top_builddir)/lnet/libcfs/libcfs.a $(top_builddir)/lnet/lnet/liblnet.a $(top_builddir)/lnet/selftest/libselftest.a
71 liblst.a : $(LIB_SELFTEST) $(LND_LIBS)
72         sh $(srcdir)/genlib.sh "$(LIBS)" "$(LND_LIBS)" "$(PTHREAD_LIBS)"
73
74 lstclient_SOURCES = lstclient.c
75 lstclient_LDADD = -L. -lptlctl -llst $(LIBREADLINE) $(LIBEFENCE) $(PTHREAD_LIBS)
76 lstclient_DEPENDENCIES = libptlctl.a liblst.a
77 endif
78
79 nidstrings.c: @top_srcdir@/lnet/libcfs/nidstrings.c
80         ln -sf $< $@
81
82 EXTRA_DIST = genlib.sh