diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-30 14:52:04 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-30 19:31:50 +0530 |
commit | ff74a2144e02af11373375f8d40e9b312a0dd0c6 (patch) | |
tree | afc7d16d2d5fc1e2a562467dd619beb65712c5dc /Makefile | |
parent | 46e546b65a717fcf9a17d905152e861d05a4a9be (diff) |
gluster-block: walk through the cleanups
better naming of variables and functions,
variable initialization, also fix few leaks
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -10,13 +10,16 @@ # # ######################################################################## + CC = gcc +COMMON = utils.o common.o rpc/block_xdr.o + CLIENT = gluster-block -CDEP = glfs-operations.o utils.o common.o rpc/block_clnt.c rpc/block_xdr.c gluster-block.o +CDEP = rpc/block_clnt.o gluster-block.o SERVER = gluster-blockd -SDEP = rpc/block_svc.o rpc/block_clnt.c rpc/block_xdr.o gluster-blockd.o utils.o common.o glfs-operations.o +SDEP = glfs-operations.o rpc/block_svc.o rpc/block_clnt.o gluster-blockd.o CFLAGS = -g -ggdb -Wall -lpthread LIBS := $(shell pkg-config --libs uuid glusterfs-api) @@ -28,16 +31,16 @@ MKDIR_P = mkdir -p INSTALL = /usr/bin/install -c INSTALLDATA = /usr/bin/install -c -m 644 SYSTEMD_DIR = /usr/lib/systemd/system -LOGDIR = /var/log/ +LOGDIR = /var/log/gluster-block -all: $(CLIENT) $(SERVER) +all: $(SERVER) $(CLIENT) -$(CLIENT): $(CDEP) +$(CLIENT): $(CDEP) $(COMMON) @$(MKDIR_P) $(LOGDIR)$@ $(CC) $(CFLAGS) $(LIBS) $^ -o $@ -$(SERVER): $(SDEP) +$(SERVER): $(SDEP) $(COMMON) $(CC) $(CFLAGS) $(LIBS) $^ -o $@ glfs-operations.o: glfs-operations.c glfs-operations.h @@ -51,7 +54,7 @@ glfs-operations.o: glfs-operations.c glfs-operations.h $(CLIENT).o: $(CLIENT).c $(CC) $(CFLAGS) -c $< -o $@ -install: $(CLIENT) $(SERVER) +install: $(SERVER) $(CLIENT) $(INSTALL) $^ $(PREFIX)/ @if [ -d $(SYSTEMD_DIR) ]; then \ $(MKDIR_P) $(SYSTEMD_DIR); \ |