18 WV_EXCLUDES
+= linuxstreams
/tests
/aliastest linuxstreams
/tests
/ifctest linuxstreams
/tests
/routetest qt
/tests
/qtstringtest
19 TEST_SKIP_OBJS
+= linuxstreams
/t
/%
26 sed
-e
's/#VERSION#/$(WVPACKAGE_VERSION)/g' < $< > $@
28 ifeq ("$(enable_testgui)", "no")
34 ifeq ($(USE_WVSTREAMS_ARGP
),1)
35 utils
/wvargs.o-CPPFLAGS
+= -Iargp
36 libwvutils.so-LIBS
+= -Largp
-largp
38 # argp does its own dependency checking, so let's call it once per wvstreams
39 # build, in case some system dependencies have changed and argp should be
41 ARGP_TARGET
=argp
/libargp.list
42 TARGETS
+= $(ARGP_TARGET
)
46 # Warning! Crucial! KEEP THIS SEMICOLON HERE! Without it, if you blow away
47 # $(ARGP_TARGET), $(MAKE) will get confused.
48 $(ARGP_TARGET
): argp
/all;
54 # libwvbase: a the minimal code needed to link a wvstreams program.
57 utils
/wvbuffer.o utils
/wvbufferstore.o \
60 streams
/wvfdstream.o \
67 utils
/wvscatterhash.o utils
/wvsorter.o \
69 utils
/wvstring.o utils
/wvstringlist.o \
70 utils
/wvstringmask.o \
74 streams
/wvistreamlist.o \
75 utils
/wvstreamsdebugger.o \
79 uniconf
/uniconfgen.o uniconf
/uniconfkey.o uniconf
/uniconfroot.o \
80 uniconf
/unihashtree.o \
81 uniconf
/unimountgen.o \
82 uniconf
/unitempgen.o \
86 utils
/wvstringcache.o \
88 uniconf
/unigenhack.o \
89 uniconf
/unilistiter.o \
91 streams
/wvstreamclone.o \
92 streams
/wvconstream.o \
96 xplc-cxx
/strtouuid.o \
97 xplc-cxx
/uuidtostr.o \
103 xplc
/moduleloader.o \
110 TARGETS
+= libwvbase.so
111 libwvbase_OBJS
+= $(filter-out uniconf
/unigenhack.o
$(WV_EXCLUDES
),$(BASEOBJS
))
112 libwvbase.so
: $(libwvbase_OBJS
) uniconf
/unigenhack.o
113 libwvbase.so-LIBS
+= $(LIBXPLC
)
116 # libwvutils: handy utility library for C++
118 TARGETS
+= libwvutils.so
119 TESTS
+= $(call tests_cc
,utils
/tests
)
120 libwvutils_OBJS
+= $(filter-out $(BASEOBJS
) $(TESTOBJS
),$(call objects
,utils
))
121 libwvutils.so
: $(libwvutils_OBJS
) $(LIBWVBASE
) $(ARGP_TARGET
)
123 libwvutils.so-LIBS
+= -lz
-lcrypt
$(LIBS_PAM
)
125 libwvutils.so-LIBS
+= -lz
$(LIBS_PAM
)
128 utils
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
131 # libwvstreams: stream/event handling library
133 TARGETS
+= libwvstreams.so
134 TARGETS
+= crypto
/tests
/ssltest ipstreams
/tests
/unixtest
135 TARGETS
+= crypto
/tests
/printcert
138 ifneq ("$(with_readline)", "no")
139 TARGETS
+= ipstreams
/tests
/wsd
140 ipstreams
/tests
/wsd-LIBS
+= -lreadline
142 TEST_SKIP_OBJS
+= ipstreams
/tests
/wsd
145 TEST_SKIP_OBJS
+= ipstreams
/tests
/wsd
148 TESTS
+= $(call tests_cc
,configfile
/tests
)
149 TESTS
+= $(call tests_cc
,streams
/tests
)
150 TESTS
+= $(call tests_cc
,ipstreams
/tests
)
151 TESTS
+= $(call tests_cc
,crypto
/tests
)
152 TESTS
+= $(call tests_cc
,urlget
/tests
)
153 TESTS
+= $(call tests_cc
,linuxstreams
/tests
)
154 libwvstreams_OBJS
+= $(filter-out $(BASEOBJS
), \
155 $(call objects
,configfile crypto ipstreams \
156 $(ARCH_SUBDIRS
) streams urlget
))
157 libwvstreams.so
: $(libwvstreams_OBJS
) $(LIBWVUTILS
)
158 libwvstreams.so-LIBS
+= -lz
-lssl
-lcrypto
$(LIBS_PAM
)
159 configfile
/tests
/% streams
/tests
/% ipstreams
/tests
/% crypto
/tests
/% \
160 urlget
/tests
/% linuxstreams
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
163 # libuniconf: unified configuration system
165 TARGETS
+= libuniconf.so
166 TARGETS
+= uniconf
/daemon
/uniconfd uniconf
/tests
/uni
167 TESTS
+= $(call tests_cc
,uniconf
/tests
) uniconf
/tests
/uni
168 libuniconf_OBJS
+= $(filter-out $(BASEOBJS
) uniconf
/daemon
/uniconfd.o
, \
169 $(call objects
,uniconf uniconf
/daemon
))
170 libuniconf.so
: $(libuniconf_OBJS
) $(LIBWVSTREAMS
)
171 uniconf
/daemon
/uniconfd uniconf
/tests
/uni
: $(LIBUNICONF
)
172 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.o
$(LIBUNICONF
)
173 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.ini \
174 uniconf
/daemon
/uniconfd
.8
175 uniconf
/tests
/%: PRELIBS
+=$(LIBUNICONF
)
178 # libwvdbus: C++ DBus library based on wvstreams
180 ifneq ("$(with_dbus)", "no")
181 TARGETS
+= libwvdbus.so
182 TARGETS
+= dbus
/tests
/wvdbus dbus
/tests
/wvdbusd
183 TESTS
+= $(call tests_cc
,dbus
/tests
)
184 libwvdbus_OBJS
+= $(call objects
,dbus
)
185 libwvdbus.so
: $(libwvdbus_OBJS
) $(LIBWVSTREAMS
)
186 libwvdbus.so-LIBS
+= $(LIBS_DBUS
)
187 dbus
/tests
/%: PRELIBS
+=$(LIBWVDBUS
)
189 TEST_SKIP_OBJS
+= dbus
/t
/%
193 # libwvqt: helper library to make WvStreams work better in Qt event loops
194 # This is not made to work with MacOS, so let's not ask it to.
196 ifneq ("$(with_qt)", "no")
197 TARGETS
+= libwvqt.so
198 TESTS
+= $(patsubst %.
cc,%,$(wildcard qt
/tests
/*.
cc))
199 libwvqt_OBJS
+= $(call objects
,qt
)
200 libwvqt.so
: $(libwvqt_OBJS
) $(LIBWVSTREAMS
)
201 libwvqt.so-LIBS
+= $(LIBS_QT
)
202 qt
/tests
/%: PRELIBS
+=$(LIBWVQT
)
204 qt
/wvqtstreamclone.o
: include/wvqtstreamclone.moc
205 qt
/wvqthook.o
: include/wvqthook.moc
209 # libwvstatic.a: all the wvstreams libraries in one static .a file, to make
210 # it easy to link your programs statically to wvstreams.
212 TARGETS
+= libwvstatic.a
216 $(libwvstreams_OBJS
) \
220 uniconf
/unigenhack_s.o \
224 # libwvtest: the WvTest tools for writing C++ unit tests
226 TARGETS
+= wvtestmain.o libwvtest.a
227 TESTOBJS
= utils
/wvtest.o
228 libwvtest.a
: wvtestmain.o
$(TESTOBJS
)
230 TARGETS_SO
= $(filter %.so
,$(TARGETS
))
231 TARGETS_A
= $(filter %.a
,$(TARGETS
))
233 all: config.mk
$(filter-out $(WV_EXCLUDES
), $(TARGETS
))
237 REAL_TESTS
= $(filter-out $(TEST_SKIP_OBJS
), $(TESTS
))
238 $(addsuffix .o
,$(REAL_TESTS
)):
241 test: all tests qtest
243 qtest
: all wvtestmain
244 LD_LIBRARY_PATH
="$(LD_LIBRARY_PATH):$(shell pwd)" $(WVTESTRUN
) $(MAKE
) runtests
247 $(VALGRIND
) .
/wvtestmain
'$(TESTNAME)'
248 ifeq ("$(TESTNAME)", "")
249 cd uniconf
/tests
&& DAEMON
=0 .
/unitest.sh
250 cd uniconf
/tests
&& DAEMON
=1 .
/unitest.sh
254 TEST_TARGETS
= $(filter-out $(TEST_SKIP_OBJS
), $(call objects
, $(filter-out win32
/%, \
255 $(shell find .
-type d
-name t | sed
's,^\./,,'))))
257 wvtestmain
: $(TEST_TARGETS
) $(LIBWVDBUS
) $(LIBUNICONF
) $(LIBWVSTREAMS
) $(LIBWVTEST
)
260 rm -f uniconf
/daemon
/uniconfd
.8 uniconf
/tests
/uni
261 rm -f config.mk config.log config.status \
262 include/wvautoconf.h config.cache \
264 rm -rf autom4te.cache
265 rm -rf argp
/autom4te.cache
266 rm -rf argp
/config.status argp
/config.log
267 rm -rf argp
/configure.lineno argp
/config.h
268 rm -rf argp
/Makefile argp
/testsuite
/Makefile
269 rm -rf argp
/testsuite
/ex1 argp
/testsuite
/ex2 argp
/testsuite
/ex3
270 rm -rf argp
/libargp.a argp
/stamp-h1
275 @
$(RM
) .junk
$(TARGETS
) uniconf
/daemon
/uniconfd \
276 $(TESTS
) tmp
*.ini uniconf
/daemon
/uniconfd.ini \
278 $(shell find .
-name
'*.o' -o
-name
'.*.d' \
279 -o
-name
'*~' -o
-name
'*.moc')
288 kdoc
-f html
-d Docs
/kdoc-html
--name wvstreams
--strip-h-path
*/*.h
296 install install-shared install-dev
uninstall \
300 @echo tests
: $(TESTS
)
301 @echo real_tests
: $(REAL_TESTS
)
302 @echo skip_tests
: $(TEST_SKIP_OBJS
)
303 @echo excluded_items
: $(WV_EXCLUDES
)
304 @echo targets
: $(TARGETS
)