]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/Makefile.in
Added Mac OS X support.
[bacula/bacula] / bacula / src / wx-console / Makefile.in
1 #
2 #  Version $Id$
3 #
4 @MCOMMON@
5
6 srcdir =        .
7 VPATH =         .
8 .PATH:          .
9
10 # one up
11 basedir = ..
12 # top dir
13 topdir = ../..
14 # this dir relative to top dir
15 thisdir = src/wx-console
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
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
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
29
30 win32 = wx-console_private.res
31
32 WIN32RES = $(@WIN32@)
33
34 # these are the objects that are changed by the .configure process
35 EXTRAOBJS = @OBJLIST@
36
37 # wx-config generated by configure
38 CONS_CPPFLAGS=@WXCONS_CPPFLAGS@
39 CONS_LDFLAGS=@WXCONS_LDFLAGS@
40
41 .SUFFIXES:     .cpp .c .o
42 .PHONY:
43 .DONTCARE:
44
45 # inference rules
46 .c.o:
47         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
48            -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
49
50 .cpp.o:
51         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
52            -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
53
54
55 #-------------------------------------------------------------------------
56 all: Makefile wx-console
57         @echo "==== Make of wx-console is good ===="
58         @echo " "
59
60 # Mac OS X application bundle
61 # See http://216.239.59.104/search?q=cache:a61SGKgoHSQJ:wiki.wxwidgets.org/wiki.pl%3FWxMac_Issues+wxmac+%22application+bundle%22&hl=fr
62
63 wx-console.app: wx-console
64         -mkdir wx-console.app    
65         -mkdir wx-console.app/Contents
66         -mkdir wx-console.app/Contents/MacOS
67         -mkdir wx-console.app/Contents/Resources
68         -mkdir wx-console.app/Contents/Resources/English.lproj
69         echo -n 'APPL????' > wx-console.app/Contents/PkgInfo
70         mv wx-console wx-console.app/Contents/MacOS/wx-console
71         cp wx-console.conf wx-console.app/Contents/MacOS/wx-console.conf
72
73 wx-console: $(CONSOBJS) @WIN32@ ../lib/libbac.a
74         $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) -lbac
75
76 win32: wx-console_private.res
77         
78
79 wx-console_private.res: wx-console_private.rc 
80         windres.exe -i wx-console_private.rc -I rc -o wx-console_private.res -O coff 
81
82 clean:
83         @$(RMF) $(CONSOBJS) wx-console $(WIN32RES)
84
85 distclean: clean
86         $(RMF) Makefile
87         $(RMF) -r CVS
88
89 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
90         cd $(topdir) \
91           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
92
93 install: all
94         $(INSTALL_PROGRAM) wx-console $(DESTDIR)$(sbindir)/wx-console
95         @srcconf=wx-console.conf; \
96         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
97            destconf=$$srcconf.new; \
98            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
99         else \
100            destconf=$$srcconf; \
101         fi; \
102         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
103         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
104
105 uninstall:
106         (cd $(DESTDIR)$(sbindir); $(RMF) wx-console)
107         (cd $(DESTDIR)$(sysconfdir); $(RMF) wx-console.conf wx-console.conf.new)
108
109 # Semi-automatic generation of dependencies:
110 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
111 # and it also includes system headers.
112 # `semi'-automatic since dependencies are generated at distribution time.
113
114 depend:
115         @$(MV) Makefile Makefile.bak
116         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
117         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
118         @$(CC) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
119         @if test -f Makefile ; then \
120             $(RMF) Makefile.bak; \
121         else \
122            $(MV) Makefile.bak Makefile; \
123            echo -e "Something went wrong\n\a"; \
124         fi
125
126 # -----------------------------------------------------------------------
127 # DO NOT DELETE: nice dependency list follows