You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by wa...@apache.org on 2015/10/16 15:11:56 UTC

incubator-hawq git commit: HAWQ-63. Build and install gpnetbenchServer and gpnetbenchClient

Repository: incubator-hawq
Updated Branches:
  refs/heads/master a413a4265 -> 285a8f466


HAWQ-63. Build and install gpnetbenchServer and gpnetbenchClient


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/285a8f46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/285a8f46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/285a8f46

Branch: refs/heads/master
Commit: 285a8f466f6f0140d51dbe81d2d43cfc3cb0fcc3
Parents: a413a42
Author: Zhanwei Wang <wa...@apache.org>
Authored: Fri Oct 16 10:48:48 2015 +0800
Committer: Zhanwei Wang <wa...@apache.org>
Committed: Fri Oct 16 10:48:48 2015 +0800

----------------------------------------------------------------------
 tools/Makefile            |  5 +++++
 tools/gpnetbench/Makefile | 28 +++++++++++++---------------
 2 files changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/285a8f46/tools/Makefile
----------------------------------------------------------------------
diff --git a/tools/Makefile b/tools/Makefile
index 277da1f..8eb25f9 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -8,14 +8,19 @@ subdir = tools
 top_builddir = ..
 include $(top_builddir)/src/Makefile.global
 
+all:
+	${MAKE} -C gpnetbench $@
+
 install :
 	${MAKE} -C bin $@
 	${MAKE} -C sbin $@
 	${MAKE} -C doc $@
 	${MAKE} set_scripts_version
+	${MAKE} -C gpnetbench $@
 
 clean distclean:
 	${MAKE} -C bin $@
+	${MAKE} -C gpnetbench $@
 
 #---------------------------------------------------------------------
 # Set Version

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/285a8f46/tools/gpnetbench/Makefile
----------------------------------------------------------------------
diff --git a/tools/gpnetbench/Makefile b/tools/gpnetbench/Makefile
index 28446ec..79108e3 100644
--- a/tools/gpnetbench/Makefile
+++ b/tools/gpnetbench/Makefile
@@ -4,30 +4,26 @@ default: all
 
 this_makefile := $(abspath $(lastword $(MAKEFILE_LIST)))
 BLD_TOP := $(dir $(this_makefile))/../../
-include $(BLD_TOP)/build-utils/pivotal/Makefile.global
-include $(BLD_TOP)/build-utils/pivotal/Makefile.thirdparty
 
-EXT_DIR=$(BLD_TOP)/ext/$(BLD_ARCH)/
-
-CC=$(strip $(BLD_CC))
+subdir=tools/gpnetbench
+top_builddir=../../
+include $(BLD_TOP)/src/Makefile.global
 
 SERVER_OBJS=gpnetbenchServer.o
 CLIENT_OBJS=gpnetbenchClient.o
 
-CFLAGS=-Wall -g -O2
-
-ifeq (sol,$(findstring sol,$(BLD_ARCH)))
-	GPNETBENCH_LIBS+=-lsocket -lnsl
-endif
-
 all: gpnetbenchServer gpnetbenchClient
-	echo "hehe"
+	@echo "finish building gpnetbenchServer and gpnetbenchClient"
 
 gpnetbenchServer: $(SERVER_OBJS)
-	$(CC) -o gpnetbenchServer $(SERVER_OBJS) $(GPNETBENCH_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o gpnetbenchServer $(SERVER_OBJS)
 
 gpnetbenchClient: $(CLIENT_OBJS)
-	$(CC) -o gpnetbenchClient $(CLIENT_OBJS) $(GPNETBENCH_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o gpnetbenchClient $(CLIENT_OBJS)
+
+install: all
+	$(INSTALL_PROGRAM) gpnetbenchServer $(bindir)/lib
+	$(INSTALL_PROGRAM) gpnetbenchClient $(bindir)/lib
 
 %.o: %.c
 	$(CC) $(CFLAGS) -o $@ -c $<
@@ -35,4 +31,6 @@ gpnetbenchClient: $(CLIENT_OBJS)
 clean:
 	rm -rf *.o gpnetbenchServer gpnetbenchClient
 
-.PHONY: default all clean
\ No newline at end of file
+distclean: clean
+
+.PHONY: default all clean distclean