2 WVSTREAMS_SRC
= # Clear WVSTREAMS_SRC so wvrules.mk uses its WVSTREAMS_foo
5 override enable_efence
=no
8 $(error
"Use 'make -f Makefile-win32' instead!")
19 all: runconfigure xplc
$(TARGETS
)
21 .PHONY
: xplc xplc
/clean install-xplc
26 ifeq ("$(build_xplc)", "yes")
35 $(INSTALL
) -d
$(DESTDIR
)$(includedir)/wvstreams
/xplc
36 $(INSTALL_DATA
) $(wildcard xplc
/include/xplc
/*.h
) $(DESTDIR
)$(includedir)/wvstreams
/xplc
37 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
38 $(INSTALL_DATA
) xplc
/libxplc-cxx.a
$(DESTDIR
)$(libdir)
42 .PHONY
: clean depend dust kdoc doxygen
install install-shared install-dev install-xplc
uninstall tests dishes
dist distclean realclean test
44 # FIXME: little trick to ensure that the wvautoconf.h.in file is there
45 .PHONY
: dist-hack-clean
52 # Comment this assignment out for a release.
54 SNAPDATE
=+$(shell date
+%Y
%m
%d
)
57 dist-hook
: dist-hack-clean configure
58 @
rm -rf autom4te.cache
59 @if
test -d .xplc
; then \
60 echo
'--> Preparing XPLC for dist...'; \
61 $(MAKE
) -C .xplc
clean patch
&& \
62 cp
-Lpr .xplc
/build
/xplc .
; \
65 runconfigure
: config.mk
include/wvautoconf.h
68 configure
=$(error Please run the
"configure" script
)
73 config.mk
: configure config.mk.in
76 include/wvautoconf.h
: include/wvautoconf.h.in
79 # FIXME: there is some confusion here
81 aclocal.m4
: acinclude.m4
82 $(warning
"$@" is old
, please run
"aclocal")
84 configure
: configure.ac config.mk.in
include/wvautoconf.h.in aclocal.m4
85 $(warning
"$@" is old
, please run
"autoconf")
87 include/wvautoconf.h.in
: configure.ac aclocal.m4
88 $(warning
"$@" is old
, please run
"autoheader")
90 aclocal.m4
: acinclude.m4
94 configure
: configure.ac
include/wvautoconf.h.in aclocal.m4
96 @
rm -f config.mk
include/wvautoconf.h
99 include/wvautoconf.h.in
: configure.ac aclocal.m4
106 @list
=`echo $(wildcard $(1))`; \
107 test -z
"$${list}" || sh
-c
"rm -rf $${list}"
111 @list
=`echo $(wildcard $(1))`; \
112 test -z
"$${list}" || sh
-cx
"rm -rf $${list}"
117 $(call wild_clean
,$(REALCLEAN
))
121 $(call wild_clean
,$(DISTCLEAN
))
122 @
rm -rf autom4te.cache
123 @
rm -f pkgconfig
/*.
pc
126 clean: depend dust xplc
/clean
128 $(call wild_clean
,$(TARGETS
) uniconf
/daemon
/uniconfd \
129 $(GARBAGE
) $(TESTS
) tmp.ini \
130 $(shell find .
-name
'*.o' -o
-name
'*.moc'))
133 $(call wild_clean
,$(shell find .
-name
'.*.d'))
136 $(call wild_clean
,$(shell find .
-name
'core' -o
-name
'*~' -o
-name
'.#*') $(wildcard *.d
))
139 kdoc
-f html
-d Docs
/kdoc-html
--name wvstreams
--strip-h-path
*/*.h
144 ifeq ("$(with_readline)", "no")
145 install: install-shared install-dev install-xplc install-uniconfd
147 install: install-shared install-dev install-xplc install-uniconfd install-wsd
150 install-shared
: $(TARGETS_SO
)
151 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
152 for i in
$(TARGETS_SO
); do \
153 $(INSTALL_PROGRAM
) $$i.
$(SO_VERSION
) $(DESTDIR
)$(libdir)/ ; \
155 $(INSTALL
) -d
$(DESTDIR
)$(sysconfdir
)
156 $(INSTALL_DATA
) uniconf
/daemon
/uniconf.conf
$(DESTDIR
)$(sysconfdir
)/
158 install-dev
: $(TARGETS_SO
) $(TARGETS_A
)
159 $(INSTALL
) -d
$(DESTDIR
)$(includedir)/wvstreams
160 $(INSTALL_DATA
) $(wildcard include/*.h
) $(DESTDIR
)$(includedir)/wvstreams
161 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
162 for i in
$(TARGETS_A
); do \
163 $(INSTALL_DATA
) $$i $(DESTDIR
)$(libdir); \
165 cd
$(DESTDIR
)$(libdir) && for i in
$(TARGETS_SO
); do \
167 $(LN_S
) $$i.
$(SO_VERSION
) $$i; \
169 $(INSTALL
) -d
$(DESTDIR
)$(libdir)/pkgconfig
170 $(INSTALL_DATA
) $(filter-out %-uninstalled.
pc, $(wildcard pkgconfig
/*.
pc)) $(DESTDIR
)$(libdir)/pkgconfig
171 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
172 $(INSTALL
) wvtesthelper wvtestmeter
$(DESTDIR
)$(bindir)
173 $(INSTALL
) -d
$(DESTDIR
)$(libdir)/valgrind
174 $(INSTALL
) wvstreams.supp
$(DESTDIR
)$(libdir)/valgrind
176 uniconfd
: uniconf
/daemon
/uniconfd uniconf
/daemon
/uniconfd.ini \
177 uniconf
/daemon
/uniconfd
.8
179 install-uniconfd
: uniconfd uniconf
/tests
/uni uniconf
/tests
/uni
.8
180 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
181 $(INSTALL_PROGRAM
) uniconf
/tests
/uni
$(DESTDIR
)$(bindir)/
182 $(INSTALL
) -d
$(DESTDIR
)$(sbindir
)
183 $(INSTALL_PROGRAM
) uniconf
/daemon
/uniconfd
$(DESTDIR
)$(sbindir
)/
184 $(INSTALL
) -d
$(DESTDIR
)$(localstatedir
)/lib
/uniconf
185 touch
$(DESTDIR
)$(localstatedir
)/lib
/uniconf
/uniconfd.ini
186 $(INSTALL
) -d
$(DESTDIR
)$(mandir)/man8
187 $(INSTALL_DATA
) uniconf
/daemon
/uniconfd
.8 $(DESTDIR
)$(mandir)/man8
188 $(INSTALL_DATA
) uniconf
/tests
/uni
.8 $(DESTDIR
)$(mandir)/man8
190 install-wsd
: ipstreams
/tests
/wsd
191 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
192 $(INSTALL_PROGRAM
) ipstreams
/tests
/wsd
$(DESTDIR
)$(bindir)/
197 $(TESTS
): $(LIBUNICONF
) $(LIBWVTEST
) $(LIBWVDBUS
)
198 $(addsuffix .o
,$(TESTS
)):
201 include $(filter-out xplc
%,$(wildcard */rules.mk
*/*/rules.mk
)) /dev
/null
203 -include $(shell find .
-name
'.*.d') /dev
/null
205 test: runconfigure
all tests qtest
207 qtest
: runconfigure
all wvtestmain
208 LD_LIBRARY_PATH
="$(LD_LIBRARY_PATH):$(WVSTREAMS_LIB)" $(WVTESTRUN
) $(MAKE
) runtests
211 $(VALGRIND
) .
/wvtestmain
'$(TESTNAME)'
212 ifeq ("$(TESTNAME)", "unitest")
213 cd uniconf
/tests
&& DAEMON
=0 .
/unitest.sh
214 cd uniconf
/tests
&& DAEMON
=1 .
/unitest.sh
218 $(call objects
, $(filter-out .
/Win32WvStreams
/%, \
219 $(shell find .
-type d
-name t
))) \
220 $(LIBWVDBUS
) $(LIBUNICONF
) $(LIBWVSTREAMS
) $(LIBWVTEST
)