Files
znc/test/Makefile.in
Wulf C. Krueger 4f3094e6c7 Fix the tests.
Due to the restructure directory layout, header files weren't found
anymore.

CConfigEntry was moved out of CConfig which had to be reflected in
ConfigTest.
2012-06-02 21:48:07 +02:00

51 lines
921 B
Makefile

SHELL := @SHELL@
# Support out-of-tree builds
srcdir := @srcdir@
VPATH := @srcdir@
CXX := @CXX@
CXXFLAGS := @CPPFLAGS@ @CXXFLAGS@ -I../include
LDFLAGS := @LDFLAGS@
LIBS := @LIBS@
TARGETS := ConfigTest EscapeTest
OBJS := $(addsuffix .o, $(TARGETS))
ZNC_OBJS := Config.o ZNCDebug.o FileUtils.o Utils.o ZNCString.o MD5.o SHA256.o
ZNC_OBJS := $(addprefix ../src/, $(ZNC_OBJS))
ifneq "$(V)" ""
VERBOSE=1
endif
ifeq "$(VERBOSE)" ""
Q=@
E=@echo
C=-s
else
Q=
E=@\#
C=
endif
.PHONY: test
all: $(TARGETS)
ConfigTest: ConfigTest.o
$(E) Linking $@...
$(Q)$(CXX) $(LDFLAGS) -o $@ $< $(ZNC_OBJS) $(LIBS)
EscapeTest: EscapeTest.o
$(E) Linking $@...
$(Q)$(CXX) $(LDFLAGS) -o $@ $< $(ZNC_OBJS) $(LIBS)
%.o: %.cpp Makefile
@mkdir -p .depend
$(E) Building $@...
$(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MMD -MF .depend/$@.dep
test: $(TARGETS)
for test in $(TARGETS) ; do \
./$$test || exit 1 ; \
done