| 1 | How to compile with MinGW32 |
|---|
| 2 | =========================== |
|---|
| 3 | |
|---|
| 4 | Requirements |
|---|
| 5 | ------------ |
|---|
| 6 | |
|---|
| 7 | From Microsoft: |
|---|
| 8 | the Microsoft Platform SDK |
|---|
| 9 | |
|---|
| 10 | From http://www.mingw.org: |
|---|
| 11 | MinGW32 |
|---|
| 12 | MSys |
|---|
| 13 | msysDTK |
|---|
| 14 | |
|---|
| 15 | From http://libusb-win32.sf.net: |
|---|
| 16 | libusb-win32 (version from August 2006 or later) |
|---|
| 17 | |
|---|
| 18 | From http://www.gimp.org/win32: |
|---|
| 19 | pkg-config |
|---|
| 20 | glib-2.x |
|---|
| 21 | libiconv |
|---|
| 22 | gettext |
|---|
| 23 | |
|---|
| 24 | If you use msysDTK <= 1.0.1, you also neeed |
|---|
| 25 | from http://gnuwin32.sf.net: |
|---|
| 26 | File |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | Preparing the build environment |
|---|
| 31 | ------------------------------- |
|---|
| 32 | |
|---|
| 33 | Install all the requirements in the above order. The instructions |
|---|
| 34 | below use seperate directories but you can also copy everything to |
|---|
| 35 | /mingw (NOT to /). |
|---|
| 36 | |
|---|
| 37 | Unpack glib-2.x, libiconv, gettext and pkg-config to /glib in the MSys |
|---|
| 38 | root directory or use /etc/fstab to mount it. |
|---|
| 39 | |
|---|
| 40 | To include the libusb-win32 into MSys, you add an entry to /etc/fstab: |
|---|
| 41 | C:/Programs/LibUSB-Win32/ /libusb |
|---|
| 42 | and restart MSys. |
|---|
| 43 | |
|---|
| 44 | To get the bluetooth header files, you need to install the Platform SDK. |
|---|
| 45 | You only neeed the Build Environment for x86 32bit from the Core SDK. |
|---|
| 46 | Create a directory /psdk/include in the MSys root directoy and copy the |
|---|
| 47 | following files from the Platform SDK: |
|---|
| 48 | ws2bth.h |
|---|
| 49 | bthdef.h |
|---|
| 50 | bthsdpdef.h |
|---|
| 51 | af_irda.h |
|---|
| 52 | |
|---|
| 53 | If necessary (see above), unpack the file utility into the /mingw directory. |
|---|
| 54 | You must NOT use the Msys root. To make sure it works, TEST IT!. |
|---|
| 55 | Example output is ($ is the MSys command line prompt): |
|---|
| 56 | $ file INSTALL.Win32 |
|---|
| 57 | INSTALL.Win32: ASCII English text |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | Bootstrapping the CVS version |
|---|
| 62 | ----------------------------- |
|---|
| 63 | |
|---|
| 64 | Run: |
|---|
| 65 | $ export ACLOCAL="aclocal -I /glib/share/aclocal" |
|---|
| 66 | $ autoreconf -v --install |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | Building OpenOBEX |
|---|
| 71 | ----------------- |
|---|
| 72 | |
|---|
| 73 | Now export some variables: |
|---|
| 74 | $ export CFLAGS="-I/libusb/include -I/psdk/include" |
|---|
| 75 | $ export LDFLAGS="-L/libusb/lib/gcc" |
|---|
| 76 | $ export PKG_CONFIG_PATH="/glib/lib/pkgconfig" |
|---|
| 77 | |
|---|
| 78 | If you installed pkg-config to /glib: |
|---|
| 79 | $ export PATH="$PATH:/glib/bin" |
|---|
| 80 | |
|---|
| 81 | $ ./configure --prefix=/mingw --enable-apps --enable-glib --disable-static |
|---|
| 82 | |
|---|
| 83 | pkg-config, glib, bluetooth and USB should be detected now. |
|---|
| 84 | You MUST disable building the static library due to a broken libtool. |
|---|
| 85 | However, you can build it later and manually merge the two libopenobex.la |
|---|
| 86 | files that get created by libtool. |
|---|
| 87 | |
|---|
| 88 | Now run: |
|---|
| 89 | $ make |
|---|
| 90 | $ make install DESTDIR=$(pwd)/local |
|---|
| 91 | |
|---|
| 92 | Take a look at the file list to install: |
|---|
| 93 | $ find local |
|---|
| 94 | |
|---|
| 95 | If you want to install all of these files, run: |
|---|
| 96 | $ make install |
|---|