24 sed
-e
's/#VERSION#/$(WVPACKAGE_VERSION)/g' < $< > $@
26 ifeq ("$(enable_testgui)", "no")
32 ifeq ($(USE_WVSTREAMS_ARGP
),1)
33 utils
/wvargs.o-CPPFLAGS
+= -Iargp
34 libwvutils.so-LIBS
+= -Largp
-largp
36 # argp does its own dependency checking, so let's call it once per wvstreams
37 # build, in case some system dependencies have changed and argp should be
39 ARGP_TARGET
=argp
/libargp.list
40 TARGETS
+= $(ARGP_TARGET
)
44 # Warning! Crucial! KEEP THIS SEMICOLON HERE! Without it, if you blow away
45 # $(ARGP_TARGET), $(MAKE) will get confused.
46 $(ARGP_TARGET
): argp
/all;
52 # libwvbase: a the minimal code needed to link a wvstreams program.
55 utils
/wvbuffer.o utils
/wvbufferstore.o \
58 streams
/wvfdstream.o \
65 utils
/wvscatterhash.o utils
/wvsorter.o \
67 utils
/wvstring.o utils
/wvstringlist.o \
68 utils
/wvstringmask.o \
72 streams
/wvistreamlist.o \
73 utils
/wvstreamsdebugger.o \
77 uniconf
/uniconfgen.o uniconf
/uniconfkey.o uniconf
/uniconfroot.o \
78 uniconf
/unihashtree.o \
79 uniconf
/unimountgen.o \
80 uniconf
/unitempgen.o \
84 utils
/wvstringcache.o \
86 uniconf
/unigenhack.o \
87 uniconf
/unilistiter.o \
89 streams
/wvstreamclone.o \
90 streams
/wvconstream.o \
94 xplc-cxx
/strtouuid.o \
95 xplc-cxx
/uuidtostr.o \
101 xplc
/moduleloader.o \
108 TARGETS
+= libwvbase.so
109 libwvbase_OBJS
+= $(filter-out uniconf
/unigenhack.o
$(WV_EXCLUDES
),$(BASEOBJS
))
110 libwvbase.so
: $(libwvbase_OBJS
) uniconf
/unigenhack.o
111 libwvbase.so-LIBS
+= $(LIBXPLC
)
114 # libwvutils: handy utility library for C++
116 TARGETS
+= libwvutils.so
117 TESTS
+= $(call tests_cc
,utils
/tests
)
118 libwvutils_OBJS
+= $(filter-out $(BASEOBJS
) $(TESTOBJS
),$(call objects
,utils
))
119 libwvutils.so
: $(libwvutils_OBJS
) $(LIBWVBASE
) $(ARGP_TARGET
)
121 libwvutils.so-LIBS
+= -lz
-lcrypt
$(LIBS_PAM
)
123 libwvutils.so-LIBS
+= -lz
$(LIBS_PAM
)
126 utils
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
129 # libwvstreams: stream/event handling library
131 TARGETS
+= libwvstreams.so
132 TARGETS
+= crypto
/tests
/ssltest ipstreams
/tests
/unixtest
133 TARGETS
+= crypto
/tests
/printcert
136 ifneq ("$(with_readline)", "no")
137 TARGETS
+= ipstreams
/tests
/wsd
138 ipstreams
/tests
/wsd-LIBS
+= -lreadline
140 TEST_SKIP_OBJS
+= ipstreams
/tests
/wsd
143 TEST_SKIP_OBJS
+= ipstreams
/tests
/wsd
146 TESTS
+= $(call tests_cc
,configfile
/tests
)
147 TESTS
+= $(call tests_cc
,streams
/tests
)
148 TESTS
+= $(call tests_cc
,ipstreams
/tests
)
149 TESTS
+= $(call tests_cc
,crypto
/tests
)
150 TESTS
+= $(call tests_cc
,urlget
/tests
)
151 TESTS
+= $(call tests_cc
,linuxstreams
/tests
)
152 libwvstreams_OBJS
+= $(filter-out $(BASEOBJS
), \
153 $(call objects
,configfile crypto ipstreams \
154 $(ARCH_SUBDIRS
) streams urlget
))
155 libwvstreams.so
: $(libwvstreams_OBJS
) $(LIBWVUTILS
)
156 libwvstreams.so-LIBS
+= -lz
-lssl
-lcrypto
$(LIBS_PAM
)
157 configfile
/tests
/% streams
/tests
/% ipstreams
/tests
/% crypto
/tests
/% \
158 urlget
/tests
/% linuxstreams
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
161 # libuniconf: unified configuration system
163 TARGETS
+= libuniconf.so
164 TARGETS
+= uniconf
/daemon
/uniconfd uniconf
/tests
/uni
165 TESTS
+= $(call tests_cc
,uniconf
/tests
) uniconf
/tests
/uni
166 libuniconf_OBJS
+= $(filter-out $(BASEOBJS
) uniconf
/daemon
/uniconfd.o
, \
167 $(call objects
,uniconf uniconf
/daemon
))
168 libuniconf.so
: $(libuniconf_OBJS
) $(LIBWVSTREAMS
)
169 uniconf
/daemon
/uniconfd uniconf
/tests
/uni
: $(LIBUNICONF
)
170 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.o
$(LIBUNICONF
)
171 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.ini \
172 uniconf
/daemon
/uniconfd
.8
173 uniconf
/tests
/%: PRELIBS
+=$(LIBUNICONF
)
176 # libwvdbus: C++ DBus library based on wvstreams
178 ifneq ("$(with_dbus)", "no")
179 TARGETS
+= libwvdbus.so
180 TARGETS
+= dbus
/tests
/wvdbus dbus
/tests
/wvdbusd
181 TESTS
+= $(call tests_cc
,dbus
/tests
)
182 libwvdbus_OBJS
+= $(call objects
,dbus
)
183 libwvdbus.so
: $(libwvdbus_OBJS
) $(LIBWVSTREAMS
)
184 libwvdbus.so-LIBS
+= $(LIBS_DBUS
)
185 dbus
/tests
/%: PRELIBS
+=$(LIBWVDBUS
)
187 TEST_SKIP_OBJS
+= dbus
/t
/%
191 # libwvqt: helper library to make WvStreams work better in Qt event loops
193 ifneq ("$(with_qt)", "no")
194 TARGETS
+= libwvqt.so
195 TESTS
+= $(patsubst %.
cc,%,$(wildcard qt
/tests
/*.
cc))
196 libwvqt_OBJS
+= $(call objects
,qt
)
197 libwvqt.so
: $(libwvqt_OBJS
) $(LIBWVSTREAMS
)
198 libwvqt.so-LIBS
+= $(LIBS_QT
)
199 qt
/tests
/%: PRELIBS
+=$(LIBWVQT
)
201 qt
/wvqtstreamclone.o
: include/wvqtstreamclone.moc
202 qt
/wvqthook.o
: include/wvqthook.moc
206 # libwvstatic.a: all the wvstreams libraries in one static .a file, to make
207 # it easy to link your programs statically to wvstreams.
209 TARGETS
+= libwvstatic.a
213 $(libwvstreams_OBJS
) \
217 uniconf
/unigenhack_s.o \
221 # libwvtest: the WvTest tools for writing C++ unit tests
223 TARGETS
+= wvtestmain.o libwvtest.a
224 TESTOBJS
= utils
/wvtest.o
225 libwvtest.a
: wvtestmain.o
$(TESTOBJS
)
227 TARGETS_SO
= $(filter %.so
,$(TARGETS
))
228 TARGETS_A
= $(filter %.a
,$(TARGETS
))
230 all: config.mk
$(filter-out $(WV_EXCLUDES
), $(TARGETS
))
234 REAL_TESTS
= $(filter-out $(TEST_SKIP_OBJS
), $(TESTS
))
235 $(addsuffix .o
,$(REAL_TESTS
)):
238 test: all tests qtest
240 qtest
: all wvtestmain
241 LD_LIBRARY_PATH
="$(LD_LIBRARY_PATH):$(shell pwd)" $(WVTESTRUN
) $(MAKE
) runtests
244 $(VALGRIND
) .
/wvtestmain
'$(TESTNAME)'
245 ifeq ("$(TESTNAME)", "")
246 cd uniconf
/tests
&& DAEMON
=0 .
/unitest.sh
247 cd uniconf
/tests
&& DAEMON
=1 .
/unitest.sh
252 TEST_TARGETS
= $(filter-out $(TEST_SKIP_OBJS
), $(call objects
, $(filter-out win32
/%, \
253 $(shell find .
-type d
-name t
-printf
"%P\n"))))
255 TEST_TARGETS
= $(filter-out $(TEST_SKIP_OBJS
), $(call objects
, $(filter-out win32
/%, \
256 $(shell find .
-type d
-name t
-print))))
259 wvtestmain
: $(TEST_TARGETS
) $(LIBWVDBUS
) $(LIBUNICONF
) $(LIBWVSTREAMS
) $(LIBWVTEST
)
262 rm -f uniconf
/daemon
/uniconfd
.8 uniconf
/tests
/uni
263 rm -f config.mk config.log config.status \
264 include/wvautoconf.h config.cache \
266 rm -rf autom4te.cache
267 rm -rf argp
/autom4te.cache
268 rm -rf argp
/config.status argp
/config.log
269 rm -rf argp
/configure.lineno argp
/config.h
270 rm -rf argp
/Makefile argp
/testsuite
/Makefile
271 rm -rf argp
/testsuite
/ex1 argp
/testsuite
/ex2 argp
/testsuite
/ex3
272 rm -rf argp
/libargp.a argp
/stamp-h1
277 @
$(RM
) .junk
$(TARGETS
) uniconf
/daemon
/uniconfd \
278 $(TESTS
) tmp
*.ini uniconf
/daemon
/uniconfd.ini \
280 $(shell find .
-name
'*.o' -o
-name
'.*.d' \
281 -o
-name
'*~' -o
-name
'*.moc')
290 kdoc
-f html
-d Docs
/kdoc-html
--name wvstreams
--strip-h-path
*/*.h
298 install install-shared install-dev
uninstall \