Files
znc/test/Makefile.in
Uli Schlachter da0ba75549 Fix CString::Escape_n() and add some tests for it
This bug was originally reported by someone on irc, but sadly I forgot who it
was. Sorry!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-05 16:09:22 +02:00

51 lines
916 B
Makefile

SHELL := @SHELL@
# Support out-of-tree builds
srcdir := @srcdir@
VPATH := @srcdir@
CXX := @CXX@
CXXFLAGS := @DEFS@ @CPPFLAGS@ @CXXFLAGS@ -I..
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 ../, $(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