Include the required headers. Strangely this only broke on linux. Also fix a warning.
[Rockbox.git] / rbutil / Makefile.macosx
blob6939280e1632b5984fd1b2c7a8f61bd377a789a1
1 # =========================================================================
2 #     This makefile was generated by
3 #     Bakefile 0.2.1 (http://bakefile.sourceforge.net)
4 #     Do not modify, all changes will be overwritten!
5 # =========================================================================
10 srcdir = /Users/dave/rockbox/rockbox-devel/rbutil
11 top_srcdir = /Users/dave/src/wxMac-2.8.0/
12 BK_DEPS = /Users/dave/src/wxMac-2.8.0/osx_build/bk-deps
13 wx_top_builddir = /Users/dave/src/wxMac-2.8.0/osx_build
15 prefix = /usr/local
16 exec_prefix = ${prefix}
17 INSTALL = /usr/bin/install -c
18 EXEEXT = 
19 WINDRES = 
20 REZ = /Developer/Tools/Rez
21 SETFILE = /Developer/Tools/SetFile
22 NM = nm
23 LIBS = -lz -lpthread -liconv
24 LDFLAGS_GUI = 
25 CXX = g++
26 CXXFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing -fno-common
27 CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I${wx_top_builddir}/lib/wx/include/mac-ansi-release-static-2.8 -I${top_srcdir}/include -fpascal-strings -I${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon
28 RBUTIL_CFLAGS = $(CXXFLAGS) -DRBUTIL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I${wx_top_builddir}/lib/wx/include/mac-ansi-release-static-2.8 -I${top_srcdir}/include -fpascal-strings -I${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon
29 LDFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386   -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System 
30 WX_LIB_FLAVOUR = 
31 TOOLKIT = MAC
32 TOOLKIT_LOWERCASE = mac
33 TOOLKIT_VERSION = 
34 TOOLCHAIN_FULLNAME = mac-ansi-release-static-2.8
35 EXTRALIBS =   -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System  -lz -lpthread -liconv 
36 EXTRALIBS_GUI = -framework WebKit
37 HOST_SUFFIX = 
38 SAMPLES_RPATH_FLAG = 
39 SAMPLES_RPATH_POSTLINK = 
41 ### Variables: ###
43 DESTDIR = 
44 WX_RELEASE = 2.8
45 WX_VERSION = $(WX_RELEASE).0
46 LIBDIRNAME = $(wx_top_builddir)/lib
47 RBUTIL_CXXFLAGS = -DRBUTIL -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
48         $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
49         -I$(srcdir) $(__DLLFLAG_p) $(CPPFLAGS) $(CXXFLAGS)
50 RBUTIL_OBJECTS =  \
51         $(__rbutil_os2_lib_res) \
52         rbutil.o rbutilApp.o rbutilFrm.o install_dialogs.o bootloaders.o installlog.o \
53         rbutilCtrls.o ipodpatcher/ipodpatcher.o ipodpatcher/ipodio-posix.o \
54         sansapatcher/sansapatcher.o sansapatcher/sansaio-posix.o \
55         md5sum.o irivertools.o autodetection.o talkfile.o \
56         $(__rbutil___win32rc)
58 ### Conditionally set variables: ###
60 #CXXC = $(CXX)
61 CXXC = $(BK_DEPS) $(CXX)
62 #PORTNAME = base
63 PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
64 WXBASEPORT = _carbon
65 #WXDEBUGFLAG = d
66 #WXDEBUGFLAG = d
67 #WXUNICODEFLAG = u
68 #WXUNIVNAME = univ
69 EXTRALIBS_FOR_BASE = $(EXTRALIBS)
70 #EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
71 EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
72 #EXTRALIBS_FOR_GUI = 
73 __rbutil___mac_setfilecmd = \
74         $(SETFILE) -a C rbutil$(EXEEXT)
75 __rbutil___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
76 #__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
77 #__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__
78 #__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__
79 #__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
80 #__EXCEPTIONS_DEFINE_p_1 = -d wxNO_EXCEPTIONS
81 #__EXCEPTIONS_DEFINE_p_2 = --define wxNO_EXCEPTIONS
82 #__RTTI_DEFINE_p = -DwxNO_RTTI
83 #__RTTI_DEFINE_p_1 = -d wxNO_RTTI
84 #__RTTI_DEFINE_p_2 = --define wxNO_RTTI
85 #__THREAD_DEFINE_p = -DwxNO_THREADS
86 #__THREAD_DEFINE_p_1 = -d wxNO_THREADS
87 #__THREAD_DEFINE_p_2 = --define wxNO_THREADS
88 #__DLLFLAG_p = -DWXUSINGDLL
89 #__DLLFLAG_p_1 = -d WXUSINGDLL
90 #__DLLFLAG_p_2 = --define WXUSINGDLL
91 COND_PLATFORM_OS2_1___rbutil___os2_emxbindcmd = $(NM) rbutil$(EXEEXT) | if \
92         grep -q pmwin.763 ; then emxbind -ep rbutil$(EXEEXT) ; fi
93 #__rbutil___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___rbutil___os2_emxbindcmd)
94 #__RCDEFDIR_p = -i \
95 #       $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
96 #__RCDEFDIR_p_1 = --include-dir \
97 #       $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
98 #__rbutil_os2_lib_res = \
99 #       $(top_srcdir)/include/wx/os2/wx.res
100 __rbutil_bundle___depname = rbutil_bundle
101 #____rbutil_BUNDLE_TGT_REF_DEP = \
102 #       rbutil.app/Contents/PkgInfo
103 ____rbutil_BUNDLE_TGT_REF_DEP = \
104         rbutil.app/Contents/PkgInfo
105 COND_MONOLITHIC_0___WXLIB_CORE_p = \
106         -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
107 __WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
108 COND_MONOLITHIC_0___WXLIB_BASE_p = \
109         -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
110 __WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
112 __WXLIB_ADV_p = -lwx_mac_adv$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
113 __WXLIB_NET_p = -lwx_base_carbon_net-$(WX_RELEASE)$(HOST_SUFFIX)
114 __WXLIB_HTML_p = -lwx_mac_html-$(WX_RELEASE)$(HOST_SUFFIX)
116 #__rbutil___win32rc = rbutil_rc.o
117 COND_MONOLITHIC_1___WXLIB_MONO_p = \
118         -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
119 #__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
120 __LIB_TIFF_p \
121         = \
122         -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
123 __LIB_JPEG_p \
124         = \
125         -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
126 __LIB_PNG_p \
127         = \
128         -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
129 #__LIB_ZLIB_p = \
130 #       -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
131 #__LIB_ODBC_p = \
132 #       -lwxodbc$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
133 COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
134         -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
135 #__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
136 __LIB_EXPAT_p = \
137         -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
138 COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(REZ) -d __DARWIN__ -t APPL -d \
139         __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) \
140         $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -i \
141         $(srcdir)/../../samples $(__RCDEFDIR_p) -i $(top_srcdir)/include -o \
142         rbutil$(EXEEXT) Carbon.r rbutil.r
143 __MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1)
145 ### Targets: ###
147 all: rbutil$(EXEEXT) $(__rbutil_bundle___depname) data
149 install: all
151 uninstall: 
153 install-strip: install
155 clean: 
156         rm -rf ./.deps ./.pch
157         rm -f $(RBUTIL_OBJECTS)
158         rm -f rbutil$(EXEEXT)
159         rm -rf rbutil.app
161 distclean: clean
162         rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
164 rbutil$(EXEEXT): $(RBUTIL_OBJECTS) $(__rbutil___win32rc)
165         $(CXX) -o $@ $(RBUTIL_OBJECTS) $(LDFLAGS)   -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG)  $(LIBS) $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__WXLIB_ADV_p) $(__WXLIB_NET_p) $(__WXLIB_HTML_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
166         $(__rbutil___mac_rezcmd)
167         $(__rbutil___mac_setfilecmd)
168         $(__rbutil___os2_emxbindcmd)
169         $(SAMPLES_RPATH_POSTLINK)
171 rbutil.app/Contents/PkgInfo: rbutil$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
172         mkdir -p rbutil.app/Contents
173         mkdir -p rbutil.app/Contents/MacOS
174         mkdir -p rbutil.app/Contents/Resources
175         
176         
177         sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
178         -e "s/EXECUTABLE/rbutil/" \
179         -e "s/VERSION/$(WX_VERSION)/" \
180         $(top_srcdir)/src/mac/carbon/Info.plist.in >rbutil.app/Contents/Info.plist
181         
182         
183         echo -n "APPL????" >rbutil.app/Contents/PkgInfo
184         
185         
186         ln -f rbutil$(EXEEXT) rbutil.app/Contents/MacOS/rbutil
187         
188         
189         cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns rbutil.app/Contents/Resources/wxmac.icns
191 rbutil_bundle: $(____rbutil_BUNDLE_TGT_REF_DEP)
193 data: 
194         @mkdir -p .
195         @for f in rbutil.ini; do \
196         if test ! -f ./$$f -a ! -d ./$$f ; \
197         then x=yep ; \
198         else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
199         fi; \
200         case "$$x" in ?*) \
201         cp -pRf $(srcdir)/$$f . ;; \
202         esac; \
203         done
205 .cpp.o :
206         $(CXXC) $(RBUTIL_CXXFLAGS) -c -o $@ $<
208 .c.o :
209         $(CC) $(RBUTIL_CFLAGS) -c -o $@ $<
211 rbutil_rc.o: $(srcdir)/rbutil.rc
212         $(WINDRES) -i$< -o$@   --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2)  $(__EXCEPTIONS_DEFINE_p_2) $(__RTTI_DEFINE_p_2) $(__THREAD_DEFINE_p_2)   --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_1) --include-dir $(top_srcdir)/include
215 # Include dependency info, if present:
216 -include .deps/*.d
218 .PHONY: all install uninstall clean distclean rbutil_bundle data