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

📄 makefile

📁 sloedgy open sip stack source code
💻
📖 第 1 页 / 共 2 页
字号:
#***************License************************************************
#
# Copyright 2000-2002.  SpeechWorks International, Inc.  All rights reserved.
#
# Use of this software is subject to certain restrictions and limitations
# set forth in a license agreement entered into between SpeechWorks
# International Inc. and the licensee of this software.  Please refer 
# to the license agreement for license use rights and restrictions. 
#
# SpeechWorks is a registered trademark, and SpeechWorks Here,
# DialogModules and the SpeechWorks logo are trademarks of SpeechWorks
# International, Inc. in the United States and other countries.
# 
#**********************************************************************
#
# VXI, OpenSpeech Browser implementation of the VXI interface
# UNIX make file 
#
#
#**********************************************************************/

#--------------------------------
# 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

ifndef XERCESDIR
$(error The environment variable XERCESDIR is not defined)
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:\" \
	-DNO_SWIREC \
	-DHAVE_XERCES \
	-I"$(XERCESDIR)/include/xercesc" \
	-I"$(XERCESDIR)/include" \
	-L"$(XERCESDIR)/lib"	

#============================================================================
# Build sources
#============================================================================
PUBLIC_HEADERS = 

PUBLIC_ERROR_FILES = \
	VXIErrors.xml \
	VXIDiagnostics.xml \
	defaults.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 = VXI

# Define library sources
VXI_SRC = \
	SimpleLogger.cpp \
	DocumentModel.cpp \
	md5.c \
	DocumentStorage.cpp \
	DocumentConverter.cpp \
	DocumentParser.cpp \
	VXICacheStream.cpp \
	GrammarManager.cpp \
	PromptManager.cpp \
	PropertyList.cpp \
	Counters.cpp \
	Scripter.cpp \
	AnswerParser.cpp \
	VXI.cpp \
	VXI_api.c

# Define any linked libraries
VXI_LDLIBS = \
	-lVXIvalue$(CFG_SUFFIX) \
	-l$(PRODUCT_LIB_PREFIX)trd$(CFG_SUFFIX) \
	-lxerces-c
	
# Define version file
VXI_VER = VXI.ver

#-------------------------------------
# Programs
#-------------------------------------

PROGS = ValidateDoc

ValidateDoc_SRC = progs/ValidateDoc.cpp

ValidateDoc_LDLIBS = \
	-lVXI$(CFG_SUFFIX) \
	-lVXIvalue$(CFG_SUFFIX) \
	-l$(PRODUCT_LIB_PREFIX)log$(CFG_SUFFIX) \
	-l$(PRODUCT_LIB_PREFIX)inet$(CFG_SUFFIX)

#============================================================================
# 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))))

#-------------------------------------------------

⌨️ 快捷键说明

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