~ubuntu-branches/ubuntu/trusty/znc/trusty

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-11-08 13:13:58 UTC
  • mfrom: (34.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20131108131358-o90mlo1evvu27z8h
Tags: 1.2-1
* New upstream release.
  Closes: #728786
  - Remove merged patch 01-spelling-error.
  - Remove merged patch 02-CVE-2013-2130.
  - License has been changed to Apache-2.0.
  - Disable new tests, because they require an internet connection.
  - Add new znc-extra module modules_online.
  - Remove AUTHORS file.
* Bump Standards-Version to 3.9.5 (no changes needed).
* Don't explicitly request xz compression - dpkg 1.17 does this by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
LIB_SRCS  := ZNCString.cpp Csocket.cpp znc.cpp IRCNetwork.cpp User.cpp IRCSock.cpp \
35
35
        Client.cpp Chan.cpp Nick.cpp Server.cpp Modules.cpp MD5.cpp Buffer.cpp Utils.cpp \
36
36
        FileUtils.cpp HTTPSock.cpp Template.cpp ClientCommand.cpp Socket.cpp SHA256.cpp \
37
 
        WebModules.cpp Listener.cpp Config.cpp ZNCDebug.cpp version.cpp
 
37
        WebModules.cpp Listener.cpp Config.cpp ZNCDebug.cpp Threads.cpp version.cpp
38
38
LIB_SRCS  := $(addprefix src/,$(LIB_SRCS))
39
39
BIN_SRCS  := src/main.cpp
40
40
LIB_OBJS  := $(patsubst %cpp,%o,$(LIB_SRCS))
41
41
BIN_OBJS  := $(patsubst %cpp,%o,$(BIN_SRCS))
42
 
CLEAN     := znc src/*.o core core.* .version_extra
43
 
DISTCLEAN := Makefile config.log config.status znc-buildmod .depend \
44
 
        modules/.depend modules/Makefile man/Makefile znc.pc znc-uninstalled.pc
 
42
TESTS     := StringTest ConfigTest
 
43
TESTS     := $(addprefix test/,$(addsuffix .o,$(TESTS)))
 
44
GTEST_VER := 1.7.0
 
45
CLEAN     := znc src/*.o test/*.o core core.* .version_extra .depend modules/.depend
 
46
DISTCLEAN := Makefile config.log config.status znc-buildmod \
 
47
        modules/Makefile man/Makefile znc.pc znc-uninstalled.pc test/Makefile
45
48
 
46
49
CXXFLAGS += -D_MODDIR_=\"$(MODDIR)\" -D_DATADIR_=\"$(DATADIR)\"
47
50
 
58
61
C=
59
62
endif
60
63
 
61
 
.PHONY: all man modules clean distclean install version_extra_recompile
 
64
.PHONY: all man modules clean distclean install version_extra_recompile test
62
65
.SECONDARY:
63
66
 
64
67
all: znc man modules $(LIBZNC)
72
75
znc: $(OBJS)
73
76
        $(E) Linking znc...
74
77
        $(Q)$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
78
 
75
79
else
76
80
znc: $(BIN_OBJS) $(LIBZNC)
77
81
        $(E) Linking znc...
82
86
        $(Q)$(CXX) $(LDFLAGS) -shared -o $@ $(LIB_OBJS) $(LIBS)
83
87
endif
84
88
 
 
89
unittest: $(LIB_OBJS) test/gtest-all.o test/gtest-main.o $(TESTS)
 
90
        $(E) Linking unit test...
 
91
        $(Q)$(CXX) $(LDFLAGS) -o $@ $(LIB_OBJS) test/gtest-all.o test/gtest-main.o $(TESTS) $(LIBS)
 
92
 
85
93
man:
86
94
        @$(MAKE) -C man $(C)
87
95
 
101
109
        $(E) Building core object $*...
102
110
        $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/$*.dep -MT $@
103
111
 
104
 
ifneq "$(GIT)" ""
105
 
# If git-describe differs from .version_extra, add a phony target to dependencies, forcing version.o to be recompiled
106
 
# znc-0.200-430-g80acaa7 -> -DVERSION_EXTRA="\"-git-430-80acaa7\""
107
 
src/version.o: src/version.cpp Makefile $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(GIT) --git-dir=$(srcdir)/.git describe 2> /dev/null` ]; then echo version_extra_recompile; fi)
 
112
test/%.o: test/%.cpp Makefile
 
113
        @mkdir -p .depend test
 
114
        $(E) Building test object $*...
 
115
        $(Q)$(CXX) $(CXXFLAGS) -Itest/gtest-$(GTEST_VER)/fused-src -c -o $@ $< -MD -MF .depend/$*.dep -MT $@
 
116
 
 
117
test/gtest-all.o: test/gtest-$(GTEST_VER)/fused-src/gtest/gtest-all.cc Makefile
 
118
        @mkdir -p .depend test
 
119
        $(E) Building test object gtest-all...
 
120
        $(Q)$(CXX) $(CXXFLAGS) -Itest/gtest-$(GTEST_VER)/fused-src -c -o $@ $< -MD -MF .depend/gtest-all.dep -MT $@
 
121
 
 
122
test/gtest-main.o: test/gtest-$(GTEST_VER)/fused-src/gtest/gtest_main.cc Makefile
 
123
        @mkdir -p .depend test
 
124
        $(E) Building test object gtest-main...
 
125
        $(Q)$(CXX) $(CXXFLAGS) -Itest/gtest-$(GTEST_VER)/fused-src -c -o $@ $< -MD -MF .depend/gtest-main.dep -MT $@
 
126
 
 
127
test/gtest.zip:
 
128
        $(E) Downloading GoogleTest $(GTEST_VER)
 
129
        $(Q)wget http://googletest.googlecode.com/files/gtest-$(GTEST_VER).zip -O $@
 
130
 
 
131
test/gtest-$(GTEST_VER)/fused-src/gtest/gtest-all.cc test/gtest-$(GTEST_VER)/fused-src/gtest/gtest_main.cc test/gtest-$(GTEST_VER)/fused-src/gtest/gtest.h: test/gtest.zip
 
132
        $(E) Unpacking GoogleTest $(GTEST_VER)
 
133
        $(Q)test -r $@ || unzip $^ -d test/
 
134
        $(Q)test -r $@
 
135
        $(Q)touch -c $@
 
136
 
 
137
ifneq "" ""
 
138
# If git commit was changed since previous build, add a phony target to dependencies, forcing version.o to be recompiled
 
139
# Nightlies have pregenerated version.cpp
 
140
src/version.cpp: Makefile version.sh $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(srcdir)/version.sh $(GIT) 2> /dev/null` ]; then echo version_extra_recompile; fi)
108
141
        @mkdir -p .depend src
109
 
        $(E) Building core object version...
110
 
        $(Q)$(CXX) $(shell $(GIT) --git-dir=$(srcdir)/.git describe 2> /dev/null | $(SED) 's/.*-\([0123456789][0123456789]*\)-g\(.*\)/-DVERSION_EXTRA="\\"-git-\1-\2\\""/') $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/version.dep -MT $@
111
 
        $(Q)$(GIT) --git-dir=$(srcdir)/.git describe > .version_extra 2> /dev/null || true
 
142
        $(E) Building source file version.cpp...
 
143
        $(Q)WRITE_OUTPUT=yes $(srcdir)/version.sh "$(GIT)" > .version_extra 2> /dev/null
 
144
 
 
145
CLEAN += src/version.cpp
112
146
endif
113
147
 
114
148
install: znc $(LIBZNC)
161
195
        rmdir $(DESTDIR)$(PKGCONFIGDIR)
162
196
        @echo "Successfully uninstalled, but empty directories were left behind"
163
197
 
 
198
test: unittest
 
199
        $(Q)./unittest
 
200
 
164
201
-include $(wildcard .depend/*.dep)