summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/Makefile.am
blob: 141a7108ae7c39b91dd12afd5513f64bf524980e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
sbin_PROGRAMS = glusterfsd
if WITH_SERVER
sbin_PROGRAMS += glusterfsd gf_attach
endif

glusterfsd_SOURCES = glusterfsd.c glusterfsd-mgmt.c
glusterfsd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
	$(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
	$(top_builddir)/rpc/xdr/src/libgfxdr.la ${GF_LDADD}
glusterfsd_LDFLAGS = $(GF_LDFLAGS) $(LIB_DL)

gf_attach_SOURCES = gf_attach.c
gf_attach_LDADD   = $(top_builddir)/libglusterfs/src/libglusterfs.la \
		    $(top_builddir)/api/src/libgfapi.la \
		    $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
		    $(top_builddir)/rpc/xdr/src/libgfxdr.la

noinst_HEADERS = glusterfsd.h glusterfsd-mem-types.h glusterfsd-messages.h

AM_CPPFLAGS = $(GF_CPPFLAGS) \
	-I$(top_srcdir)/libglusterfs/src -DDATADIR=\"$(localstatedir)\" \
	-DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_GLUSTERFS_CFLAGS) \
	-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
	-I$(top_srcdir)/rpc/rpc-lib/src \
	-I$(top_srcdir)/rpc/xdr/src \
	-I$(top_builddir)/rpc/xdr/src \
	-I$(top_srcdir)/xlators/nfs/server/src \
	-I$(top_srcdir)/xlators/protocol/server/src \
	-I$(top_srcdir)/api/src

AM_CFLAGS = -Wall $(GF_CFLAGS)

CLEANFILES =

$(top_builddir)/libglusterfs/src/libglusterfs.la:
	$(MAKE) -C $(top_builddir)/libglusterfs/src/ all

uninstall-local:
	rm -f $(DESTDIR)$(sbindir)/glusterfs
	rm -f $(DESTDIR)$(sbindir)/glusterd

install-data-local:
	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run/gluster
	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
	$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
	rm -f $(DESTDIR)$(sbindir)/glusterfs
	ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
if WITH_SERVER
	rm -f $(DESTDIR)$(sbindir)/glusterd
	ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterd
endif