home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / me34exe.zip / makefile.emx < prev    next >
Makefile  |  1995-01-21  |  4KB  |  129 lines

  1. # gcc/emx .8h Makefile for all of ME on OS/2
  2. # Invokes make in each of the sub-directories to make everything.
  3. #
  4. # To build ME: "make -fmakefile.emx"
  5. # To clean up the .obj files (leaving libraries): "make -fmakefile.emx clean"
  6. # To remove everything but the source:          "make -fmakefile.emx realclean"
  7. #
  8. # To install:
  9. #   Check the "Installation" section (below) then:
  10. #        "make -fmakefile.emx install"
  11. #
  12. # Before invoking make you must configure the following:
  13. #    ./Makefile.emx (this file!)
  14. #
  15. ##########################################################################
  16. ##             start of user configuration            ##
  17. ##########################################################################
  18.  
  19. # Installation directories:
  20. #  BIN is where to put the binaries (me3 and mc2)
  21. #  MUTTLIB is where to put the ME3 extension libraries.
  22. #    Make sure this directory matches what you have in me/config.h
  23. #  DOC is where to put the documation files.  Normally the same as MUTTLIB
  24. #    because that makes it easy for ME to look for the doc files.
  25. # Normal OS/2 case:
  26. #   BIN = C:/bin or whatever you have for a bin directory
  27. #   MUTTLIB = C:/me3
  28. #   DOC = $(MUTTLIB)
  29. BIN = C:\bin
  30. MUTTLIB = C:\me3
  31. DOC = $(MUTTLIB)
  32.  
  33. CC=gcc
  34. # how do you want to optimise that?
  35. BASECFLAGS="-O2 -fstrength-reduce"
  36.  
  37. ##########################################################################
  38. ##            End of User Configuration            ##
  39. ##########################################################################
  40.  
  41. # you can compile a multi-threaded, omf version, a single-threaded omf version
  42. # or a single-threaded emx version.  The multi-threaded version is about
  43. # 40k smaller, since its C library is in emxcdll.dll.  The emx version will
  44. # work under DOS.  The single-threaded omf version doesn't require emx.dll or
  45. # emxlibc.dll
  46. # The multi-threaded version doesn't really use multiple threads (but it will
  47. # if I do a PM version)
  48.  
  49. oops .PHONY:
  50.     @echo "You need to specify which version to compile\n\temx-mt\tOS/2-only using emx.dll and emxlibc.dll\n\temx-st\tOS/2-only with no special .dlls\n\temx-dos\tOS/2 and DOS using emx.dll or emx.exe"
  51.  
  52. emx-mt .PHONY : announce
  53.     @cd ed
  54.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-mt
  55.     @cd ..\util
  56.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-mt
  57.     @cd ..\mc
  58.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-mt
  59.     @cd ..\mutt
  60.     $(MAKE) $(MAKEFILE)
  61.     @cd ..\me
  62.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-mt
  63.     @cd ..
  64.  
  65. emx-st .PHONY : announce
  66.     @cd ed
  67.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-st
  68.     @cd ..\util
  69.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-st
  70.     @cd ..\mc
  71.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-st
  72.     @cd ..\mutt
  73.     $(MAKE) $(MAKEFILE)
  74.     @cd ..\me
  75.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-st
  76.     @cd ..
  77.  
  78. emx-dos .PHONY : announce
  79.     @cd ed
  80.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-dos
  81.     @cd ..\util
  82.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-dos
  83.     @cd ..\mc
  84.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-dos
  85.     @cd ..\mutt
  86.     $(MAKE) $(MAKEFILE)
  87.     @cd ..\me
  88.     $(MAKE) $(MAKEFILE) BASECFLAGS="$(BASECFLAGS)" CC=$(CC) emx-dos
  89.     @cd ..
  90.  
  91. announce .PHONY:
  92.     @echo "*************** Building the Mutt Editor *******************"
  93.  
  94. # clean just cleans up objects
  95. clean:
  96.     @cd ed
  97.     @$(MAKEF) clean
  98.     @cd ..\util
  99.     @$(MAKEF) clean
  100.     @cd ..\mc
  101.     @$(MAKEF) clean
  102.     @cd ..\mutt
  103.     @$(MAKED) clean
  104.     @cd ..\me
  105.     @$(MAKEF) clean
  106.     @cd ..
  107.  
  108. # realclean cleanup objects, libraries, executables and .mco's
  109. realclean:
  110.     @cd ed
  111.     @$(MAKEF) realclean
  112.     @cd ..\util
  113.     @$(MAKEF) realclean
  114.     @cd ..\mc
  115.     @$(MAKEF) realclean
  116.     @cd ..\mutt
  117.     @$(MAKED) realclean
  118.     @cd ..\me
  119.     @$(MAKEF) realclean
  120.     @cd ..
  121.  
  122. install:
  123.     copy me\me3.exe $(BIN)
  124.     copy mc\mc2.exe $(BIN)
  125.     mkdir $(MUTTLIB)
  126.     copy mutt\package\*.mco $(MUTTLIB)
  127.     copy doc\*.doc $(DOC)
  128.     copy doc\*.idx $(DOC)
  129.