diff --git a/Makefile.in b/Makefile.in index 0b78e4c..3bceafa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,14 +31,6 @@ INSTALL_DATA := @INSTALL_DATA@ GIT := @GIT@ SED := @SED@ -GTEST_DOWNLOAD := -GTEST_DIR := @GTEST_DIR@ -ifeq "$(GTEST_DIR)" "" -GTEST_VER := 1.7.0 -GTEST_DIR := test/gtest-$(GTEST_VER) -GTEST_DOWNLOAD := 1 -endif - LIB_SRCS := ZNCString.cpp Csocket.cpp znc.cpp IRCNetwork.cpp User.cpp IRCSock.cpp \ Client.cpp Chan.cpp Nick.cpp Server.cpp Modules.cpp MD5.cpp Buffer.cpp Utils.cpp \ FileUtils.cpp HTTPSock.cpp Template.cpp ClientCommand.cpp Socket.cpp SHA256.cpp \ @@ -96,7 +88,7 @@ endif unittest: $(LIB_OBJS) test/gtest-all.o test/gtest-main.o $(TESTS) $(E) Linking unit test... - $(Q)$(CXX) $(LDFLAGS) -o $@ $(LIB_OBJS) test/gtest-all.o test/gtest-main.o $(TESTS) $(LIBS) + $(Q)$(CXX) $(LDFLAGS) -o $@ $(LIB_OBJS) $(TESTS) $(LIBS) -lgtest -lgtest_main man: @$(MAKE) -C man $(C) @@ -120,28 +112,5 @@ src/%.o: src/%.cpp Makefile include/znc/Csocket.h test/%.o: test/%.cpp Makefile include/znc/Csocket.h @mkdir -p .depend test $(E) Building test object $*... - $(Q)$(CXX) $(CXXFLAGS) -I$(GTEST_DIR)/include -c -o $@ $< -MD -MF .depend/$*.test.dep -MT $@ - -test/gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc Makefile - @mkdir -p .depend test - $(E) Building test object gtest-all... - $(Q)$(CXX) $(CXXFLAGS) -I$(GTEST_DIR)/include -I$(GTEST_DIR) -c -o $@ $< -MD -MF .depend/gtest-all.dep -MT $@ - -test/gtest-main.o: $(GTEST_DIR)/src/gtest_main.cc Makefile - @mkdir -p .depend test - $(E) Building test object gtest-main... - $(Q)$(CXX) $(CXXFLAGS) -I$(GTEST_DIR)/include -c -o $@ $< -MD -MF .depend/gtest-main.dep -MT $@ - -ifneq "$(GTEST_DOWNLOAD)" "" -test/gtest.zip: - @mkdir -p .depend test - $(E) Downloading GoogleTest $(GTEST_VER) - $(Q)wget http://googletest.googlecode.com/files/gtest-$(GTEST_VER).zip -O $@ - -$(GTEST_DIR)/src/gtest-all.cc $(GTEST_DIR)/src/gtest_main.cc $(GTEST_DIR)/include/gtest/gtest.h: test/gtest.zip - $(E) Unpacking GoogleTest $(GTEST_VER) - $(Q)test -r $@ || unzip $^ -d test/ - $(Q)test -r $@ - $(Q)touch -c $@ -endif + $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/$*.test.dep -MT $@