⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 sloedgy open sip stack source code
💻
📖 第 1 页 / 共 2 页
字号:
#
 #/****************License************************************************
 # *
 # * Copyright 2000-2003.  ScanSoft, Inc.    
 # *
 # * Use of this software is subject to notices and obligations set forth 
 # * in the SpeechWorks Public License - Software Version 1.2 which is 
 # * included with this software. 
 # *
 # * ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech, 
 # * SpeechWorks and the SpeechWorks logo are registered trademarks or 
 # * trademarks of SpeechWorks International, Inc. in the United States 
 # * and other countries.
 # *
 # ***********************************************************************/
 #

 #--------------------------------
 # Required Environment Variables
 #--------------------------------
 SHELL = /bin/sh
 
 PRODUCT_LIB_PREFIX=SB
 
 ifndef SWISBSDK
 $(error The environment variable SWISBSDK is not defined (it should point to your baseline directory))
 endif
 
 #--------------------
 # Platform macros
 #--------------------
 PROJ_ROOT = ..
 
 CPU = i386
 OS = linux
 PLATFORM = $(CPU)-$(OS)
 
 MAKE_CPU = $(CPU)
 MAKE_OS = $(OS)
 
 PERL = $(shell which perl)
 MAKEFILE = Makefile
 
 CC = gcc
 CXX = g++
 
 #-----------------------------------------
 # Set up macros for different config's
 #-----------------------------------------
 ifndef CFG
 CFG = debug
 endif
 
 ifeq ("$(CFG)","debug")
 CFG_SUFFIX = D
 CFLAGS_CFG = $(CFLAGS_DEBUG)
 else
 ifeq ("$(CFG)","release")
 CFG_SUFFIX =
 CFLAGS_CFG = $(CFLAGS_RELEASE)
 else
 $(error CFG is not a legal type - should be debug or release)
 endif
 endif
 
 #---------------------
 # Directories
 #---------------------
 PWD := $(shell pwd)
 BUILD_ROOT := build
 BUILD_ROOT_PLT = $(BUILD_ROOT)/$(PLATFORM)
 BUILDDIR = $(BUILD_ROOT_PLT)/$(CFG)
 PLATFORMDIR = $(PROJ_ROOT)/$(PLATFORM)
 SRCPATH = $(PLATFORMDIR)/src
 
 #
 # SWISBSDK Install Directories
 #
 bindir = $(SWISBSDK)/bin
 libdir = $(SWISBSDK)/lib
 incdir = $(SWISBSDK)/include
 
 #
 # Build Area directories
 #
 buildbindir = $(BUILDDIR)/bin
 buildlibdir = $(BUILDDIR)/lib
 
 #------------------------
 # C/C++ compiler flags
 #------------------------
 CC = gcc
 CXX = g++
 
 CFLAGS_GENERAL = -D_$(CPU)_ \
 	         -D_$(OS)_ \
 	         -I$(PROJ_ROOT)/$(PLATFORM)/include \
 	         -I$(PROJ_ROOT)/include \
 	         -I$(SWISBSDK)/include \
 	         -I./include \
 	         -I./ \
 	         -D_SIMPLE_R \
 	         -D_REENTRANT \
 	         -D_GNU_SOURCE \
 	         -D__THREADED
 
 ANSIFLAGS = -pedantic \
 	    -Wall \
 	    -Wcast-qual \
 	    -Wcast-align \
 	    -Wmissing-prototypes \
 	    -Wstrict-prototypes \
 	    -Wtraditional
 
 C_ANSIFLAGS = $(ANSIFLAGS) \
 	      -Wid-clash-31
 
 CXX_ANSIFLAGS = $(ANSIFLAGS)
 
 ifdef STRICT
 CFLAGS_GENERAL += $(ANSIFLAGS)
 endif
 
 # -g     debug symbols
 # -O0 	 No Optimization for debug
 # -fPIC  Generate Position Independant code
 CFLAGS_DEBUG = -g -O0 -fPIC
 
 # -s     strip symbols
 # -O2    Optimize for release
 # -fPIC  Generate Position Independant code
 CFLAGS_RELEASE = -DNDEBUG -s -O2 -fPIC
 
 #----------------------------------------
 # Link Flags
 #----------------------------------------
 LDFLAGS += -L$(buildlibdir) $(PROJ_LDFLAGS) $($(TARGET)_LDFLAGS) $(LDFLAGS_$(OS)) -L$(SWISBSDK)/lib
 LDFLAGS_SHARED = -shared
 LDLIBS += $($(TARGET)_LDLIBS)
 ifdef STATIC
 LDLIBS += $($(TARGET)_LDLIBS_STATIC)
 endif
 
 LDLIBS += -lstdc++ -lpthread -ldl
 LDFLAGS += -Wl,-rpath-link=$(SWISBSDK)/lib:$(PROJ_RPATH_LINK)
 
 #--------------------------------
 # General Programs
 #--------------------------------
 CHMOD = chmod
 CHMODFLAGS = go-w,a-x
 CHMODFLAGSX = go-w,a+x
 INSTALL = cp -p
 INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL)
 MKDIRS = ../VXIinterfaces/mkinstalldirs
 RMDIR = rmdir
 RMCLEAN = rm -rf
 
 #-------------------------------------------
 # Final Values
 #-------------------------------------------
 CFLAGS = $(CFLAGS_CFG) $(CFLAGS_GENERAL) $(MYCFLAGS)
 CXXFLAGS = $(CFLAGS_CFG) $(CFLAGS_GENERAL) $(MYCFLAGS)
 CPPFLAGS = $(PROJ_CFLAGS) $(CFLAGS_$(OS)) $($(TARGET)_CFLAGS)
 
 PROJ_CFLAGS = \
 	-DCOMPANY_DOMAIN=L\"com.speechworks\" \
 	-DMODULE_PREFIX=L\"swi:\"
 
 #============================================================================
 # Build sources
 #============================================================================
 PUBLIC_HEADERS = \
 	SBinet.h \
 	OSBinet.h
 
 PUBLIC_ERROR_FILES = \
 	SBinetErrors.xml \
 	SBinetDiagnostics.xml
 
 # Mask the exports of shared objects by explicitly listing public functions
 EXPLICIT_VER_FILES = 1
  
 # Set defaults for the library version and product name burnt into
 # shared libraries
 LIBVER = 3
 
 # Define libaries to be build
 LIBS = $(PRODUCT_LIB_PREFIX)inet
 
 # Define library sources
 $(PRODUCT_LIB_PREFIX)inet_SRC = \
 	HttpUtils.cpp \
 	SBinet.cpp \
 	SBinetChannel.cpp\
 	SBinetCookie.cpp \
 	SBinetFileStream.cpp \
 	SBinetHttpCacheStream.cpp \
 	SBinetHttpConnection.cpp \
 	SBinetHttpStream.cpp \
 	SBinetProxyMatcher.cpp \
 	SBinetSSLsocket.cpp \
 	SBinetStoppable.cpp \
 	SBinetStream.cpp \
 	SBinetTimedStream.cpp \
 	SBinetURL.cpp \
 	SBinetUtils.cpp \
 	SBinetValidator.cpp \
 	SWIHashMap.cpp \
 	SWIList.cpp \
 	SWIipAddress.cpp \
 	SWIsocket.cpp \
 	SWIinputStream.cpp \
 	SWIoutputStream.cpp \
 	SWIdataOutputStream.cpp \
 	SWIbufferedInputStream.cpp \
 	SWIbufferedOutputStream.cpp \
 	SWIfilterInputStream.cpp \
 	SWIfilterOutputStream.cpp \
 	SWITimeWatch.cpp \
 	SWITimeStamp.cpp \
 	SWIutilLogger.cpp \
 	util_date.c
 
 # Define any linked libraries
 $(PRODUCT_LIB_PREFIX)inet_LDLIBS = \
 	-lVXIvalue$(CFG_SUFFIX) \
 	-l$(PRODUCT_LIB_PREFIX)trd$(CFG_SUFFIX) \
 	-lcrypto -lssl
 
 # Define version file
 $(PRODUCT_LIB_PREFIX)inet_VER = SBinet.ver
 
 #============================================================================
 # Build Rules
 #============================================================================
 all_SRC := $(sort $(foreach target, $(PROGS) $(STATIC_LIBS) $(LIBS), $($(target)_SRC)))
 
 progsubdirs := $(sort ./ $(foreach target, $(PROGS), $(dir $($(target)_SRC))))
 libsubdirs := $(sort ./ $(foreach target, $(STATIC_LIBS) $(LIBS), $(dir $($(target)_SRC))))
 
 #-------------------------------------------------
 # Header file and Include Directories
 #-------------------------------------------------
 vpath lib%.a $(patsubst -L%, %, $(filter -L%, $(LDFLAGS))) \
 	      $(subst :, , $(LD_LIBRARY_PATH)) $(STD_LIBRARY_PATH)
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -