From ea75b3ff44c54ce1dfa0d733a985fa195e1aea4b Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 08 一月 2021 15:00:11 +0800
Subject: [PATCH] makefile

---
 test_net_socket/Makefile |  290 +++++----------------------------------------------------
 1 files changed, 27 insertions(+), 263 deletions(-)

diff --git a/test_net_socket/Makefile b/test_net_socket/Makefile
index 31bbec7..94734be 100644
--- a/test_net_socket/Makefile
+++ b/test_net_socket/Makefile
@@ -1,274 +1,38 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 3.5
 
-# Default target executed when no arguments are given to make.
-default_target: all
+ROOT := ..
+PLATFORM=$(shell $(ROOT)/systype.sh)
+include $(ROOT)/Make.defines.$(PLATFORM)
 
-.PHONY : default_target
+RPATH += -Wl,-rpath=$(ROOT)/lib:$(DEST)/lib
+# 寮�婧愬伐鍏峰寘璺緞
+LDDIR += -L$(DEST)/lib
 
-# Allow only one "make -f Makefile2" at a time, but pass parallelism.
-.NOTPARALLEL:
+#-lusgcommon
+# 寮�婧愬伐鍏峰寘
+LDLIBS += -lshm_queue -lpthread -lusgcommon
+
+#-I$(ROOT)/include/usgcommon
+INCLUDES += -I${ROOT}/src -I${ROOT}/src/shm -I${ROOT}/src/queue -I${ROOT}/src/socket  -I${ROOT}/include/usgcommon
+
+PROGS = ${DEST}/test_net_mod_socket ${DEST}/test_bus_stop ${DEST}/heart_beat
+
+DEPENDENCES = $(patsubst %, %.d, $(PROGS)) 
+
+#LIBCOMMON=${ROOT}/lib/libusgcommon.a
+
+build: $(PROGS)
+	cp -a net_mod_socket.sh ${DEST}
+	cp -a heart_beat.sh ${DEST}
 
 
-#=============================================================================
-# Special targets provided by cmake.
-
-# Disable implicit rules so canonical targets will work.
-.SUFFIXES:
-
-
-# Remove some rules from gmake that .SUFFIXES does not remove.
-SUFFIXES =
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-
-# A target that is always out of date.
-cmake_force:
-
-.PHONY : cmake_force
-
-#=============================================================================
-# Set environment variables for the build.
-
-# The shell in which to execute make rules.
-SHELL = /bin/sh
-
-# The CMake executable.
-CMAKE_COMMAND = /usr/bin/cmake
-
-# The command to remove a file.
-RM = /usr/bin/cmake -E remove -f
-
-# Escaping for special characters.
-EQUALS = =
-
-# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /home/wzq/wk/c_softbus
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/wzq/wk/c_softbus
-
-#=============================================================================
-# Targets provided globally by CMake.
-
-# Special rule for the target install
-install: preinstall
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
-	/usr/bin/cmake -P cmake_install.cmake
-.PHONY : install
-
-# Special rule for the target install
-install/fast: preinstall/fast
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
-	/usr/bin/cmake -P cmake_install.cmake
-.PHONY : install/fast
-
-# Special rule for the target list_install_components
-list_install_components:
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
-.PHONY : list_install_components
-
-# Special rule for the target list_install_components
-list_install_components/fast: list_install_components
-
-.PHONY : list_install_components/fast
-
-# Special rule for the target rebuild_cache
-rebuild_cache:
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
-	/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-.PHONY : rebuild_cache
-
-# Special rule for the target rebuild_cache
-rebuild_cache/fast: rebuild_cache
-
-.PHONY : rebuild_cache/fast
-
-# Special rule for the target edit_cache
-edit_cache:
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
-	/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
-.PHONY : edit_cache
-
-# Special rule for the target edit_cache
-edit_cache/fast: edit_cache
-
-.PHONY : edit_cache/fast
-
-# Special rule for the target install/strip
-install/strip: preinstall
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
-	/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-.PHONY : install/strip
-
-# Special rule for the target install/strip
-install/strip/fast: install/strip
-
-.PHONY : install/strip/fast
-
-# Special rule for the target install/local
-install/local: preinstall
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
-	/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
-.PHONY : install/local
-
-# Special rule for the target install/local
-install/local/fast: install/local
-
-.PHONY : install/local/fast
-
-# The main all target
-all: cmake_check_build_system
-	cd /home/wzq/wk/c_softbus && $(CMAKE_COMMAND) -E cmake_progress_start /home/wzq/wk/c_softbus/CMakeFiles /home/wzq/wk/c_softbus/test_net_socket/CMakeFiles/progress.marks
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/all
-	$(CMAKE_COMMAND) -E cmake_progress_start /home/wzq/wk/c_softbus/CMakeFiles 0
-.PHONY : all
-
-# The main clean target
 clean:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/clean
-.PHONY : clean
+	rm -f $(PROGS) $(DEPENDENCES) $(TEMPFILES)
 
-# The main clean target
-clean/fast: clean
+# $(LIBCOMMON):
+# 	@(cd $(ROOT)/common && $(MAKE))
 
-.PHONY : clean/fast
-
-# Prepare targets for installation.
-preinstall: all
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/preinstall
-.PHONY : preinstall
-
-# Prepare targets for installation.
-preinstall/fast:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/preinstall
-.PHONY : preinstall/fast
-
-# clear depends
-depend:
-	cd /home/wzq/wk/c_softbus && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-.PHONY : depend
-
-# Convenience name for target.
-test_net_socket/CMakeFiles/test_net_mod_socket.dir/rule:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/CMakeFiles/test_net_mod_socket.dir/rule
-.PHONY : test_net_socket/CMakeFiles/test_net_mod_socket.dir/rule
-
-# Convenience name for target.
-test_net_mod_socket: test_net_socket/CMakeFiles/test_net_mod_socket.dir/rule
-
-.PHONY : test_net_mod_socket
-
-# fast build rule for target.
-test_net_mod_socket/fast:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/test_net_mod_socket.dir/build.make test_net_socket/CMakeFiles/test_net_mod_socket.dir/build
-.PHONY : test_net_mod_socket/fast
-
-# Convenience name for target.
-test_net_socket/CMakeFiles/heart_beat.dir/rule:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f CMakeFiles/Makefile2 test_net_socket/CMakeFiles/heart_beat.dir/rule
-.PHONY : test_net_socket/CMakeFiles/heart_beat.dir/rule
-
-# Convenience name for target.
-heart_beat: test_net_socket/CMakeFiles/heart_beat.dir/rule
-
-.PHONY : heart_beat
-
-# fast build rule for target.
-heart_beat/fast:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/heart_beat.dir/build.make test_net_socket/CMakeFiles/heart_beat.dir/build
-.PHONY : heart_beat/fast
-
-heart_beat.o: heart_beat.cpp.o
-
-.PHONY : heart_beat.o
-
-# target to build an object file
-heart_beat.cpp.o:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/heart_beat.dir/build.make test_net_socket/CMakeFiles/heart_beat.dir/heart_beat.cpp.o
-.PHONY : heart_beat.cpp.o
-
-heart_beat.i: heart_beat.cpp.i
-
-.PHONY : heart_beat.i
-
-# target to preprocess a source file
-heart_beat.cpp.i:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/heart_beat.dir/build.make test_net_socket/CMakeFiles/heart_beat.dir/heart_beat.cpp.i
-.PHONY : heart_beat.cpp.i
-
-heart_beat.s: heart_beat.cpp.s
-
-.PHONY : heart_beat.s
-
-# target to generate assembly for a file
-heart_beat.cpp.s:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/heart_beat.dir/build.make test_net_socket/CMakeFiles/heart_beat.dir/heart_beat.cpp.s
-.PHONY : heart_beat.cpp.s
-
-test_net_mod_socket.o: test_net_mod_socket.cpp.o
-
-.PHONY : test_net_mod_socket.o
-
-# target to build an object file
-test_net_mod_socket.cpp.o:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/test_net_mod_socket.dir/build.make test_net_socket/CMakeFiles/test_net_mod_socket.dir/test_net_mod_socket.cpp.o
-.PHONY : test_net_mod_socket.cpp.o
-
-test_net_mod_socket.i: test_net_mod_socket.cpp.i
-
-.PHONY : test_net_mod_socket.i
-
-# target to preprocess a source file
-test_net_mod_socket.cpp.i:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/test_net_mod_socket.dir/build.make test_net_socket/CMakeFiles/test_net_mod_socket.dir/test_net_mod_socket.cpp.i
-.PHONY : test_net_mod_socket.cpp.i
-
-test_net_mod_socket.s: test_net_mod_socket.cpp.s
-
-.PHONY : test_net_mod_socket.s
-
-# target to generate assembly for a file
-test_net_mod_socket.cpp.s:
-	cd /home/wzq/wk/c_softbus && $(MAKE) -f test_net_socket/CMakeFiles/test_net_mod_socket.dir/build.make test_net_socket/CMakeFiles/test_net_mod_socket.dir/test_net_mod_socket.cpp.s
-.PHONY : test_net_mod_socket.cpp.s
-
-# Help Target
-help:
-	@echo "The following are some of the valid targets for this Makefile:"
-	@echo "... all (the default if no target is provided)"
-	@echo "... clean"
-	@echo "... depend"
-	@echo "... install"
-	@echo "... list_install_components"
-	@echo "... rebuild_cache"
-	@echo "... edit_cache"
-	@echo "... test_net_mod_socket"
-	@echo "... heart_beat"
-	@echo "... install/strip"
-	@echo "... install/local"
-	@echo "... heart_beat.o"
-	@echo "... heart_beat.i"
-	@echo "... heart_beat.s"
-	@echo "... test_net_mod_socket.o"
-	@echo "... test_net_mod_socket.i"
-	@echo "... test_net_mod_socket.s"
-.PHONY : help
+-include $(DEPENDENCES)
+include $(ROOT)/Make.common.inc
 
 
-
-#=============================================================================
-# Special targets to cleanup operation of make.
-
-# Special rule to run CMake to check the build system integrity.
-# No rule that depends on this can have commands that come from listfiles
-# because they might be regenerated.
-cmake_check_build_system:
-	cd /home/wzq/wk/c_softbus && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-.PHONY : cmake_check_build_system
 

--
Gitblit v1.8.0