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