LOCATION=authoring # # Add other locations and move target differences into the macros as needed # CC=g++ Cc=gcc ##### 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 CLIENT=drde SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) -l boost_system -l boost_thread -l log4cpp ifeq ($(LOCATION),authoring) SINCL= -I include -I ../AusRegCliever/include -I /usr/include/log4cpp $(BOSINCL) CFLAGS= -DCURRENT_DEBUG=1000 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 # --- targets # ifeq ($(LOCATION),authoring) all: cliever endif cliever: build/$(CLIENT)-cd .c.o: $(Cc) -c $(CLFLAGS) -o $< 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/*.h $(CC) $(CFLAGS) client/ausreg-cd.cpp -c -o build/cliever.o $(SINCL) build/clientDaemonConfig.o: client/clientDaemonConfig.cpp include/*.h $(CC) $(CFLAGS) client/clientDaemonConfig.cpp -c -o build/clientDaemonConfig.o $(SINCL) build/clientDaemon.o: client/clientDaemon.cpp include/*.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 $(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) 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