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 = bwx-console_private.res
34 macosx = bwx-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@
57 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) \
58 -I$(srcdir) -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
62 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) \
63 -I$(srcdir) -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
66 #-------------------------------------------------------------------------
67 all: Makefile bwx-console $(MACOSXAPP)
68 @echo "==== Make of wx-console is good ===="
71 # Mac OS X application bundle
72 # See http://216.239.59.104/search?q=cache:a61SGKgoHSQJ:wiki.wxwidgets.org/wiki.pl%3FWxMac_Issues+wxmac+%22application+bundle%22&hl=fr
74 bwx-console.app: bwx-console
75 -mkdir bwx-console.app
76 -mkdir bwx-console.app/Contents
77 -mkdir bwx-console.app/Contents/MacOS
78 -mkdir bwx-console.app/Contents/Resources
79 -mkdir bwx-console.app/Contents/Resources/English.lproj
80 echo -n 'APPL????' > bwx-console.app/Contents/PkgInfo
81 mv bwx-console bwx-console.app/Contents/MacOS/bwx-console
82 cp bwx-console.conf /Library/Preferences/org.bacula.wxconsole.conf
84 bwx-console: Makefile $(CONSOBJS) @WIN32@ ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
85 $(LIBTOOL_LINK) $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) \
86 -lbaccfg -lbac $(OPENSSL_LIBS)
88 win32: bwx-console_private.res
91 bwx-console_private.res: bwx-console_private.rc
92 windres.exe -i bwx-console_private.rc -I rc -o bwx-console_private.res -O coff
95 @$(RMF) -r .libs _libs
98 @$(RMF) $(CONSOBJS) bwx-console $(WIN32RES)
103 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
105 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
108 @if test -f ${DESTDIR}${sbindir}/wx-console; then \
110 echo "Warning!!! ${DESTDIR}${sbindir}/wx-console found."; \
111 echo " wx-console has been renamed bwx-console, so wx-console"; \
112 echo " is no longer used, and you might want to delete it."; \
115 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bwx-console $(DESTDIR)$(sbindir)/bwx-console
116 @srcconf=bwx-console.conf; \
117 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
118 destconf=$$srcconf.new; \
119 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
121 destconf=$$srcconf; \
123 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
124 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
127 (cd $(DESTDIR)$(sbindir); $(RMF) bwx-console)
128 (cd $(DESTDIR)$(sysconfdir); $(RMF) bwx-console.conf bwx-console.conf.new)
130 # Semi-automatic generation of dependencies:
131 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
132 # and it also includes system headers.
133 # `semi'-automatic since dependencies are generated at distribution time.
136 @$(MV) Makefile Makefile.bak
137 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
138 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
139 @$(CXX) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
140 @if test -f Makefile ; then \
141 $(RMF) Makefile.bak; \
143 $(MV) Makefile.bak Makefile; \
144 echo " ===== Something went wrong in make depend ====="; \
147 # -----------------------------------------------------------------------
148 # DO NOT DELETE: nice dependency list follows