📄 makefile
字号:
# Removed tiny files, as now have pragma in the common files.
#
# Revision 1.22 1998/01/04 09:41:20 robertj
# Changed perasn.cxx to asner.cxx
#
# Revision 1.21 1998/01/04 08:29:37 craigs
# Changed for Linux
#
# Revision 1.20 1997/04/22 11:00:01 craigs
# Added SSL and DLL functions
#
# Revision 1.19 1996/11/17 08:35:50 craigs
# Fixed distsrc target
#
# Revision 1.18 1996/11/17 02:35:12 craigs
# Removed SSL from list of build targets
#
# Revision 1.16 1996/10/31 10:30:03 craigs
# Lots of changes
#
# Revision 1.15 1996/09/21 05:41:41 craigs
# Added new common files
#
# Revision 1.14 1996/08/03 12:05:10 craigs
# *** empty log message ***
#
# Revision 1.13 1996/07/03 06:32:18 craigs
# Removed spurious lines causing warnings during library make
#
# Revision 1.12 1996/06/29 11:37:28 craigs
# Added unix system type to object directories
# Added support for Linux shared libraries
#
# Revision 1.11 1996/06/19 01:56:26 craigs
# Added uhttpsvc to the list
#
# Revision 1.10 1996/06/14 09:30:43 craigs
# Included buildinc stuff
#
# Revision 1.9 1996/05/10 11:03:22 craigs
# Fixed distsrc rule to only include ptlib stuff
#
# Revision 1.8 1996/05/03 13:48:58 craigs
# Sun4 fixes
#
# Revision 1.7 1996/05/02 10:53:24 craigs
# Fixed problem with SUN4 target
#
# Revision 1.6 1996/04/17 11:12:20 craigs
# Latest version pre mibmaster release 1.0
#
# Revision 1.5 1996/04/15 10:50:13 craigs
# Last revision prior to release of MibMaster
#
# Revision 1.4 1996/01/26 11:09:04 craigs
# *** empty log message ***
#
# Revision 1.3 1995/12/08 13:18:13 craigs
# Lots of changes
#
# Revision 1.2 1995/07/09 00:35:42 craigs
# Latest and greatest omnibus change
#
# Revision 1.1 1995/01/16 20:50:44 craigs
# Initial revision
#
# Revision 1.1 1993/07/12 21:22:16 craigs
# Initial revision
#
#
ifndef PWLIBDIR
PWLIBDIR := $(HOME)/pwlib
endif
include $(PWLIBDIR)/make/unix.mak
OBJDIR = $(PT_OBJDIR)
LIBDIR = $(PW_LIBDIR)
TARGET = $(LIBDIR)/$(PTLIB_FILE)
VERSION_FILE = $(PWLIBDIR)/version.h
##########################################
COMPONENT_SRC_DIR = ../../ptclib
COMMON_SRC_DIR = ../common
VPATH_CXX := $(COMMON_SRC_DIR) $(COMPONENT_SRC_DIR)
PLUGIN_DIR = ../../../plugins
#####CFLAGS += -DPTRACING=1
# try and keep the order of modules in reverse order of usage so any
# global statics will be constructed/destructed in the correct order
ifdef HAS_SASL2
SOURCES += $(COMPONENT_SRC_DIR)/psasl.cxx
endif
ifdef HAS_OPENLDAP
SOURCES += \
$(COMPONENT_SRC_DIR)/pldap.cxx \
$(COMPONENT_SRC_DIR)/pils.cxx
endif
ifdef HAS_OPENSSL
SOURCES += $(COMPONENT_SRC_DIR)/pssl.cxx
endif
ifdef HAS_SDL
SOURCES += $(COMPONENT_SRC_DIR)/vsdl.cxx
endif
## VIDEO DRIVERS
## Note this is mostly handled by the plugin system
ifdef HAS_VIDEO
SOURCES += $(COMMON_SRC_DIR)/vfakeio.cxx \
$(COMMON_SRC_DIR)/videoio.cxx \
$(COMMON_SRC_DIR)/vconvert.cxx \
$(COMMON_SRC_DIR)/pvidchan.cxx \
$(COMMON_SRC_DIR)/tinyjpeg.c \
$(COMMON_SRC_DIR)/jidctflt.c
ifdef USE_SHM_VIDEO_DEVICES
SOURCES += shmvideo.cxx
endif
ifndef HAS_PLUGINS
ifeq ($(OSTYPE),linux)
VPATH_CXX += $(PLUGIN_DIR)/vidinput_v4l
SOURCES += $(PLUGIN_DIR)/vidinput_v4l/vidinput_v4l.cxx
endif
endif # HAS_PLUGINS
endif # P_VIDEO
## SOUND DRIVERS
## Note this is mostly handled by the plugin system
ifdef HAS_AUDIO
SOURCES += $(COMMON_SRC_DIR)/sound.cxx
ifndef HAS_PLUGINS
ifeq ($(OSTYPE),linux)
VPATH_CXX += $(PLUGIN_DIR)/sound_oss
SOURCES += $(PLUGIN_DIR)/sound_oss/sound_oss.cxx
endif # linux
ifdef HAS_ALSA
VPATH_CXX += $(PLUGIN_DIR)/sound_alsa
SOURCES += $(PLUGIN_DIR)/sound_alsa/sound_alsa.cxx
endif # HAS_ALSA
ifeq ($(OSTYPE),beos)
SOURCES += beaudio.cxx
endif # beos
#ifeq ($(OSTYPE),Darwin)
#SOURCES += maccoreaudio.cxx
#endif # Darwin
endif # HAS_PLUGINS
# Although not an external plugin, the MacOSX
# CoreAudio sound driver still is in plugin form
# and requires the PPluginManager
ifeq ($(OSTYPE),Darwin)
SOURCES += maccoreaudio.cxx
endif # Darwin
endif # HAS_AUDIO
## Various modules
ifdef HAS_EXPAT
SOURCES += $(COMPONENT_SRC_DIR)/pxml.cxx
ifdef HAS_XMLRPC
SOURCES += \
$(COMPONENT_SRC_DIR)/pxmlrpc.cxx \
$(COMPONENT_SRC_DIR)/pxmlrpcs.cxx
endif
ifdef HAS_SOAP
SOURCES += $(COMPONENT_SRC_DIR)/psoap.cxx
endif
ifdef HAS_VXML
SOURCES += $(COMPONENT_SRC_DIR)/vxml.cxx
endif
endif # HAS_EXPAT
ifdef HAS_SASL2
SOURCES += \
$(COMPONENT_SRC_DIR)/xmpp.cxx \
$(COMPONENT_SRC_DIR)/xmpp_c2s.cxx \
$(COMPONENT_SRC_DIR)/xmpp_muc.cxx \
$(COMPONENT_SRC_DIR)/xmpp_roster.cxx
endif
ifdef HAS_RESOLVER
SOURCES += \
$(COMPONENT_SRC_DIR)/pdns.cxx \
$(COMPONENT_SRC_DIR)/enum.cxx
endif
ifdef HAS_TTS
SOURCES += $(COMPONENT_SRC_DIR)/ptts.cxx
endif
ifdef HAS_ASN
SOURCES += \
$(COMPONENT_SRC_DIR)/asner.cxx \
$(COMPONENT_SRC_DIR)/pasn.cxx
endif
ifdef HAS_SNMP
SOURCES += \
$(COMPONENT_SRC_DIR)/snmpclnt.cxx \
$(COMPONENT_SRC_DIR)/snmpserv.cxx \
$(COMPONENT_SRC_DIR)/psnmp.cxx
endif
ifdef HAS_FTP
SOURCES += \
$(COMPONENT_SRC_DIR)/ftpclnt.cxx \
$(COMPONENT_SRC_DIR)/ftpsrvr.cxx \
$(COMPONENT_SRC_DIR)/ftp.cxx
endif
ifdef HAS_TELNET
SOURCES += $(COMPONENT_SRC_DIR)/telnet.cxx
endif
ifdef HAS_STUN
SOURCES += $(COMPONENT_SRC_DIR)/pstun.cxx \
$(COMPONENT_SRC_DIR)/pnat.cxx
endif
ifdef HAS_SOCKS
SOURCES += $(COMPONENT_SRC_DIR)/socks.cxx
endif
ifdef HAS_PIPECHAN
SOURCES += pipechan.cxx
endif
ifdef HAS_REMCONN
SOURCES += remconn.cxx
endif
ifdef HAS_WAVFILE
SOURCES += $(COMPONENT_SRC_DIR)/pwavfile.cxx
endif
ifdef HAS_DTMF
SOURCES += $(COMPONENT_SRC_DIR)/dtmf.cxx
endif
ifdef HAS_SERIAL
SOURCES += \
serchan.cxx \
$(COMPONENT_SRC_DIR)/modem.cxx
endif
ifdef HAS_POP3SMTP
SOURCES += \
$(COMPONENT_SRC_DIR)/inetmail.cxx
endif
ifdef HAS_HTTP
SOURCES += \
$(COMPONENT_SRC_DIR)/http.cxx \
$(COMPONENT_SRC_DIR)/httpclnt.cxx
endif
ifdef HAS_HTTPSVC
SOURCES += \
svcproc.cxx \
$(COMPONENT_SRC_DIR)/httpsvc.cxx \
$(COMPONENT_SRC_DIR)/httpform.cxx \
$(COMPONENT_SRC_DIR)/httpsrvr.cxx \
$(COMPONENT_SRC_DIR)/html.cxx
ifdef HAS_OPENSSL
SOURCES += $(COMPONENT_SRC_DIR)/shttpsvc.cxx
endif #HAS_OPENSSL
endif #HAS_HTTPSVC
ifdef HAS_CONFIG_FILE
SOURCES += config.cxx
endif
ifdef HAS_SOCKAGG
SOURCES += $(COMPONENT_SRC_DIR)/sockagg.cxx
endif
ifdef HAS_VIDFILE
SOURCES += $(COMPONENT_SRC_DIR)/pvidfile.cxx \
$(COMPONENT_SRC_DIR)/pvfiledev.cxx
endif
GETDATE_SOURCE = $(COMMON_SRC_DIR)/getdate.tab.c
SOURCES += \
$(COMPONENT_SRC_DIR)/ipacl.cxx \
$(COMPONENT_SRC_DIR)/qchannel.cxx \
$(COMPONENT_SRC_DIR)/delaychan.cxx \
$(COMPONENT_SRC_DIR)/memfile.cxx \
$(COMPONENT_SRC_DIR)/cypher.cxx \
$(COMPONENT_SRC_DIR)/random.cxx \
$(COMPONENT_SRC_DIR)/inetprot.cxx \
$(COMPONENT_SRC_DIR)/notifier_ext.cxx \
$(GETDATE_SOURCE) \
uicmp.cxx \
socket.cxx \
udll.cxx \
channel.cxx \
osutil.cxx \
tlib.cxx \
switch.cxx \
assert.cxx \
$(COMMON_SRC_DIR)/pluginmgr.cxx \
$(COMMON_SRC_DIR)/sockets.cxx \
$(COMMON_SRC_DIR)/qos.cxx \
$(COMMON_SRC_DIR)/ptime.cxx \
$(COMMON_SRC_DIR)/osutils.cxx \
$(COMMON_SRC_DIR)/safecoll.cxx \
$(COMMON_SRC_DIR)/collect.cxx \
$(COMMON_SRC_DIR)/contain.cxx \
$(COMMON_SRC_DIR)/object.cxx # must be last module
ifneq ($(HAS_REGEX),1)
OBJS = $(OBJDIR)/regcomp.o $(OBJDIR)/regexec.o $(OBJDIR)/regerror.o $(OBJDIR)/regfree.o
endif
CLEAN_FILES = $(GETDATE_SOURCE)
#######################################################
include $(PWLIBDIR)/make/common.mak
#######################################################
alllibs:
$(MAKE) both
$(MAKE) bothshared
$(OBJDIR)/regcomp.o: $(COMMON_SRC_DIR)/regex/regcomp.c
$(CC) $(CFLAGS) $(DEBUG_FLAG) $(OPTCCFLAGS) -c -DPOSIX_MISTAKE -I$(COMMON_SRC_DIR)/regex -o $@ -c $<
$(OBJDIR)/regexec.o: $(COMMON_SRC_DIR)/regex/regexec.c
$(CC) $(CFLAGS) $(DEBUG_FLAG) $(OPTCCFLAGS) -c -DPOSIX_MISTAKE -I$(COMMON_SRC_DIR)/regex -o $@ -c $<
$(OBJDIR)/regerror.o: $(COMMON_SRC_DIR)/regex/regerror.c
$(CC) $(CFLAGS) $(DEBUG_FLAG) $(OPTCCFLAGS) -c -DPOSIX_MISTAKE -I$(COMMON_SRC_DIR)/regex -o $@ -c $<
$(OBJDIR)/regfree.o: $(COMMON_SRC_DIR)/regex/regfree.c
$(CC) $(CFLAGS) $(DEBUG_FLAG) $(OPTCCFLAGS) -c -DPOSIX_MISTAKE -I$(COMMON_SRC_DIR)/regex -o $@ -c $<
ifdef REQUIRES_SEPARATE_SWITCH
$(OBJDIR)/switch.o: ./switch.cxx
@if [ ! -d $(OBJDIR) ] ; then mkdir -p $(OBJDIR) ; fi
$(CPLUS) $(CFLAGS) $(STDCCFLAGS) -c $< -o $@
endif
$(OBJDIR)/getdate.tab.o: $(GETDATE_SOURCE)
$(CC) $(CFLAGS) $(STDCCFLAGS) -c $< -o $@
$(DEPDIR)/getdate.tab.dep: $(GETDATE_SOURCE)
$(CC) $(STDCCFLAGS) -M $< >> $@
$(GETDATE_SOURCE): $(COMMON_SRC_DIR)/getdate.y
bison $(COMMON_SRC_DIR)/getdate.y -o $(COMMON_SRC_DIR)/getdate.tab.c
#######################################################
LIB_BASENAME=$(PTLIB_BASE)
LIB_FILENAME=$(PTLIB_FILE)
include $(PWLIBDIR)/make/lib.mak
#######################################################
# End of Makefile
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -