10 sed
-e
's/#VERSION#/$(WVPACKAGE_VERSION)/g' < $< > $@
12 ifeq ("$(enable_testgui)", "no")
16 LIBS
+= $(LIBS_XPLC
) -lm
19 # libwvbase: a the minimal code needed to link a wvstreams program.
22 utils
/wvbuffer.o utils
/wvbufferstore.o \
25 streams
/wvfdstream.o \
32 utils
/wvscatterhash.o utils
/wvsorter.o \
34 utils
/wvstring.o utils
/wvstringlist.o \
35 utils
/wvstringmask.o \
39 streams
/wvistreamlist.o \
40 utils
/wvstreamsdebugger.o \
44 uniconf
/uniconfgen.o uniconf
/uniconfkey.o uniconf
/uniconfroot.o \
45 uniconf
/unihashtree.o \
46 uniconf
/unimountgen.o \
47 uniconf
/unitempgen.o \
51 utils
/wvstringcache.o \
53 uniconf
/unigenhack.o \
54 uniconf
/unilistiter.o \
56 streams
/wvstreamclone.o \
57 streams
/wvconstream.o \
59 TARGETS
+= libwvbase.so
60 libwvbase_OBJS
+= $(filter-out uniconf
/unigenhack.o
$(WV_EXCLUDES
),$(BASEOBJS
))
61 libwvbase.so
: $(libwvbase_OBJS
) uniconf
/unigenhack.o
62 libwvbase.so-LIBS
+= $(LIBXPLC
)
65 # libwvutils: handy utility library for C++
67 TARGETS
+= libwvutils.so
68 TESTS
+= $(call tests_cc
,utils
/tests
)
69 libwvutils_OBJS
+= $(filter-out $(BASEOBJS
) $(TESTOBJS
),$(call objects
,utils
))
70 libwvutils.so
: $(libwvutils_OBJS
) $(LIBWVBASE
)
71 libwvutils.so-LIBS
+= -lz
-lcrypt
$(LIBS_PAM
)
72 utils
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
75 # libwvstreams: stream/event handling library
77 TARGETS
+= libwvstreams.so
78 TARGETS
+= crypto
/tests
/ssltest ipstreams
/tests
/unixtest
79 TARGETS
+= crypto
/tests
/printcert
80 ifneq ("$(with_readline)", "no")
81 TARGETS
+= ipstreams
/tests
/wsd
82 ipstreams
/tests
/wsd-LIBS
+= -lreadline
84 TEST_SKIP_OBJS
+= ipstreams
/tests
/wsd
86 TESTS
+= $(call tests_cc
,configfile
/tests
)
87 TESTS
+= $(call tests_cc
,streams
/tests
)
88 TESTS
+= $(call tests_cc
,ipstreams
/tests
)
89 TESTS
+= $(call tests_cc
,crypto
/tests
)
90 TESTS
+= $(call tests_cc
,urlget
/tests
)
91 TESTS
+= $(call tests_cc
,linuxstreams
/tests
)
92 libwvstreams_OBJS
+= $(filter-out $(BASEOBJS
), \
93 $(call objects
,configfile crypto ipstreams \
94 $(ARCH_SUBDIRS
) streams urlget
))
95 libwvstreams.so
: $(libwvstreams_OBJS
) $(LIBWVUTILS
)
96 libwvstreams.so-LIBS
+= -lz
-lssl
-lcrypto
$(LIBS_PAM
)
97 configfile
/tests
/% streams
/tests
/% ipstreams
/tests
/% crypto
/tests
/% \
98 urlget
/tests
/% linuxstreams
/tests
/%: PRELIBS
+=$(LIBWVSTREAMS
)
101 # libuniconf: unified configuration system
103 TARGETS
+= libuniconf.so
104 TARGETS
+= uniconf
/daemon
/uniconfd uniconf
/tests
/uni
105 TESTS
+= $(call tests_cc
,uniconf
/tests
) uniconf
/tests
/uni
106 libuniconf_OBJS
+= $(filter-out $(BASEOBJS
) uniconf
/daemon
/uniconfd.o
, \
107 $(call objects
,uniconf uniconf
/daemon
))
108 libuniconf.so
: $(libuniconf_OBJS
) $(LIBWVSTREAMS
)
109 uniconf
/daemon
/uniconfd uniconf
/tests
/uni
: $(LIBUNICONF
)
110 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.o
$(LIBUNICONF
)
111 uniconf
/daemon
/uniconfd
: uniconf
/daemon
/uniconfd.ini \
112 uniconf
/daemon
/uniconfd
.8
113 uniconf
/tests
/%: PRELIBS
+=$(LIBUNICONF
)
116 # libwvdbus: C++ DBus library based on wvstreams
118 ifneq ("$(with_dbus)", "no")
119 TARGETS
+= libwvdbus.so
120 TARGETS
+= dbus
/tests
/wvdbus dbus
/tests
/wvdbusd
121 TESTS
+= $(call tests_cc
,dbus
/tests
)
122 libwvdbus_OBJS
+= $(call objects
,dbus
)
123 libwvdbus.so
: $(libwvdbus_OBJS
) $(LIBWVSTREAMS
)
124 libwvdbus.so-LIBS
+= $(LIBS_DBUS
)
125 dbus
/tests
/%: PRELIBS
+=$(LIBWVDBUS
)
127 TEST_SKIP_OBJS
+= dbus
/t
/%
131 # libwvqt: helper library to make WvStreams work better in Qt event loops
133 ifneq ("$(with_qt)", "no")
134 TARGETS
+= libwvqt.so
135 TESTS
+= $(patsubst %.
cc,%,$(wildcard qt
/tests
/*.
cc))
136 libwvqt_OBJS
+= $(call objects
,qt
)
137 libwvqt.so
: $(libwvqt_OBJS
) $(LIBWVSTREAMS
)
138 libwvqt.so-LIBS
+= $(LIBS_QT
)
139 qt
/tests
/%: PRELIBS
+=$(LIBWVQT
)
141 qt
/wvqtstreamclone.o
: include/wvqtstreamclone.moc
142 qt
/wvqthook.o
: include/wvqthook.moc
146 # libwvstatic.a: all the wvstreams libraries in one static .a file, to make
147 # it easy to link your programs statically to wvstreams.
149 TARGETS
+= libwvstatic.a
153 $(libwvstreams_OBJS
) \
157 uniconf
/unigenhack_s.o
160 # libwvtest: the WvTest tools for writing C++ unit tests
162 TARGETS
+= wvtestmain.o libwvtest.a
163 TESTOBJS
= utils
/wvtest.o
164 libwvtest.a
: wvtestmain.o
$(TESTOBJS
)
167 # Some example programs
169 TARGETS
+= examples
/wvgrep
/wvgrep examples
/wvgrep
/wvegrep
170 examples
/wvgrep
/wvgrep
: examples
/wvgrep
/wvgrep.o
$(LIBWVSTREAMS
)
171 examples
/wvgrep
/wvegrep
: examples
/wvgrep
/wvgrep
175 TARGETS_SO
= $(filter %.so
,$(TARGETS
))
176 TARGETS_A
= $(filter %.a
,$(TARGETS
))
178 all: $(filter-out $(WV_EXCLUDES
), $(TARGETS
))
182 REAL_TESTS
= $(filter-out $(TEST_SKIP_OBJS
), $(TESTS
))
183 $(addsuffix .o
,$(REAL_TESTS
)):
186 test: all tests qtest
188 qtest
: all wvtestmain
189 LD_LIBRARY_PATH
="$(LD_LIBRARY_PATH):$(WVSTREAMS_LIB)" $(WVTESTRUN
) $(MAKE
) runtests
192 $(VALGRIND
) .
/wvtestmain
'$(TESTNAME)'
193 ifeq ("$(TESTNAME)", "")
194 cd uniconf
/tests
&& DAEMON
=0 .
/unitest.sh
195 cd uniconf
/tests
&& DAEMON
=1 .
/unitest.sh
199 $(filter-out $(TEST_SKIP_OBJS
), $(call objects
, $(filter-out win32
/%, \
200 $(shell find .
-type d
-name t
-printf
"%P\n")))) \
201 $(LIBWVDBUS
) $(LIBUNICONF
) $(LIBWVSTREAMS
) $(LIBWVTEST
)
204 rm -f uniconf
/daemon
/uniconfd
.8 uniconf
/tests
/uni
205 rm -f config.mk config.log config.status \
206 include/wvautoconf.h config.cache reconfigure \
207 stamp-h.in configure
include/wvautoconf.h.in
208 rm -rf autom4te.cache
213 @
rm -fv .junk
$(TARGETS
) uniconf
/daemon
/uniconfd \
214 $(TESTS
) tmp
*.ini uniconf
/daemon
/uniconfd.ini \
216 $(shell find .
-name
'*.o' -o
-name
'.*.d' \
217 -o
-name
'*~' -o
-name
'*.moc')
226 kdoc
-f html
-d Docs
/kdoc-html
--name wvstreams
--strip-h-path
*/*.h
234 install install-shared install-dev
uninstall \