Loading ...
Sorry, an error occurred while loading the content.
 

Re: Makefile for MacOS X

Expand Messages
  • Bram Moolenaar
    ... Ehm, where is it? Not that I can use it myself... -- If evolution theories are correct, humans will soon grow a third hand for operating the mouse. ///
    Message 1 of 10 , Mar 10, 2002
      Muraoka Taro wrote:

      > I wrote a makefile for MacOS X. Using this file, we can compile gvim
      > binary for MacOS X without heavy Project Builder. If you hate to launch
      > PB, please try out this makefile on terminal.

      Ehm, where is it? Not that I can use it myself...

      --
      If evolution theories are correct, humans will soon grow a third
      hand for operating the mouse.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • MURAOKA Taro
      ... hmm... Sorry, my mailer has some trouble of MIME. ... MURAOKA Taro # vim:set ts=8 sts=8 sw=8 tw=0: # # Make_osx.mak - Makefile for
      Message 2 of 10 , Mar 10, 2002
        > Ehm, where is it? Not that I can use it myself...

        hmm... Sorry, my mailer has some trouble of MIME.
        ----
        MURAOKA Taro <koron@...>


        # vim:set ts=8 sts=8 sw=8 tw=0:
        #
        # Make_osx.mak - Makefile for VIM on MacOS X.
        #
        # Last Change: 10-Mar-2002.
        #
        # To make everything, just type 'make -f Make_osx.mak' in your terminal.
        # Flags:
        # VERSION=6.1.x (default: 6.1)
        # DEBUG=yes or empty (default: empty)

        # User define flags
        APP = gvim
        APPEXE = $(APP)
        APPDIR = $(APP).app

        CFLAGS = -Wall -fpascal-strings
        INCLUDES = -I. -Iproto -I/Developer/Headers/FlatCarbon
        LDFLAGS =
        FRAMEWORKS = -framework Carbon
        LIBS =
        USE_UNIX = yes

        ### Commands definition
        CC = cc
        MD = mkdir -p
        RM = rm -f
        CP = cp -p
        MV = mv -f
        CTAGS = ctags

        ### Flag puzzle
        ifdef DEBUG
        CFLAGS += -O -g
        else
        CFLAGS += -O2
        endif
        ifndef VERSION
        VERSION = 6.1
        endif
        ifndef USE_UNIX
        EXE = Vim.x
        OUTDIR = ObjX
        DEFINES += -DMACOS_X
        else
        EXE = Vim.x_unix
        OUTDIR = ObjX_UNIX
        DEFINES += -DMACOS_X_UNIX
        endif
        # Common flags
        DEFINES += -DHAVE_PATHDEF
        CFLAGS += $(DEFINES) $(INCLUDES) -c
        LDFLAGS += $(LIBS) $(FRAMEWORKS)

        ### Object files
        OBJ = \
        $(OUTDIR)/buffer.o \
        $(OUTDIR)/charset.o \
        $(OUTDIR)/diff.o \
        $(OUTDIR)/digraph.o \
        $(OUTDIR)/edit.o \
        $(OUTDIR)/eval.o \
        $(OUTDIR)/ex_cmds.o \
        $(OUTDIR)/ex_cmds2.o \
        $(OUTDIR)/ex_docmd.o \
        $(OUTDIR)/ex_getln.o \
        $(OUTDIR)/fileio.o \
        $(OUTDIR)/fold.o \
        $(OUTDIR)/getchar.o \
        $(OUTDIR)/gui_mac.o \
        $(OUTDIR)/gui.o \
        $(OUTDIR)/main.o \
        $(OUTDIR)/mark.o \
        $(OUTDIR)/memfile.o \
        $(OUTDIR)/memline.o \
        $(OUTDIR)/menu.o \
        $(OUTDIR)/message.o \
        $(OUTDIR)/misc1.o \
        $(OUTDIR)/misc2.o \
        $(OUTDIR)/move.o \
        $(OUTDIR)/mbyte.o \
        $(OUTDIR)/normal.o \
        $(OUTDIR)/ops.o \
        $(OUTDIR)/option.o \
        $(OUTDIR)/os_macosx.o \
        $(OUTDIR)/pathdef.o \
        $(OUTDIR)/pty.o \
        $(OUTDIR)/quickfix.o \
        $(OUTDIR)/regexp.o \
        $(OUTDIR)/screen.o \
        $(OUTDIR)/search.o \
        $(OUTDIR)/syntax.o \
        $(OUTDIR)/tag.o \
        $(OUTDIR)/term.o \
        $(OUTDIR)/ui.o \
        $(OUTDIR)/undo.o \
        $(OUTDIR)/version.o \
        $(OUTDIR)/window.o

        ### Build executable
        vimosx: $(APPDIR)
        $(EXE): $(OUTDIR) $(OBJ) version.h
        $(CC) $(LDFLAGS) $(OBJ) -o $@
        $(RM) auto/pathdef.c $(OUTDIR)/pathdef.o $(OUTDIR)/version.o

        ### auto/pathdef.c
        # Generate auto/pathdef.c
        auto/pathdef.c: Make_osx.mak
        @echo "Creating $@"
        @echo "/* pathdef.c */" > $@
        @echo "#include \"vim.h\"" >> $@
        @echo "char_u *default_vim_dir = (char_u*)\"$(VIMRCLOC)\";" >> $@
        @echo "char_u *default_vimruntime_dir = (char_u*)\"$(VIMRUNTIMEDIR)\";"
        >> $@
        @echo "char_u *all_cflags = (char_u*)\"$(CC) $(CFLAGS)\";" >> $@
        @echo "char_u *all_lflags = (char_u*)\"$(CC) $(LDFLAGS)\";" >> $@
        @echo "char_u *compiled_user = (char_u*)\"$(USERNAME)\";" >> $@
        @echo "char_u *compiled_sys = (char_u*)\"$(USERDOMAIN)\";" >> $@

        $(OUTDIR)/pathdef.o: auto/pathdef.c
        $(CC) $(CFLAGS) $< -o $@

        ### Commands
        $(OUTDIR)/%.o: %.c proto/*.pro
        $(CC) $(CFLAGS) $< -o $@

        $(OUTDIR):
        $(MD) $(OUTDIR)

        ### Bundle marker
        $(APPDIR)/Contents:
        $(MD) $(APPDIR)
        $(MD) $(APPDIR)/Contents
        $(MD) $(APPDIR)/Contents/MacOS
        $(MD) $(APPDIR)/Contents/Resources

        $(APPDIR)/Contents/PkgInfo: Make_osx.mak $(APPDIR)/Contents
        @echo "Creating PkgInfo"
        @echo -n "APPL????" > $@

        resources: $(APPDIR)/Contents $(APPDIR)/Contents/Resources/gui_mac.icns
        $(APPDIR)/Contents/Resources/gui_mac.icns: gui_mac.icns
        $(CP) $< $@

        $(APPDIR)/Contents/Info.plist: Make_osx.mak $(APPDIR)/Contents resources
        @echo "Creating Info.plist"
        @echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
        @echo '<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/Prop
        ertyList.dtd">' >> $@
        @echo '<plist version="0.9">' >> $@
        @echo '<dict>' >> $@

        @echo ' <key>CFBundleInfoDictionaryVersion</key>' >>$@
        @echo ' <string>6.0</string>' >>$@
        @echo ' <key>CFBundleExecutable</key>' >> $@
        @echo ' <string>$(APPEXE)</string>' >> $@
        @echo '' >>$@
        @echo ' <key>CFBundleName</key>' >>$@
        @echo ' <string>$(APP)</string>' >> $@
        @echo ' <key>CFBundlePackageType</key>' >> $@
        @echo ' <string>APPL</string>' >> $@
        @echo ' <key>CFBundleSignature</key>' >> $@
        @echo ' <string>????</string>' >> $@
        @echo ' <key>CFBundleShortVersionString</key>' >> $@
        @echo ' <string>$(VERSION)</string>' >>$@
        @echo ' <key>CFBundleIconFile</key>' >> $@
        @echo ' <string>gui_mac</string>' >> $@
        @echo ' <key>CSResourcesFileMapped</key>' >> $@
        @echo ' <true/>' >> $@
        @echo '</dict>' >> $@
        @echo '</plist>' >> $@

        info: $(APPDIR)/Contents/PkgInfo $(APPDIR)/Contents/Info.plist

        $(APPDIR)/Contents/MacOS/$(APPEXE): $(EXE) $(APPDIR)/Contents
        $(CP) $< $@

        $(APPDIR): $(APPDIR)/Contents/MacOS/$(APPEXE) info

        ### tags
        tags: *.c
        $(CTAGS) *.c

        ### Cleaner
        .PHONY: clean distclean allclean
        clean:
        $(RM) -r $(APPDIR)
        $(RM) ObjX/*.o ObjX_UNIX/*.o *.o
        $(RM) *.~ *~
        distclean: clean
        $(RM) -r ObjX ObjX_UNIX
        $(RM) Vim.x Vim.x_unix
      • Benji Fisher
        ... [Makefile snipped] Thank you! I ll try it out in a few days, and if it works then I will use it from now on. (Can this Makefile build the Carbon gui
        Message 3 of 10 , Mar 10, 2002
          MURAOKA Taro wrote:
          >
          > > Ehm, where is it? Not that I can use it myself...
          >
          > hmm... Sorry, my mailer has some trouble of MIME.
          [Makefile snipped]

          Thank you! I'll try it out in a few days, and if it works then I will
          use it from now on. (Can this Makefile build the Carbon gui version? I
          suppose I will find out.) One problem with Project Builder is that it ignores
          the autoconf stuff, and I do not know how to compile with perl support without
          using autoconf. Since Mac OS X comes with perl, it would be nice to have a
          perl-enabled version of vim.

          --Benji Fisher
        • Bob Ippolito
          You realize you can build PB projects from the command line too, right? man pbxbuild -bob
          Message 4 of 10 , Mar 10, 2002
            You realize you can build PB projects from the command line too, right?

            man pbxbuild

            -bob

            On Sunday, March 10, 2002, at 04:26 AM, Muraoka Taro wrote:

            > I wrote a makefile for MacOS X. Using this file, we can compile gvim
            > binary for MacOS X without heavy Project Builder. If you hate to launch
            > PB, please try out this makefile on terminal.
            >
            > Thanks.
            > ----
            > MURAOKA Taro <koron@...>
          • Bob Ippolito
            Does OS X actually come with a dylib (.so or .dylib) version of Perl? I don t recall there being one last I checked, other than /usr/libexec/httpd/libperl.so
            Message 5 of 10 , Mar 10, 2002
              Does OS X actually come with a dylib (.so or .dylib) version of Perl? I
              don't recall there being one last I checked, other than
              /usr/libexec/httpd/libperl.so .. but that just seems kinda sketchy,
              probably compiled with weird options like no threading and no largefile
              support and whatever else if it actually is a full libperl.

              -bob

              On Sunday, March 10, 2002, at 09:10 AM, Benji Fisher wrote:

              > MURAOKA Taro wrote:
              >>
              >>> Ehm, where is it? Not that I can use it myself...
              >>
              >> hmm... Sorry, my mailer has some trouble of MIME.
              > [Makefile snipped]
              >
              > Thank you! I'll try it out in a few days, and if it works then I
              > will
              > use it from now on. (Can this Makefile build the Carbon gui version? I
              > suppose I will find out.) One problem with Project Builder is that it
              > ignores
              > the autoconf stuff, and I do not know how to compile with perl support
              > without
              > using autoconf. Since Mac OS X comes with perl, it would be nice to
              > have a
              > perl-enabled version of vim.
              >
              > --Benji Fisher
            • Benji Fisher
              ... [Make_osx.mak snipped] I had the usual troubles with OS X Mail.app. After I changed 8 spaces into tabs (:retab!) and joined a broken line, the Makefile
              Message 6 of 10 , Mar 11, 2002
                On Sunday, March 10, 2002, at 06:08 AM, MURAOKA Taro wrote:

                >> Ehm, where is it? Not that I can use it myself...
                >
                > hmm... Sorry, my mailer has some trouble of MIME.
                > ----
                > MURAOKA Taro <koron@...>
                [Make_osx.mak snipped]

                I had the usual troubles with OS X Mail.app. After I changed 8
                spaces into tabs (:retab!) and joined a broken line, the Makefile got as
                far as linking and then bailed out with the message

                /usr/bin/ld: Undefined symbols:
                _default_vimruntime_dir
                _all_cflags
                _all_lflags
                _compiled_sys
                _compiled_user
                make: *** [Vim.x_unix] Error 1

                Can anyone suggest how I can fix this?

                --Benji Fisher
              • koron@tka.att.ne.jp
                I re-post Make_osx.mak. Please try this. ... MURAOKA Taro
                Message 7 of 10 , Mar 11, 2002
                  I re-post Make_osx.mak.
                  Please try this.
                  ----
                  MURAOKA Taro <koron@...>


                  > I had the usual troubles with OS X Mail.app. After I changed 8
                  > spaces into tabs (:retab!) and joined a broken line, the Makefile got as
                  > far as linking and then bailed out with the message
                • MURAOKA Taro
                  ...I sent the Make_osx.mak to Benji Fisher personally. Sorry for file-less mail. ... MURAOKA Taro P.S. But why? I cannot attach any
                  Message 8 of 10 , Mar 11, 2002
                    ...I sent the Make_osx.mak to Benji Fisher personally.
                    Sorry for file-less mail.
                    ----
                    MURAOKA Taro <koron@...>

                    P.S.
                    But why?
                    I cannot attach any files on a mail
                    send both vim-mac and vim-multibyte.
                    (I can for vim-dev, it cofused me)
                    Does anyone know anything about this?


                    > I re-post Make_osx.mak.
                    > Please try this.
                    > ----
                    > MURAOKA Taro <koron@...>
                    >
                  • Benji Fisher
                    ... I have tested the makefile and posted it on my iDisk, in the patches/ folder. It does indeed compile a Carbon vim. Thanks again!
                    Message 9 of 10 , Mar 13, 2002
                      On Monday, March 11, 2002, at 07:56 PM, MURAOKA Taro wrote:

                      > ...I sent the Make_osx.mak to Benji Fisher personally.
                      > Sorry for file-less mail.

                      I have tested the makefile and posted it on my iDisk, in the
                      patches/ folder. It does indeed compile a Carbon vim. Thanks again!
                      http://homepage.mac.com/fisherbb/index.html

                      I hope to have time this week to compile vim 6.1b with my favorite
                      configure options, thanks to the new makefile. I'll post and announce
                      it when I do.

                      I believe that the diff file in my patches/ folder has been
                      incorporated into vim 6.1b. When I confirm this, I will delete it. A
                      few more patches are coming soon.

                      --Benji Fisher
                    Your message has been successfully submitted and would be delivered to recipients shortly.