76 lines
1.8 KiB
Makefile
76 lines
1.8 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=-L/usr/include/boost
|
|
LOG4LIB=-L/usr/lib
|
|
|
|
SLIBS= -L/usr/lib $(BOSTLIB) $(LOG4LIB) -l boost_system -l boost_thread -l log4cpp
|
|
|
|
ifeq ($(LOCATION),authoring)
|
|
SINCL= -I 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
|
|
|
|
# --- targets
|
|
#
|
|
|
|
ifeq ($(LOCATION),authoring)
|
|
all: cliever
|
|
endif
|
|
|
|
cliever: build/cliever
|
|
|
|
.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/masterDaemon.o: client/clientDaemon.cpp include/*.h
|
|
$(CC) $(CFLAGS) client/clientDaemon.cpp -c -o build/clientDaemon.o $(SINCL)
|
|
|
|
build/ausreg-cd: $(ACOBJS)
|
|
$(CC) $(CFLAGS) -o build/ausreg-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
|
|
|
|
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
|
|
|
|
|
|
|
|
|