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

📄 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.
# 
#**********************************************************************
#
# SBjsi, OpenSpeech Browser implementation of the VXIjsi 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 SPIDERMONKEYDIR
$(error The environment variable SPIDERMONKEYDIR 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)

SPIDERMONKEY_CFLAGS = \
	-DHAVE_SPIDERMONKEY \
	-DXP_UNIX \
	-DJSI_MUST_DECLARE_VARS \
	-I"$(SPIDERMONKEYDIR)/src" \
	-I"$(SPIDERMONKEYDIR)"

ifeq ("$(CFG)","debug")
SPIDERMONKEYLIB = \
	-L"$(SPIDERMONKEYDIR)/src/Linux_All_DBG.OBJ" \
	-ljs
SPIDERMONKEY_CFLAGS += \
	-I"$(SPIDERMONKEYDIR)/src/Linux_All_DBG.OBJ"
else
SPIDERMONKEYLIB = \
	-L"$(SPIDERMONKEYDIR)/src/Linux_All_OPT.OBJ" \
	-ljs
SPIDERMONKEY_CFLAGS += \
	-I"$(SPIDERMONKEYDIR)/src/Linux_All_OPT.OBJ"
endif	

PROJ_CFLAGS = \
	-DCOMPANY_DOMAIN=L\"com.speechworks\" \
	-DMODULE_PREFIX=L\"swi:\" \
	$(SPIDERMONKEY_CFLAGS)

#============================================================================
# Build sources
#============================================================================
PUBLIC_HEADERS = \
	OSBjsi.h \
	SBjsi.h

PUBLIC_ERROR_FILES = \
	SBjsiDiagnostics.xml \
	SBjsiErrors.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)jsi

# Define library sources
$(PRODUCT_LIB_PREFIX)jsi_SRC = \
	SBjsi.cpp \
	SBjsiFuncs.cpp \
	JsiRuntime.cpp \
	JsiContext.cpp \
	SBjsiLogger.cpp

# Define any linked libraries
$(PRODUCT_LIB_PREFIX)jsi_LDLIBS = \
	-lVXIvalue$(CFG_SUFFIX) \
	-l$(PRODUCT_LIB_PREFIX)trd$(CFG_SUFFIX) \
	$(SPIDERMONKEYLIB)

# Define version file
$(PRODUCT_LIB_PREFIX)jsi_VER = SBjsi.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))) \

⌨️ 快捷键说明

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