LOCATION=authoring # # Add other locations and move target differences into the macros as needed # CC=g++ Cc=gcc #--------------------------------------------------------------- # To build apig-cli, you must first build an XMLRPC entabled # cliever and put it in operation at URL below because part # of the generic core client generated using xml-rpc-api2cpp. #-------------------------------------------------------------- CD_URL= http://localhost:4243/RPC2 #--------------------------------------------------------------- # You can build just CD without XMLRPC by leaving the DEF, LIB # INCL variables out. Otherwise set them from xmlrpc-c-config. #-------------------------------------------------------------- ##### Set this to the location of the executables/objects to be produced BUILD_OBJ_DIR = build BOSTLIB=-L/usr/lib/boost BOSINCL=-L/usr/include/boost LOG4LIB=-L/usr/lib #DEF_XML_RPC=-DXMLRPC_C #XMLRPC_INCL=-I/usr/include/xmlrpc-c #XMLRPC_LIB=-I/usr/lib CLIENT=drde SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) -l boost_system -l boost_thread -l log4cpp -l ncurses ifeq ($(LOCATION),authoring) SINCL= -I include -I ../AusRegCliever/include -I /usr/include/log4cpp $(BOSINCL) CSINCL= -I include -I ../AusRegCliever/include -I /usr/include/log4cpp $(BOSINCL) /usr/include/xsd/cxx /usr/local/include/xercesc CFLAGS= -DCURRENT_DEBUG=1000 -ggdb3 RESOURCES=../../resources endif CLIBS= -L$(USRLIB) CLFLAGS= -Wall -Wundef -Wpointer-arith -Wshadow \ -Wcast-align -Winline -Wmissing-declarations -Wredundant-decls \ -Wmissing-prototypes -Wnested-externs \ -Wstrict-prototypes -Waggregate-return -Wno-implicit ACOBJS= build/cliever.o build/cdLogger.o build/clientDaemonConfig.o \ build/clientDaemon.o build/commander.o build/mdBehavior.o EPPOBJS= build/epp-1.0.o build/eppcom-1.0.o build/registrant-1.0.o \ build/domain-1.0.o build/host-1.0.o build/contact-1.0.o # --- targets # ifeq ($(LOCATION),authoring) all: cliever ausreg-cd endif cliever: build/$(CLIENT)-cd ausreg-cd: build/ausreg-cd .c.o: $(Cc) -c $(CLFLAGS) -o $< # # xmlrpc utils will create the following by reflection from a running cliever. # this is only needed for APIG, # client/mdClientBehavior.cpp: xml-rpc-api2cpp $(CD_URL) "behavior" mdClientBehavior >client/mdClientBehavior after client/mdClientBehavior mdClientBehavior\.cc >client/mdClientBehavior.cpp before client/mdClientBehavior mdClientBehavior\.cc >include/mdClientBehavior.h rm src/client/mdClientBehavior client/mdClientDevice.cpp: xml-rpc-api2cpp $(CD_URL) "device" mdClientDevice >client/mdClientDevice after client/mdClientDevice mdClientDevice\.cc >client/mdClientDevice.cpp before client/mdClientDevice mdClientDevice\.cc >include/mdClientDevice.h rm src/client/mdClientDevice client/mdClientState.cpp: xml-rpc-api2cpp $(CD_URL) "state" mdClientState >client/mdClientState bin/after client/mdClientState mdClientState\.cc >client/mdClientState.cpp bin/before client/mdClientState mdClientState\.cc >include/mdClientState.h rm src/client/mdClientState client/epp-1.0.cpp: $(RESOURCES)/epp-1.0.xsd xsd cxx-parser $(RESOURCES)/epp-1.0.xsd mv epp-1.0-pskel.cxx client/epp-1.0.cpp mv epp-1.0-pskel.hxx include/epp-1.0.hpp client/eppcom-1.0.cpp: $(RESOURCES)/eppcom-1.0.xsd xsd cxx-parser $(RESOURCES)/eppcom-1.0.xsd mv eppcom-1.0-pskel.cxx client/eppcom-1.0.cpp mv eppcom-1.0-pskel.hxx include/eppcom-1.0.hpp client/host-1.0.cpp: $(RESOURCES)/host-1.0.xsd xsd cxx-parser $(RESOURCES)/host-1.0.xsd mv host-1.0-pskel.cxx client/host-1.0.cpp mv host-1.0-pskel.hxx include/host-1.0.hpp client/domain-1.0.cpp: $(RESOURCES)/domain-1.0.xsd xsd cxx-parser $(RESOURCES)/domain-1.0.xsd mv domain-1.0-pskel.cxx client/domain-1.0.cpp mv domain-1.0-pskel.hxx include/domain-1.0.hpp client/registrant-1.0.cpp: $(RESOURCES)/registrant-1.0.xsd xsd cxx-parser $(RESOURCES)/registrant-1.0.xsd mv registrant-1.0-pskel.cxx client/registrant-1.0.cpp mv registrant-1.0-pskel.hxx include/registrant-1.0.hpp client/contact-1.0.cpp: $(RESOURCES)/contact-1.0.xsd xsd cxx-parser $(RESOURCES)/contact-1.0.xsd mv contact-1.0-pskel.cxx client/contact-1.0.cpp mv contact-1.0-pskel.hxx include/contact-1.0.hpp build/epp-1.0.o: $(CC) $(CFLAGS) client/epp-1.0.cpp -c -o build/epp-1.0.o $(CSINCL) build/eppcom-1.0.o: $(CC) $(CFLAGS) client/eppcom-1.0.cpp -c -o build/eppcom-1.0.o $(CSINCL) build/host-1.0.o: $(CC) $(CFLAGS) client/host-1.0.cpp -c -o build/host-1.0.o $(CSINCL) build/domain-1.0.o: $(CC) $(CFLAGS) client/domain-1.0.cpp -c -o build/domain-1.0.o $(CSINCL) build/registrant-1.0.o: $(CC) $(CFLAGS) client/registrant-1.0.cpp -c -o build/registrant-1.0.o $(CSINCL) build/contact-1.0.o: $(CC) $(CFLAGS) client/contact-1.0.cpp -c -o build/contact-1.0.o $(CSINCL) build/cdLogger.o: client/cdLogger.cpp include/cdLogger.h $(CC) $(CFLAGS) client/cdLogger.cpp -c -o build/cdLogger.o $(SINCL) build/cliever.o: client/ausreg-cd.cpp include/ausreg-cd.h $(CC) $(CFLAGS) client/ausreg-cd.cpp -c -o build/cliever.o $(SINCL) $(DEF_XML_RPC) $(XMLRPC_INCL) build/clientDaemonConfig.o: client/clientDaemonConfig.cpp include/clientDaemonConfig.h $(CC) $(CFLAGS) client/clientDaemonConfig.cpp -c -o build/clientDaemonConfig.o $(SINCL) build/clientDaemon.o: client/clientDaemon.cpp include/clientDaemon.h $(CC) $(CFLAGS) client/clientDaemon.cpp -c -o build/clientDaemon.o $(SINCL) build/mdBehavior.o: client/mdBehavior.cpp include/mdBehavior.h $(CC) $(CFLAGS) client/mdBehavior.cpp $(SINCL) -c -o build/mdBehavior.o build/commander.o: client/commander.cpp include/mdCommander.h include/eppargs.h $(CC) $(CFLAGS) client/commander.cpp $(SINCL) -c -o build/commander.o build/$(CLIENT)-cd: $(ACOBJS) $(CC) $(CFLAGS) -o build/$(CLIENT)-cd $(SINCL) $(LIBS) $(ACOBJS) $(SLIBS) $(XMLRPC_LIB) build/ausreg-cd: $(ACOBJS) $(EPPOBJS) $(CC) $(CFLAGS) -o build/ausreg-cd $(SINCL) $(LIBS) $(ACOBJS) $(EPPOBJS) $(SLIBS) $(XMLRPC_LIB) build/apig-cli: build/mdClientBehavior.o build/mdClientState.o build/mdClientDevice.o \ build/tools.o build/coretestbucket.o client/apig-cli.cpp $(CC) $(CFLAGS) client/apig-cli.cpp $(CLIBS) $(CINCL) -o build/apig-cli build/tools.o build/coretestbucket.o \ build/mdClientBehavior.o build/mdClientState.o build/mdClientDevice.o $(XMLRPC_LIB) doxygen/index.html: etc/doxygen.config doxygen etc/doxygen.config # --- rebuild on copy to a new host #distclean: # clrbak # rm -rf build # rm -rf doxygen # mkdir doxygen # mkdir build # touch etc/doxygen.config .PHONY: ausreg_cd ausreg_cd: build/$(CLIENT)-cd .PHONY: dirs dirs: -mkdir -p $(BUILD_LIB_DIR) clean: clrbak find ./build -name "*.o" -print | perl -ne "print;chop;unlink" find ./build -name "*.rpo" -print | perl -ne "print;chop;unlink" rm build/$(CLIENT)-cd skeleton: clrbak find ./build -name "*.o" -print | perl -ne "print;chop;unlink" find ./build -name "*.rpo" -print | perl -ne "print;chop;unlink" rm client/*-1.0.cpp rm include/*-1.0.hpp rm build/$(CLIENT)-cd