2 # Makefile for win32 bacula executables
3 # Using MinGW cross-compiler on GNU/Linux
5 # Written by Robert Nelson, June 2006
8 include ../Makefile.inc
10 VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
13 -DVERSION=$(VERSION) \
14 -DOUT_DIR=..\\release32 \
16 -DBUILD_TOOLS=MinGW32 \
18 -DBUILD_BAT=$(BUILD_BAT)
20 INSTALL_EXE := $(BUILDDIR)/release32/winbacula-$(VERSION).exe
31 BACULA_BINARIES=$(BACULABINARIES)
34 BACULA_BINARIES=$(BACULABINARIES) bat.exe bacula-tray-monitor.exe
70 docs/manuals/en/console/console.pdf \
71 docs/manuals/en/main/main.pdf \
72 docs/manuals/en/misc/misc.pdf \
73 docs/manuals/en/problems/problems.pdf \
74 docs/manuals/en/utility/utility.pdf
76 ##########################################################################
80 .PHONY: all clean installer
82 all: $(HELP) $(INSTALL_EXE)
84 installer: $(HELP) $(INSTALL_EXE)
87 @echo "Cleaning `pwd`"
88 $(CMD_ECHO)-rm -f $(INSTALL_EXE)
89 $(CMD_ECHO)-rm -rf release32
93 mkdir -p release32/help
94 cp -f $(BINDIR)/help/* release32/help/
101 define Convert_Binary
102 release32/$$(notdir $(1)): $(1)
103 $$(call checkdir,$$@)
104 $(ECHO_CMD)cp -f $$^ $$@ ; \
109 release32/$$(notdir $(1)): $(1)
110 $$(call checkdir,$$@)
111 $(ECHO_CMD)cp -f $$^ $$@
115 release32/$(1): $(DOCDIR)/$(1)
116 $$(call checkdir,$$@)
117 $(ECHO_CMD)cp -f $$^ $$(dir $$@)
120 $(foreach file,$(addprefix $(DEPKGS)/bin/, $(DEPKGS_BINARIES)),$(eval $(call Convert_Binary,$(file))))
122 $(foreach file,$(addprefix $(DEPKGS)/bin/, $(NONGCC_BINARIES)),$(eval $(call Copy_Binary,$(file))))
124 $(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Copy_Binary,$(file))))
126 $(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Convert_Binary,$(file))))
128 $(foreach file,$(addprefix $(MINGW_DLLDIR)/, $(MINGW_BINARIES)),$(eval $(call Copy_Binary,$(file))))
130 $(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file))))
132 $(foreach file,$(addprefix ../scripts/, $(SCRIPT_FILES)),$(eval $(call Copy_Binary,$(file))))
134 $(foreach file,$(addprefix ../cats/, $(CAT_FILES)),$(eval $(call Copy_Binary,$(file))))
136 $(foreach file,$(addprefix ../../dird/, $(DIRD_FILES)),$(eval $(call Copy_Binary,$(file))))
138 $(foreach file,$(DOC_FILES),$(eval $(call Copy_Docs,$(file))))
142 $(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(DOC_FILES))
143 NSISDIR=$(NSIS_DIR) \
144 echo "$(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi"
145 $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi
147 include $(BUILDDIR)/Makefile.rules