1#
2# Makefile for win32 bacula executables
3# Using MinGW cross-compiler on GNU/Linux
4#
5#  Written by Robert Nelson, June 2006
6#
7
8include ../Makefile.inc
9
10INCLUDES = \
11	-I../../wx-console \
12	$(INCLUDE_BACULA) \
13	$(INCLUDE_WX) \
14	$(INCLUDE_PTHREADS) \
15	$(INCLUDE_OPENSSL) \
16	$(INCLUDE_ICONS)
17
18DEFINES = \
19	-DUSING_DLL \
20	-DHAVE_WXCONSOLE \
21	-D__WXMSW__ \
22	-DWXUSINGDLL \
23	-D_STAT_H \
24	-D_STAT_DEFINED \
25	$(HAVES)
26
27vpath %.c $(MAINDIR)/src/wx-console
28vpath %.cpp $(MAINDIR)/src/wx-console
29vpath %.rc $(MAINDIR)/src/wx-console
30
31##########################################################################
32
33# Files in $(MAINDIR)/src/wx-console
34
35CONSOLE_OBJS = \
36	$(OBJDIR)/authenticate.o \
37	$(OBJDIR)/console_conf.o \
38	$(OBJDIR)/console_thread.o \
39	$(OBJDIR)/main.o \
40	$(OBJDIR)/wxbconfigfileeditor.o \
41	$(OBJDIR)/wxbconfigpanel.o \
42	$(OBJDIR)/wxbhistorytextctrl.o \
43	$(OBJDIR)/wxblistctrl.o \
44	$(OBJDIR)/wxbmainframe.o \
45	$(OBJDIR)/wxbrestorepanel.o \
46	$(OBJDIR)/wxbtableparser.o \
47	$(OBJDIR)/wxbtreectrl.o \
48	$(OBJDIR)/wxbutils.o \
49	$(OBJDIR)/wx-console_private.res
50
51ALL_OBJS = $(CONSOLE_OBJS)
52
53CONSOLE_LIBS = \
54	$(LIBS_WX) \
55	$(LIBS_NETWORK) \
56	-lcomctl32 \
57	-lole32 \
58	-loleaut32 \
59	-luuid
60
61######################################################################
62
63# Targets
64
65.PHONY: all clean
66
67all: $(BINDIR)/bwx-console.exe
68
69clean:
70	$(call clean_obj,$(ALL_OBJS))
71	$(call clean_exe,$(BINDIR)/bwx-console.exe)
72	$(call clean_exe,$(BINDIR)/wx-console.exe)
73	$(ECHO_CMD)rm -rf $(OBJDIRS)
74
75#
76# Rules
77#
78
79$(BINDIR)/bwx-console.exe: $(CONSOLE_OBJS) $(LIBS_BACULA)
80	$(call link_winapp,$(CONSOLE_LIBS))
81
82$(OBJDIR)/wx-console_private.res: wx-console_private.rc
83	@echo "Compiling $@"
84	$(call checkdir,$@)
85	$(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -I$(MAINDIR)/src/wx-console -O coff $< -o $@
86
87include ../Makefile.rules
88