binaries up on the site

Henrik Brautaset Aronsen subsurface at henrik.synth.no
Fri Oct 14 03:02:53 EDT 2011


On Thu Oct 13 00:06:06 EDT 2011, Dirk Hohndel wrote:
> The same goes for Mac or Windows binaries (except for the request to
> provide OBS build configuration files... you'll have to provide actual
> binaries for that).

Just for the record: I looked into building "fat" binaries (with both 
i386 and x86_64 support) on mac.   This is necessary for binary 
downloads that are runnable by most users:

1) Add "+universal" to /opt/local/etc/macports/variants.conf

2) Build dependencies with fat/universal support:

         sudo port install gconf gtk2 libusb

3) Configure libdivecomputer with fat/universal support:

         CFLAGS="-force_cpusubtype_ALL -mmacosx-version-min=10.4  -arch 
x86_64 -arch i386 -I/opt/local/include" ./configure 
--disable-dependency-tracking

4) Add fat/universal support to subsurface's Makefile.  This should be a 
separate make target, I guess, but here goes:

diff --git a/Makefile b/Makefile
index f962c0f..c646dd1 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,11 @@ CC=gcc
  CFLAGS=-Wall -Wno-pointer-sign -g
  INSTALL=install

+UNAME := $(shell uname)
+ifeq ($(UNAME), Darwin)
+    CFLAGS+= -force_cpusubtype_ALL -mmacosx-version-min=10.4  -arch 
i386 -arch x86_64
+endif
+
  prefix = $(HOME)
  DESTDIR = $(prefix)/bin
  NAME = subsurface
@@ -29,7 +34,7 @@ OBJS =        main.o dive.o profile.o info.o 
equipment.o divelist.o \
         gtk-gui.o

  $(NAME): $(OBJS)
-       $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)

  install: $(NAME)
         $(INSTALL) -d -m 755 '$(DESTDIR)'


These additional steps are not necessary for regular mac builds.

Cheers,
Henrik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111014/47600d21/attachment.html>


More information about the subsurface mailing list