Menu

Mac Build.

Teak
2010-11-19
2013-05-01
  • Teak

    Teak - 2010-11-19

    Hi I was just wondering if it would be easy to build a Mac version of XPilot. I was also wondering why mac is one of the tags on the summery page, when there is no mac build.

     
  • dvincent

    dvincent - 2012-07-28

    It's been some months now since your post.  Did you have any luck getting it to work?

    I used the following patch on Makefile.std to make it work on Snow Leopard and Lion.

    *** xpilot-4.5.5-reference/src/Makefile.std Mon Feb 22 02:59:29 2010
    -- xpilot-4.5.5-candidate/src/Makefile.std Sat Jul 28 15:21:39 2012
    ***************
    *** 45,50 ****
    -- 45,60 ---
      XLIB = -L/usr/local/X11/lib -lX11
     
      #
    + # Flags for Mac OS X with suitable Apple developer tools installed.
    + #
    +
    + MACOSX_CC = $(CC)
    + MACOSX_CFLAGS = $(DEFS) $(INCS) -O -I/usr/X11/include
    + MACOSX_DEBUG = -g
    + MACOSX_MLIB = $(MLIB)
    + MACOSX_XLIB = -L/usr/X11/lib -lX11
    +
    + #
      # Flags for HP-UX using the native HP compiler.
      #
      HPPA_CC = cc
    ***************
    *** 296,302 ****
     
      all:
      @echo "Please specify your system.  Choose one of:"
    ! @echo "    hppa/solaris/sun/aix/linux/sgi/os2"
     
      targets: $(TARGETS)
     
    -- 306,312 ---
     
      all:
      @echo "Please specify your system.  Choose one of:"
    ! @echo "   hppa/solaris/sun/aix/linux/sgi/os2/macosx"
     
      targets: $(TARGETS)
     
    ***************
    *** 376,381 ****
    -- 386,399 ---
      @$(MAKE) -f Makefile.std $(TARGETS) \
      "CC=$(AIX_CC)" "CFLAGS=$(AIX_CFLAGS) $(AIX_OPT)" "MLIB=$(AIX_MLIB)" "XLIB=$(AIX_XLIB)"
     
    + macosx:
    + @$(MAKE) -f Makefile.std $(TARGETS) \
    + "CC=$(MACOSX_CC)" "CFLAGS=$(MACOSX_CFLAGS) $(MACOSX_OPT)" "MLIB=$(MACOSX_MLIB)" "XLIB=$(MACOSX_XLIB)"
    +
    + macosx-debug:
    + @$(MAKE) -f Makefile.std $(TARGETS) \
    + "CC=$(MACOSX_CC)" "CFLAGS=$(MACOSX_CFLAGS) $(MACOSX_DEBUG)" "MLIB=$(MACOSX_MLIB)" "XLIB=$(MACOSX_XLIB)"
    +
      linux:
      @$(MAKE) -f Makefile.std $(TARGETS) \
      "CC=$(LINUX_CC)" "CFLAGS=$(LINUX_CFLAGS) $(LINUX_OPT)" "MLIB=$(LINUX_MLIB)" "XLIB=$(LINUX_XLIB)"
    ***************
    *** 423,429 ****
      $(CC) $(CFLAGS) $(MSUB).c -o $(MSUB)
     
      install:
    ! @echo "Specify either install-hppa, install-linux, install-sgi, install-solaris or install-sun"
     
      install-binaries:
      if ; then mkdir -p $(BINDIR); fi
    -- 441,447 ---
      $(CC) $(CFLAGS) $(MSUB).c -o $(MSUB)
     
      install:
    ! @echo "Specify either install-hppa, install-linux, install-macosx, install-sgi, install-solaris or install-sun"
     
      install-binaries:
      if ; then mkdir -p $(BINDIR); fi
    ***************
    *** 450,455 ****
    -- 468,475 ---
      fi; \
      done
     
    + install-macosx: macosx install-binaries install-libdir
    +
      install-hppa: hppa install-binaries install-libdir
     
      install-linux: linux install-binaries install-libdir

     
  • dvincent

    dvincent - 2012-07-28

    You also asked about the Mac tag on the summery page.  I think for most people in the XPilot demographic a quick hack to the makefile is a no brainer.  The patch I've given is more than most people need.

     

Log in to post a comment.