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

MinGW Makefile

Expand Messages
  • Patrick Anderson
    here s a makefile I use to build with http://www.mingw.org The .rc file is not compiled or linked, so there s probably a crash waiting to happen. I haven t
    Message 1 of 7 , Nov 12, 2004
    • 0 Attachment
      here's a makefile I use to build with http://www.mingw.org

      The .rc file is not compiled or linked, so there's probably a crash waiting to happen.

      I haven't used it much yet...


      BTW: I'm a many year GnuEmacs user, but jasspa interest me for many reasons - size being the first.

      I've been trying to review many small editors (biew, bvi, ht, hexcurse, hexdiff, hexedit, hexplorer, hiew, joe, katy, le, led, mined, ,qemacs, shed, vche, vile, yudit, zed, zeth zile)

      Hoping to integrate a lisp or python jit compiler, eventually audio and video editing, and 3d modeling and simulation etc. anyone else doing this, (maybe some of it is already done).


      ----
      # -!- makefile -!-
      #
      # JASSPA MicroEmacs - www.jasspa.com
      # MinGW.gmk - Make file for http://www.MinGW.org using gcc
      #
      # Copyright (C) 2001-2004 JASSPA (www.jasspa.com)
      #
      # This program is free software; you can redistribute it and/or modify it
      # under the terms of the GNU General Public License as published by the Free
      # Software Foundation; either version 2 of the License, or (at your option)
      # any later version.
      #
      # This program is distributed in the hope that it will be useful, but WITHOUT
      # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
      # more details.
      #
      # You should have received a copy of the GNU General Public License along
      # with this program; if not, write to the Free Software Foundation, Inc.,
      # 675 Mass Ave, Cambridge, MA 02139, USA.
      #
      ##############################################################################
      #
      # Created: Sat Jan 24 1998
      # Synopsis: Make file for http://www.MinGW.org using gcc
      # Notes:
      # The executable produced seems to work even though the .rc file
      # is never compiled/linked in.
      #
      # During link gcc returns:
      # winterm.ob(.text+0x3e89):winterm.c: undefined reference to `SHGetSpecialFolderPath'
      # The few lines at winterm.c(5396) should be removed or changed from:

      # if((SHGetSpecialFolderPath(NULL, appDataBuff, CSIDL_APPDATA, FALSE) != NOERROR) &&

      # to something like:

      # if(S_OK == SHGetFolderPath(NULL,
      # CSIDL_APPDATA, // | CSIDL_FLAG_CREATE
      # 0,
      # SHGFP_TYPE_CURRENT, // SHGFP_TYPE_DEFAULT
      # appDataBuff) &&

      # see //http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetfolderpath.asp for more info...
      #
      # Run "mingw32-make.exe -f MinGW.gmk" for optimised build produces ./me
      # Run "mingw32-make.exe -f MinGW.gmk med" for debug build produces ./med
      #
      # Run "mingw32-make.exe -f MinGW.gmk clean" to clean source directory
      # Run "mingw32-make.exe -f MinGW.gmk spotless" to clean source directory even more
      #
      ##############################################################################
      #
      # Installation Directory
      INSTDIR = c:\emacs
      INSTPROGFLAGS =
      #
      # Local Definitions
      CP = copy
      RM = - erase
      CC = gcc
      LD = $(CC)
      STRIP = strip
      EXE = .exe
      INSTALL = install
      CDEBUG = -g -Wall
      COPTIMISE = -O3 -DNDEBUG=1 -Wall
      CDEFS = -D_WIN32 -I.
      CONSOLE_DEFS = -D_ME_CONSOLE
      WINDOW_DEFS = -D_ME_WINDOW
      NANOEMACS_DEFS= -D_NANOEMACS
      SOCKET_DEFS = -D_SOCKET
      LDDEBUG =
      LDOPTIMISE =
      LDFLAGS =
      LIBS = -lshell32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32
      CONSOLE_LIBS =
      SOCKET_LIBS = ws2_32.lib

      #
      # Rules
      .SUFFIXES: .c .oc .ow .ob .on .ov .oe .odc .odw .odb .odn .odv .ode

      .c.oc:
      $(CC) $(COPTIMISE) $(CDEFS) $(MICROEMACS_DEFS) $(CONSOLE_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.ow:
      $(CC) $(COPTIMISE) $(CDEFS) $(MICROEMACS_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.ob:
      $(CC) $(COPTIMISE) $(CDEFS) $(MICROEMACS_DEFS) $(CONSOLE_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.on:
      $(CC) $(COPTIMISE) $(CDEFS) $(NANOEMACS_DEFS) $(CONSOLE_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.ov:
      $(CC) $(COPTIMISE) $(CDEFS) $(NANOEMACS_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.oe:
      $(CC) $(COPTIMISE) $(CDEFS) $(NANOEMACS_DEFS) $(CONSOLE_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      # Debug Builds
      .c.odc:
      $(CC) $(CDEBUG) $(CDEFS) $(MICROEMACS_DEFS) $(CONSOLE_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.odw:
      $(CC) $(CDEBUG) $(CDEFS) $(MICROEMACS_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.odb:
      $(CC) $(CDEBUG) $(CDEFS) $(MICROEMACS_DEFS) $(CONSOLE_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.odn:
      $(CC) $(CDEBUG) $(CDEFS) $(NANOEMACS_DEFS) $(CONSOLE_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.odv:
      $(CC) $(CDEBUG) $(CDEFS) $(NANOEMACS_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<

      .c.ode:
      $(CC) $(CDEBUG) $(CDEFS) $(NANOEMACS_DEFS) $(CONSOLE_DEFS) $(WINDOW_DEFS) $(MAKECDEFS) -o $@ -c $<
      #
      # Source files
      PLTMRC = me.rc
      PLTNRC = ne.rc
      PLTNCRC = nec.rc
      STDHDR = ebind.h edef.h eextrn.h efunc.h emain.h emode.h eprint.h \
      esearch.h eskeys.h estruct.h eterm.h evar.h evers.h eopt.h \
      ebind.def efunc.def eprint.def evar.def etermcap.def emode.def eskeys.def
      STDSRC = abbrev.c basic.c bind.c buffer.c crypt.c dirlist.c display.c \
      eval.c exec.c file.c fileio.c frame.c hilight.c history.c input.c \
      isearch.c key.c line.c macro.c main.c narrow.c next.c osd.c \
      print.c random.c regex.c region.c registry.c search.c spawn.c \
      spell.c tag.c termio.c time.c undo.c window.c word.c

      PLTHDR = wintermr.h
      PLTSRC = winterm.c winprint.c

      HEADERS = $(STDHDR) $(PLTHDR)
      SRC = $(STDSRC) $(PLTSRC)
      #
      # Object files
      OBJ_C = $(SRC:.c=.oc)
      OBJ_W = $(SRC:.c=.ow)
      OBJ_B = $(SRC:.c=.ob)
      OBJ_N = $(SRC:.c=.on)
      OBJ_V = $(SRC:.c=.ov)
      OBJ_E = $(SRC:.c=.oe)

      # Debug Builds
      OBJ_DC = $(SRC:.c=.odc)
      OBJ_DW = $(SRC:.c=.odw)
      OBJ_DB = $(SRC:.c=.odb)
      OBJ_DN = $(SRC:.c=.odn)
      OBJ_DV = $(SRC:.c=.odv)
      OBJ_DE = $(SRC:.c=.ode)
      #
      # Targets
      all: me

      install: me
      $(INSTALL) $(INSTPROGFLAGS) me $(INSTDIR)
      @echo "install done"

      clean:
      $(RM) core me$(EXE) mec$(EXE) mew$(EXE) mecw$(EXE) ne$(EXE) nec$(EXE) new$(EXE) necw$(EXE) med$(EXE) medc$(EXE) medw$(EXE) medcw$(EXE) ned$(EXE) nedc$(EXE) nedw$(EXE) nedcw$(EXE)
      $(RM) *.oc *.ow *.ob *.on *.ov *.oe
      $(RM) *.odc *.odw *.odb *.odn *.odv *.ode

      spotless: clean
      $(RM) tags *~

      mec: $(OBJ_C)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_C) $(CONSOLE_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      mew: $(OBJ_W)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_W) $(WINDOW_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      mecw: $(OBJ_B)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_B) $(CONSOLE_LIBS) $(WINDOW_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      me: mecw
      $(CP) mecw$(EXE) $@$(EXE)

      nec: $(OBJ_N)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_N) $(CONSOLE_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      new: $(OBJ_V)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_V) $(WINDOW_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      necw: $(OBJ_E)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDOPTIMISE) -o $@ $(OBJ_E) $(CONSOLE_LIBS) $(WINDOW_LIBS) $(LIBS)
      $(STRIP) $@$(EXE)

      ne: nec
      $(CP) nec$(EXE) $@$(EXE)

      # Debug Builds
      medc: $(OBJ_DC)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DC) $(CONSOLE_LIBS) $(LIBS)

      medw: $(OBJ_DW)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DW) $(WINDOW_LIBS) $(LIBS)

      medcw: $(OBJ_DB)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DB) $(CONSOLE_LIBS) $(WINDOW_LIBS) $(LIBS)

      med: medcw
      $(CP) medcw$(EXE) $@$(EXE)

      nedc: $(OBJ_DN)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DC) $(CONSOLE_LIBS) $(LIBS)

      nedw: $(OBJ_DV)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DV) $(WINDOW_LIBS) $(LIBS)

      nedcw: $(OBJ_DE)
      $(RM) $@$(EXE)
      $(LD) $(LDFLAGS) $(LDDEBUG) -o $@ $(OBJ_DE) $(CONSOLE_LIBS) $(WINDOW_LIBS) $(LIBS)

      ned: nedc
      $(CP) nedc$(EXE) $@$(EXE)
      #
      # Dependancies
      $(OBJ_C): $(HEADERS)
      $(OBJ_W): $(HEADERS)
      $(OBJ_B): $(HEADERS)
      $(OBJ_N): $(HEADERS)
      $(OBJ_V): $(HEADERS)
      $(OBJ_E): $(HEADERS)

      # Debug Builds
      $(OBJ_DC): $(HEADERS)
      $(OBJ_DW): $(HEADERS)
      $(OBJ_DB): $(HEADERS)
      $(OBJ_DN): $(HEADERS)
      $(OBJ_DV): $(HEADERS)
      $(OBJ_DE): $(HEADERS)
    • Thomas Hundt
      ... Nice ... It does just about everything I want an editor to do... and is open source and cross platform! And the authors are nice guys. ... Forget anything
      Message 2 of 7 , Nov 12, 2004
      • 0 Attachment
        > here's a makefile I use to build with http://www.mingw.org

        Nice

        > BTW: I'm a many year GnuEmacs user, but jasspa interest me for many
        > reasons - size being the first.

        It does just about everything I want an editor to do... and is open
        source and cross platform! And the authors are nice guys.


        > I've been trying to review many small editors (biew, bvi, ht,
        > hexcurse, hexdiff, hexedit, hexplorer, hiew, joe, katy, le, led,
        > mined, ,qemacs, shed, vche, vile, yudit, zed, zeth zile)

        Forget anything with "vi" in the name.

        > Hoping to integrate a lisp or python jit compiler,

        If you want to compile from within the program, maybe start by defining
        some compilers in the "Tools" section of setup. Also look at the
        command "compile".

        > eventually audio
        > and video editing, and 3d modeling and simulation etc. anyone else
        > doing this, (maybe some of it is already done).

        These are all text editors and not really graphically-oriented, so you
        might have a bit of a task there.

        --
        Thomas Hundt
      • Patrick Anderson
        ... I mean I ll be replacing eval.c with an interpreter that allows lisp to control the editor. ... Yes, this is not an overnight job.
        Message 3 of 7 , Nov 12, 2004
        • 0 Attachment
          > > Hoping to integrate a lisp or python jit compiler,
          >
          > If you want to compile from within the program, maybe start by defining
          > some compilers in the "Tools" section of setup. Also look at the
          > command "compile".
          >

          I mean I'll be replacing eval.c with an interpreter that allows lisp to control the editor.


          > > eventually audio
          > > and video editing, and 3d modeling and simulation etc. anyone else
          > > doing this, (maybe some of it is already done).
          >
          > These are all text editors and not really graphically-oriented, so you
          > might have a bit of a task there.

          Yes, this is not an overnight job.

          >
          > --
          > Thomas Hundt
          >
          >
        • Steven Phillips
          Patrick, ... Its not just eval.c but also exec.c (which contains the macro processing) and if you move ME away from its macro language then you will also have
          Message 4 of 7 , Nov 13, 2004
          • 0 Attachment
            Patrick,

            >> > Hoping to integrate a lisp or python jit compiler,
            >>
            >> If you want to compile from within the program, maybe start by defining
            >> some compilers in the "Tools" section of setup. Also look at the
            >> command "compile".
            >>

            > I mean I'll be replacing eval.c with an interpreter that allows lisp to control the editor.

            Its not just eval.c but also exec.c (which contains the macro processing) and
            if you move ME away from its macro language then you will also have to
            migrate/replace all the macro files (*.emf) from me.emf onwards and ME without
            macros is a very sparse editor as many of the main features, such as
            hilighting, indentation, spelling etc, rely on the macro files to configure
            them. Basically you are creating a monumental task for yourself which would
            leave you with an editor that you will not be able to patch with future
            releases of ME etc.

            I'm not sure what you are trying to do with a lisp/python interpreter but
            replacing the macro kernel is probably not the best way of achieving it. As an
            alternative I suggest you also consider:

            - Start from GNU Emacs, at least it has a lisp kernel.

            - Starting with a lisp kernel (such as GNU Emacs) and bolt on the other
            bits from ME, this may be quicker as the macro language is such an
            integral part of ME.

            - Create a new ME 'eval-lisp' command which takes a string of lisp and
            interprets via a built in interpreter, this should have little impact on
            ME, allowing you to up-grade and use ME's emf files, while still having
            access to a lisp interpreter; you could also have a eval-python etc.

            - Create a new eval-lisp command that uses an external lisp interpreter to
            evaluate the given string. (simple macro)

            - Learn ME macro code and port your existing code to it.

            If I can help you further with this decision please drop me an email,

            Steve


            >> > eventually audio
            >> > and video editing, and 3d modeling and simulation etc. anyone else
            >> > doing this, (maybe some of it is already done).
            >>
            >> These are all text editors and not really graphically-oriented, so you
            >> might have a bit of a task there.

            > Yes, this is not an overnight job.

            >>
            >> --
            >> Thomas Hundt
            >>
            >>



            > __________________________________________________________________________

            > This is an unmoderated list. JASSPA is not responsible for the content of
            > any material posted to this list.

            > To unsubscribe, send a mail message to

            > mailto:jasspa-unsubscribe@yahoogroups.com

            > or visit http://groups.yahoo.com/group/jasspa and
            > modify your account settings manually.



            > Yahoo! Groups Links
          • p.de.reus@falconleven.nl
            Hi Patrick, I ve discovered a flaw in your reasoning: BTW: I m a many year GnuEmacs user, but jasspa interest me for many reasons - size being the first. and
            Message 5 of 7 , Nov 15, 2004
            • 0 Attachment

              Hi Patrick,

              I've discovered a flaw in your reasoning:
                      BTW: I'm a many year GnuEmacs user, but jasspa interest me for many reasons - size being the first.
              and

                      Hoping to integrate a lisp or python jit compiler, eventually audio and video editing, and 3d modeling and         simulation etc.

              If you like the size of ME, it helps to focus on text editing only ;=)

              Just my 5c


              Paul



              ***********************DISCLAIMER***********************
              Deze e-mail is uitsluitend bestemd voor de geadresseerde(n).
              Verstrekking aan en gebruik door anderen is niet toegestaan.
              Falcon Leven N.V. sluit iedere aansprakelijkheid uit die
              voortvloeit uit elektronische verzending.
              This e-mail is intended exclusively for the addressee(s),
              and may not be passed on to, or made available for use
              by any person other than the addressee(s).
              Falcon Leven N.V. rules out any and every liability
              resulting from any electronic transmission.
              ********************************************************
            • Deak, Ferenc
              ... I use me and vim paralel for editing. Me is really fast, and I like it very much, but if I can comment this thread, personally I also would like to see a
              Message 6 of 7 , Nov 15, 2004
              • 0 Attachment
                > Hi Patrick,
                >
                > I've discovered a flaw in your reasoning:
                > BTW: I'm a many year GnuEmacs user, but jasspa interest me for
                > many reasons - size being the first.
                > and
                > Hoping to integrate a lisp or python jit compiler, eventually
                > audio and video editing, and 3d modeling and simulation etc.
                >
                > If you like the size of ME, it helps to focus on text editing only ;=)
                >

                I use me and vim paralel for editing. Me is really fast, and I like it very
                much, but if I can comment this thread, personally I also would like to see
                a more "standard" or more "feature-full" or "less-weird" but small interpreter
                in Jasspa. For example newlisp (www.newlisp.org), or Lua (www.lua.org)
                binaries are all under 100K... (yes I know that none of them are really
                standard, but they are widely used...)

                I think using me's lisp is a little pain compared to a real lisp. But I
                understand that converting all macros is a huge work...

                Ferenc Deak
              • Patrick Anderson
                Size was the wrong choice of words on my part. While size is of some importance to me, complexity is what I fear most. My true interest is the
                Message 7 of 7 , Nov 15, 2004
                • 0 Attachment
                  Size was the wrong choice of words on my part.

                  While size is of some importance to me, complexity is what I fear most.

                  My true interest is the feature/complexity ratio. Maximizing features while minimizing complexity.

                  My "request for input" was concerning a project which will be very separate from ME.

                  Begining with a small editor such as ME or http://fabrice.bellard.free.fr/qemacs or http://biew.sf.net or http://hte.sf.net

                  The vision is to pull the OS back through the editor so you never need to leave your favorite environment. Use a compiled language (set up as JIT) and cache the compiled images to achieve high performance. What I'm suggesting is certainly not new*. Just another shot at it.

                  PS: Sorry if I'm causing grief here. Just ignore me if so.


                  * Programming Languages as Operating Systems (or, Revenge of the Son of the Lisp Machine) Matthew Flatt and Robert Bruce Findler and Shriram Krishnamurthi and Matthias Felleisen. http://www.ccs.neu.edu/scheme/pubs/icfp99-ffkf.pdf




                  -----Original Message-----
                  From: p.de.reus@... [mailto:p.de.reus@...]
                  Sent: Mon 11/15/2004 2:14 AM
                  To: jasspa@yahoogroups.com
                  Subject: Re: [jasspa] MinGW Makefile

                  Hi Patrick,

                  I've discovered a flaw in your reasoning:
                  BTW: I'm a many year GnuEmacs user, but jasspa interest me for
                  many reasons - size being the first.
                  and
                  Hoping to integrate a lisp or python jit compiler, eventually
                  audio and video editing, and 3d modeling and simulation etc.

                  If you like the size of ME, it helps to focus on text editing only ;=)

                  Just my 5c


                  Paul



                  ***********************DISCLAIMER***********************
                  Deze e-mail is uitsluitend bestemd voor de geadresseerde(n).
                  Verstrekking aan en gebruik door anderen is niet toegestaan.
                  Falcon Leven N.V. sluit iedere aansprakelijkheid uit die
                  voortvloeit uit elektronische verzending.
                  This e-mail is intended exclusively for the addressee(s),
                  and may not be passed on to, or made available for use
                  by any person other than the addressee(s).
                  Falcon Leven N.V. rules out any and every liability
                  resulting from any electronic transmission.
                  ********************************************************
                Your message has been successfully submitted and would be delivered to recipients shortly.