]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/Makefile
Add src/win32/newinstaller -- single file installer
[bacula/bacula] / bacula / src / win32 / Makefile
1 ECHO_CMD=@
2
3 DIRS=   dll \
4         cats \
5         filed \
6         filed/plugins \
7         dird \
8         stored \
9         console \
10         wx-console \
11         tools \
12         scripts
13
14 .PHONY: $(DIRS) clean all Makefile.inc installer newinstaller
15
16 all: Makefile.inc $(DIRS) installer newinstaller
17
18 clean: $(DIRS)
19         $(ECHO_CMD)-rm -rf release
20
21 newinstaller:
22         @if test -f Makefile.inc; then \
23            if $(MAKE) -C $@ $(MAKECMDGOALS); then \
24                 echo "\n===== Make of $@ succeeded =====\n\n" ; \
25            else  \
26                 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
27            fi ; \
28         fi
29
30 installer:
31         @if test -f Makefile.inc; then \
32            if $(MAKE) -C $@ $(MAKECMDGOALS); then \
33                 echo "\n===== Make of $@ succeeded =====\n\n" ; \
34            else  \
35                 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
36            fi ; \
37         fi
38
39 $(DIRS):
40         @if test -f Makefile.inc; then \
41            if $(MAKE) -C $@ $(MAKECMDGOALS); then \
42                 echo "\n===== Make of $@ succeeded =====\n\n" ; \
43            else  \
44                 echo "\n!!!!! Make of $@ failed !!!!!\n\n" ; \
45            fi ; \
46         fi
47
48 Makefile.inc:
49         @echo Creating $@
50         $(ECHO_CMD)TOPDIR=`(cd ../../..;pwd)`; \
51         if test -e ../../../cross-tools/mingw32/bin/mingw32-gcc; then \
52                 BINDIR=$${TOPDIR}/cross-tools/mingw32/bin; \
53                 INCDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/include; \
54                 DLLDIR=$${TOPDIR}/cross-tools/mingw32/mingw32/bin; \
55         elif test -e /mingw/bin/mingw32-gcc; then \
56                 BINDIR=/mingw/bin; \
57                 INCDIR=/mingw/include; \
58                 DLLDIR=/mingw/bin; \
59         else \
60                 echo "\nThe GCC cross compiler isn't installed."; \
61                 echo "You must run build-win32-cross-tools and build-dependencies first.\n"; \
62                 exit 1; \
63         fi ; \
64         BUILDDIR=`(pwd)`; \
65         MAINDIR=`(cd ../..;pwd)`; \
66         sed \
67                 -e "s^@WIN32BUILDDIR@^$${BUILDDIR}^" \
68                 -e "s^@WIN32MAINDIR@^$${MAINDIR}^" \
69                 -e "s^@WIN32TOPDIR@^$${TOPDIR}^" \
70                 -e "s^@WIN32BINDIR@^$${BINDIR}^" \
71                 -e "s^@WIN32INCDIR@^$${INCDIR}^" \
72                 -e "s^@WIN32DLLDIR@^$${DLLDIR}^" < Makefile.inc.in > $@