117 lines
3.2 KiB
Makefile
117 lines
3.2 KiB
Makefile
LOCATION=authoring
|
|
#
|
|
# Add other locations and move target differences into the macros as needed
|
|
#
|
|
CC=g++
|
|
Cc=gcc
|
|
|
|
BOSTLIB=-L/usr/lib/boost
|
|
BOSINCL=-I/usr/include/boost
|
|
LOG4LIB=-L/usr/lib
|
|
|
|
ifeq ($(LOCATION),authoring)
|
|
ARTKLIB=-L/home/jdaugherty/clients/reg.de/git/AusRegEPPTK/lib
|
|
ARTKINCL=-I/home/jdaugherty/clients/reg.de/git/AusRegEPPTK/common
|
|
#ARTKLIB=-L/home/jdaugherty/clients/reg.de/git/ACTK1_3_2/lib
|
|
#ARTKINCL=-I/home/jdaugherty/clients/reg.de/git/ACTK1_3_2/common
|
|
endif
|
|
|
|
ifeq ($(LOCATION),testing)
|
|
ARTKLIB=-L/home/drde/git/AusRegEPPTK/lib
|
|
ARTKINCL=I/home/drde/git/AusRegEPPTK/common
|
|
endif
|
|
|
|
SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) $(ARTKLIB) -l boost_system -l boost_thread -l log4cpp -l AusRegEPPTK
|
|
|
|
ifeq ($(LOCATION),authoring)
|
|
SINCL= -I include -I /usr/include/log4cpp $(BOSINCL)
|
|
CFLAGS= -DCURRENT_DEBUG=1000 -ggdb3
|
|
endif
|
|
|
|
ifeq ($(LOCATION),production)
|
|
SINCL= -I include -I /usr/include/log4cpp $(BOSINCL)
|
|
CFLAGS= -DPRODUCTION=1
|
|
endif
|
|
|
|
XALAN_LIB_DIR = /usr/lib/x86_64-linux-gnu/
|
|
XALAN_LIB = xalan-c
|
|
XALAN_INC_DIR = /usr/include/xalanc
|
|
XERCES_LIB_DIR = /usr/lib/
|
|
XERCES_LIB = xerces-c
|
|
XERCES_INC_DIR = /usr/include/xercesc/
|
|
|
|
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/mdLogger.o build/masterDaemonConfig.o build/masterDaemon.o \
|
|
build/mdHost.o build/mdState.o build/mdAusReg.o
|
|
|
|
|
|
ARTKDEPS = -L$(ARTK_LIB_DIR) -lAusRegEPPTK \
|
|
-L$(XALAN_LIB_DIR) -lxalan-c -lxalanMsg\
|
|
-L$(XERCES_LIB_DIR) -lxerces-c \
|
|
-lssl \
|
|
-lrt
|
|
|
|
# --- targets
|
|
#
|
|
|
|
ifeq ($(LOCATION),authoring)
|
|
all: cliever
|
|
endif
|
|
|
|
cliever: build/drde-cliever
|
|
|
|
.c.o:
|
|
$(Cc) -c $(CLFLAGS) -o $<
|
|
|
|
build/mdLogger.o: server/mdLogger.cpp include/mdLogger.h
|
|
$(CC) $(CFLAGS) server/mdLogger.cpp -c -o build/mdLogger.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/cliever.o: server/cliever-md.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/cliever-md.cpp -c -o build/cliever.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/masterDaemonConfig.o: server/masterDaemonConfig.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/masterDaemonConfig.cpp -c -o build/masterDaemonConfig.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/mdHost.o: server/mdHost.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/mdHost.cpp -c -o build/mdHost.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/mdState.o: server/mdState.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/mdState.cpp -c -o build/mdState.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/masterDaemon.o: server/masterDaemon.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/masterDaemon.cpp -c -o build/masterDaemon.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/mdAusReg.o: server/mdAusReg.cpp include/*.h
|
|
$(CC) $(CFLAGS) server/mdAusReg.cpp -c -o build/mdAusReg.o $(SINCL) $(ARTKINCL)
|
|
|
|
build/drde-cliever: $(ACOBJS)
|
|
$(CC) $(CFLAGS) -o build/drde-cliever $(SINCL) $(LIBS) $(ACOBJS) $(SLIBS) $(ARTKDEPS)
|
|
|
|
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
|
|
|
|
clean:
|
|
clrbak
|
|
find ./build -name "*.o" -print | perl -ne "print;chop;unlink"
|
|
find ./build -name "*.rpo" -print | perl -ne "print;chop;unlink"
|
|
rm build/drde-cliever
|
|
|
|
|
|
|
|
|