2014-01-06 19:19:17 +00:00
|
|
|
##################################################
|
|
|
|
# Makefile for building lib and main test routine#
|
|
|
|
##################################################
|
2014-01-17 01:46:48 +00:00
|
|
|
LOCATION=DEBIAN_7
|
|
|
|
#LOCATION=DEBIAN_6
|
2014-01-15 00:52:58 +00:00
|
|
|
#LOCATION=OSX_10_8
|
2014-01-09 01:35:37 +00:00
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
SYSTEM = $(shell uname -s)
|
|
|
|
|
|
|
|
CXX = g++
|
|
|
|
CC = gcc
|
|
|
|
|
2014-01-09 01:35:37 +00:00
|
|
|
#PRODORDEV += -O2
|
|
|
|
PRODORDEV += -ggdb3
|
|
|
|
|
2014-01-18 20:35:18 +00:00
|
|
|
CXXFLAGS = $(PRODORDEV) -Wall -Wpointer-arith -Wcast-qual -D_REENTRANT -fPIC
|
2014-01-15 00:52:58 +00:00
|
|
|
CPPFLAGS = -fPIC -D_GNU_SOURCE -D$(LOCATION)
|
|
|
|
CXXFLAGS += -D_GNU_SOURCE -O0 -D$(LOCATION)
|
2014-01-09 01:35:37 +00:00
|
|
|
|
2014-01-15 00:52:58 +00:00
|
|
|
ifeq ($(LOCATION),DEBIAN_7)
|
2014-01-14 19:58:27 +00:00
|
|
|
XALAN_LIB_DIR = /usr/local/lib/
|
|
|
|
XALAN_LIB = xalan-c
|
|
|
|
XALAN_INC_DIR = /usr/local/include/xalanc
|
|
|
|
XERCES_LIB_DIR = /usr/local/lib/
|
|
|
|
XERCES_LIB = xerces-c
|
|
|
|
XERCES_INC_DIR = /usr/local/include/xercesc
|
2014-01-14 21:43:59 +00:00
|
|
|
endif
|
2014-01-15 00:52:58 +00:00
|
|
|
ifeq ($(LOCATION),DEBIAN_6)
|
2014-01-09 01:35:37 +00:00
|
|
|
XALAN_LIB_DIR = /usr/lib/
|
|
|
|
XALAN_LIB = xalan-c
|
|
|
|
XALAN_INC_DIR = /usr/include/xalanc
|
|
|
|
XERCES_LIB_DIR = /usr/lib/
|
|
|
|
XERCES_LIB = xerces-c
|
2014-01-14 19:58:27 +00:00
|
|
|
XERCES_INC_DIR = /usr/include/xercesc
|
|
|
|
endif
|
2014-01-15 00:52:58 +00:00
|
|
|
ifeq ($(LOCATION),OSX_10_8)
|
2014-01-14 21:43:59 +00:00
|
|
|
XALAN_LIB_DIR = /opt/local/lib/
|
|
|
|
XALAN_LIB = xalan-c
|
|
|
|
XALAN_INC_DIR = /opt/local/include/
|
|
|
|
XERCES_LIB_DIR = /opt/local/lib/
|
|
|
|
XERCES_LIB = xerces-c
|
|
|
|
XERCES_INC_DIR = /opt/local/include/
|
|
|
|
endif
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
include xml-deps.mk
|
|
|
|
|
|
|
|
##### Set this to the location of the library to be produced
|
|
|
|
|
|
|
|
BUILD_LIB_DIR = lib
|
|
|
|
BUILD_OBJ_DIR = build
|
|
|
|
|
|
|
|
###### Include Paths
|
|
|
|
|
2014-01-18 20:35:18 +00:00
|
|
|
INCLUDE_DIR = -I . -I $(XERCES_INC_DIR) -I $(XALAN_INC_DIR) -I ../AusRegCliever/include -I /usr/include
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
build_obj_dir = $(BUILD_OBJ_DIR)
|
|
|
|
|
2014-01-22 20:38:55 +00:00
|
|
|
src_dirs_cpp = se se/secDNS common se/LPE session xml
|
2014-01-06 19:19:17 +00:00
|
|
|
src_dirs_c = config
|
|
|
|
srcs_all = $(foreach dir,$(src_dirs_cpp),$(wildcard $(dir)/*.cpp))
|
|
|
|
srcs_all += $(foreach dir,$(src_dirs_c),$(wildcard $(dir)/*.c))
|
|
|
|
|
|
|
|
srcs = $(filter-out %Test.cpp,$(srcs_all))
|
|
|
|
objs = $(foreach file,$(srcs),$(build_obj_dir)/$(basename $(notdir $(file))).o)
|
|
|
|
test_srcs = $(filter %Test.cpp,$(srcs_all))
|
|
|
|
test_objs = $(foreach file,$(test_srcs),$(build_obj_dir)/$(basename $(notdir $(file))).o)
|
|
|
|
test_execs = $(subst .o,,$(test_objs))
|
|
|
|
|
|
|
|
calc_deps = \
|
|
|
|
$(CC) -MT '$(build_obj_dir)/$(basename $(notdir $@)).o $@' -MF $@ -MM $(CPPFLAGS) $(INCLUDE_DIR) $<
|
|
|
|
|
2014-01-19 05:13:48 +00:00
|
|
|
all: dirs $(objs) $(BUILD_LIB_DIR)/libACTK1_0.so
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
%.d: %.c
|
|
|
|
$(calc_deps)
|
|
|
|
%.d: %.cpp
|
|
|
|
$(calc_deps)
|
|
|
|
include $(foreach name,$(srcs_all),$(basename $(name)).d)
|
|
|
|
|
|
|
|
vpath %.cpp ./ \
|
|
|
|
./se\
|
2014-01-19 05:13:48 +00:00
|
|
|
./xsd2xml \
|
2014-01-22 20:38:55 +00:00
|
|
|
./se/LPE \
|
2014-01-06 19:19:17 +00:00
|
|
|
./se/secDNS\
|
|
|
|
./xml\
|
|
|
|
./common\
|
|
|
|
./session\
|
|
|
|
|
|
|
|
vpath %.c ./config
|
|
|
|
|
|
|
|
vpath %.o ../build
|
|
|
|
|
|
|
|
####### Implicit rules
|
|
|
|
|
|
|
|
.SUFFIXES: .cpp .c
|
|
|
|
|
|
|
|
$(BUILD_OBJ_DIR)/%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $(INCLUDE_DIR) $<
|
|
|
|
|
|
|
|
$(BUILD_OBJ_DIR)/%.o: %.c
|
|
|
|
$(CC) $(CPPFLAGS) -c -o $@ $(INCLUDE_DIR) $<
|
|
|
|
|
|
|
|
|
2014-01-16 20:28:52 +00:00
|
|
|
ARTKLIBS = -L$(BUILD_LIB_DIR) -lACTK1_0 \
|
2014-01-09 02:50:51 +00:00
|
|
|
-L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg \
|
2014-01-06 19:19:17 +00:00
|
|
|
-L$(XERCES_LIB_DIR) -lxerces-c \
|
|
|
|
-lssl \
|
2014-01-18 20:35:18 +00:00
|
|
|
-lrt -llog4cpp
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
$(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
|
2014-01-16 20:28:52 +00:00
|
|
|
$(CXX) $(ARTKLIBS) -o $@ $<
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
.PHONY: doc clean dclean
|
|
|
|
|
2014-01-16 20:28:52 +00:00
|
|
|
#
|
2014-01-22 20:38:55 +00:00
|
|
|
# The toolkit raises the c++ "static initialization fiasco" situation. Use this as needed
|
2014-01-23 02:59:22 +00:00
|
|
|
#
|
2014-01-23 21:06:09 +00:00
|
|
|
ARTKOBJS=build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o \
|
|
|
|
build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \
|
2014-01-24 16:38:51 +00:00
|
|
|
build/RegistrantObjectType.o build/LPExtension.o \
|
2014-01-23 02:59:22 +00:00
|
|
|
build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/Properties.o build/SessionPoolImpl.o \
|
|
|
|
build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/ProtocolExtensionCommand.o build/SSLException.o \
|
|
|
|
build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/ReceiveSE.o build/StandardCommandType.o \
|
|
|
|
build/CheckResponse.o build/DomainInfoKVResponseExtension.o build/EPPWriter.o build/NamespaceResolver.o build/StandardObjectType.o \
|
|
|
|
build/CLTRID.o build/DomainInfoResponse.o build/ErrorPkg.o build/NAPTR.o build/RegistrantTransferCommandType.o build/StringUtils.o \
|
|
|
|
build/CommandCounter.o build/DomainKVCommandExtension.o build/Greeting.o build/NotificationResponse.o build/ResponseExtension.o build/SyncExtension.o \
|
|
|
|
build/Command.o build/DomainNotificationResponse.o build/HostAddRem.o build/ObjectCommand.o build/Response.o build/SystemProperties.o \
|
2014-01-23 21:06:09 +00:00
|
|
|
build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/ResultCounter.o build/Timer.o \
|
|
|
|
build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/LPCheck.o build/Result.o build/TLSContext.o \
|
2014-01-23 02:59:22 +00:00
|
|
|
build/ContactCheckResponse.o build/DomainRenewCommand.o build/HostCreateResponse.o build/LPLaunch.o build/SecDNSChgType.o build/TLSSession.o \
|
2014-01-23 21:06:09 +00:00
|
|
|
build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/LPCreate.o build/SecDNSDSData.o build/TLSSocket.o \
|
2014-01-23 02:59:22 +00:00
|
|
|
build/ContactCreateResponse.o build/DomainSecDNSCreateCommandExtension.o build/HostUpdateCommand.o build/SecDNSDSOrKeyType.o build/TransferCommand.o \
|
|
|
|
build/ContactInfoResponse.o build/DomainSecDNSInfoResponseExtension.o build/InetAddress.o build/SecDNSExtension.o build/TransferOp.o \
|
|
|
|
build/ContactNotificationResponse.o build/DomainSecDNSUpdateCommandExtension.o build/InfoResponse.o build/SecDNSKeyData.o build/TransferResponse.o \
|
|
|
|
build/ContactTransferResponse.o build/DomainTransferResponse.o build/init.o build/Period.o build/SecDNSRemType.o build/UserPassMismatchException.o \
|
|
|
|
build/ContactUpdateCommand.o build/DomainUpdateCommand.o build/IPVersion.o build/PeriodUnit.o build/SendSE.o build/XMLDocument.o \
|
|
|
|
build/CreateResponse.o build/DomainUpdateSyncCommandExtension.o build/KVExtension.o build/PollOperation.o build/SessionFactory.o \
|
|
|
|
build/DataResponse.o build/E164Extension.o build/Logger.o build/PollResponse.o build/SessionManagerFactory.o \
|
|
|
|
build/Disclose.o build/EnumDomainCreateCommand.o build/LoginCommand.o build/PostalInfo.o build/SessionManagerImpl.o
|
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
.PHONY: tests
|
|
|
|
tests: all $(test_execs)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: dirs
|
|
|
|
dirs:
|
|
|
|
-mkdir -p $(BUILD_LIB_DIR)
|
|
|
|
-mkdir -p $(BUILD_OBJ_DIR)
|
|
|
|
|
2014-01-10 21:25:13 +00:00
|
|
|
libACTK1_0.so:
|
2014-01-16 20:28:52 +00:00
|
|
|
$(BUILD_LIB_DIR)/libACTK1_0.so: $(objs)
|
2014-01-23 02:59:22 +00:00
|
|
|
$(CXX) $(LDFLAGS) $(PRODORDEV) -shared $(ARTKOBJS) -o $@
|
2014-01-19 05:13:48 +00:00
|
|
|
|
|
|
|
xsd2xml:
|
|
|
|
$(BUILD_OBJ_DIR)/xsd2xml: build/parser.o
|
|
|
|
$(CXX) build/parser.o -o build/xsd2xml -o $@
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
doc:
|
|
|
|
doxygen etc/Doxyfile
|
|
|
|
|
|
|
|
clean:
|
2014-01-09 01:35:37 +00:00
|
|
|
$(RM) $(objs) $(BUILD_LIB_DIR)/libACTK1_0.so *~
|
2014-01-06 19:19:17 +00:00
|
|
|
$(RM) -r $(BUILD_OBJ_DIR)
|
|
|
|
$(RM) -r $(BUILD_LIB_DIR)
|
|
|
|
|
|
|
|
dclean:
|
|
|
|
$(MAKE) clean
|
|
|
|
$(RM) */*.d
|
|
|
|
|