14 # this dir relative to top dir
15 thisdir = src/wx-console
23 CONSSRCS = main.cpp console_thread.cpp authenticate.c console_conf.c wxbrestorepanel.cpp \
24 wxbmainframe.cpp wxbtableparser.cpp wxbtreectrl.cpp wxblistctrl.cpp wxbutils.cpp \
25 wxbconfigpanel.cpp wxbconfigfileeditor.cpp wxbhistorytextctrl.cpp
26 CONSOBJS = main.o console_thread.o authenticate.o console_conf.o wxbrestorepanel.o \
27 wxbmainframe.o wxbtableparser.o wxbtreectrl.o wxblistctrl.o wxbutils.o \
28 wxbconfigpanel.o wxbconfigfileeditor.o wxbhistorytextctrl.o
30 win32 = wx-console_private.res
34 macosx = wx-console.app
36 MACOSXAPP = $(@MACOSX@)
38 # these are the objects that are changed by the .configure process
41 macosx_cppflags = -DHAVE_MACOSX -DNO_GCC_PRAGMA
45 # wx-config generated by configure
46 CONS_CPPFLAGS=-DHAVE_WXCONSOLE @WXCONS_CPPFLAGS@ $(@MACOSX@_cppflags)
47 CONS_LDFLAGS=@WXCONS_LDFLAGS@
55 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
56 -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
59 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
60 -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
63 #-------------------------------------------------------------------------
64 all: Makefile wx-console $(MACOSXAPP)
65 @echo "==== Make of wx-console is good ===="
68 # Mac OS X application bundle
69 # See http://216.239.59.104/search?q=cache:a61SGKgoHSQJ:wiki.wxwidgets.org/wiki.pl%3FWxMac_Issues+wxmac+%22application+bundle%22&hl=fr
71 wx-console.app: wx-console
73 -mkdir wx-console.app/Contents
74 -mkdir wx-console.app/Contents/MacOS
75 -mkdir wx-console.app/Contents/Resources
76 -mkdir wx-console.app/Contents/Resources/English.lproj
77 echo -n 'APPL????' > wx-console.app/Contents/PkgInfo
78 mv wx-console wx-console.app/Contents/MacOS/wx-console
79 cp wx-console.conf /Library/Preferences/org.bacula.wxconsole.conf
81 wx-console: $(CONSOBJS) @WIN32@ ../lib/libbac.a
82 $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) -lbac
84 win32: wx-console_private.res
87 wx-console_private.res: wx-console_private.rc
88 windres.exe -i wx-console_private.rc -I rc -o wx-console_private.res -O coff
91 @$(RMF) $(CONSOBJS) wx-console $(WIN32RES)
97 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
99 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
102 $(INSTALL_PROGRAM) wx-console $(DESTDIR)$(sbindir)/wx-console
103 @srcconf=wx-console.conf; \
104 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
105 destconf=$$srcconf.new; \
106 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
108 destconf=$$srcconf; \
110 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
111 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
114 (cd $(DESTDIR)$(sbindir); $(RMF) wx-console)
115 (cd $(DESTDIR)$(sysconfdir); $(RMF) wx-console.conf wx-console.conf.new)
117 # Semi-automatic generation of dependencies:
118 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
119 # and it also includes system headers.
120 # `semi'-automatic since dependencies are generated at distribution time.
123 @$(MV) Makefile Makefile.bak
124 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
125 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
126 @$(CC) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
127 @if test -f Makefile ; then \
128 $(RMF) Makefile.bak; \
130 $(MV) Makefile.bak Makefile; \
131 echo -e "Something went wrong\n\a"; \
134 # -----------------------------------------------------------------------
135 # DO NOT DELETE: nice dependency list follows