]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/Makefile
A better fix for the WIN32_VSS bug that Kern discovered.
[bacula/bacula] / bacula / src / win32 / Makefile
1 ECHO_CMD=@
2
3 DIRS=   dll \
4         cats \
5         filed \
6         dird \
7         stored \
8         console \
9         wx-console \
10         tools \
11         installer
12
13 .PHONY: $(DIRS) clean all
14
15 all: Makefile.inc $(DIRS)
16
17 clean: $(DIRS)
18         $(ECHO_CMD)-rm -rf release
19
20 $(DIRS):
21         @if $(MAKE) -C $@ $(MAKECMDGOALS); then \
22                 echo -e "\n===== Make of $@ succeeded =====\n\n" ; \
23         else \
24                 echo -e "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
25         fi
26
27 Makefile.inc: Makefile.inc.in
28         @echo Creating $@
29         $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
30         if test -e ../../../cross-tools/mingw32/bin/mingw32-gcc; then \
31                 BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
32                 INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
33         elif test -e /mingw/bin/mingw32-gcc; then \
34                 BINDIR=/mingw/bin; \
35                 INCDIR=/mingw/include; \
36         else \
37                 echo -e "\nThe GCC cross compiler isn't installed."; \
38                 echo -e "You must run build-win32-cross-tools and build-dependencies first.\n"; \
39                 exit 1; \
40         fi ; \
41         sed -e "s^@TOPDIR@^$${TOPDIR}^" \
42                 -e "s^@BINDIR@^$${BINDIR}^" \
43                 -e "s^@INCDIR@^$${INCDIR}^" < Makefile.inc.in > $@