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

  1. # Makefile for ME
  2. # modified to compile using the emx/gcc compiler, version 0.8h
  3. # I use dmake -- I guess GNU make will work, too
  4. ##########################################################################
  5. ##             Start of User Configuration            ##
  6. ##########################################################################
  7.  
  8. # You may also need to configure config.h.  It tries to self configure,
  9. #   but there is a chance it may not.
  10.  
  11. # Some of the files mentioned here are in the misc/ directory.  If you
  12. # want to use one of them, copy it to this directory before compiling.
  13.  
  14. #
  15. # This makefile is set up to build three `versions' of the executables.
  16. # The appropriate variables for each is set below.
  17. #
  18.  
  19. # Terminal library.
  20. # for emx, use -lvideo if using the emx video libraries (emx2io.c).  If using
  21. # OS/2 vio calls (emx1io.c), don't use anything here.
  22. # normal case -- vio for video
  23. #TERMLIB=
  24. # emx's video library (emx2io.c).  This allows a 32-bit DOS executable,
  25. # but it's slower.
  26. #TERMLIB = -lvideo
  27.  
  28. # I/O type.  Use 1 of (used to configure config.h):
  29. #   blank    : The normal case
  30. #   -DXIO    : If using X11
  31. #
  32. IO_TYPE = -DPCIO=1
  33.  
  34. # I/O.  Use 1 of:
  35. #   emx1io$O    : OS/2 only.  Uses vio and kbd
  36. #   emx2io$O    : OS/2 and MS-DOS.  Uses emx's -lvideo and termio
  37. #normal case:
  38. #IO = emx1io$O
  39. # emx's -lvideo (slower than vio) (in misc/)
  40. #IO = emx2io$O
  41.  
  42. # "Special" keymap support (above and beyond ASCII).  Use 1 of:
  43. KEYMAP = os2kmap$O
  44.  
  45. # How to read and write files.  Use 1 of:
  46. #   fileio.c     : The normal case
  47. #   pcfileio.obj : Special support for IBM PCs.  Implements a cached
  48. #        read using some asm code.  Your compiler may not be able to
  49. #        compile it.  (in misc/).  You don't need this, fileio.c
  50. #        works fine.
  51. #
  52. # we don't use os2filio.c, since all this does is {\it decrease} the size
  53. # of the stdio cache
  54. FILEIO = fileio$O
  55.  
  56. # Compute server library.  Make sure you sync this with COMPUTE_SERVER
  57. #   in config.h.
  58. #   if COMPUTE_SERVER is 1:
  59. #     ../comserver/cliserve.a : non-SYSV unix, no MS-DOS
  60. #   if COMPUTE_SERVER is 0:
  61. #     blank : If your OS doesn't support the compute server.  The simple case.
  62. #
  63. #PROCESS = ../comserver/cliserve.a    # unixen
  64. PROCESS =    # atariST (TOS/MiNT) (yes MiNT too!)
  65.  
  66. # What Mutt code to compile into ME
  67. # Use:
  68. #   ../mutt/builtin/me3.mco
  69. #   or your own Mutt file.
  70. # Note:  The Mutt code must be compiled before this Makefile is run.
  71. #
  72. internal_Mutt = ../mutt/builtin/me3.mco        #./boot.mco
  73.  
  74. ##########################################################################
  75. ##            End of User Configuration            ##
  76. ##########################################################################
  77.  
  78. SRC = bag.c basic.c buffer.c bvar.c display.c file.c line.c         \
  79.    main.c os.c misc.c mline.c mark.c random.c region.c regexp.c search.c \
  80.    spawn.c window.c word.c undo.c key.c help.c mmaux.c mmfcn.c mmfcn2.c  \
  81.    case.c process.c mutt.c
  82.  
  83. OBJ = $(SRC:.c=$O)
  84.  
  85. LIB = ../util/util$A ../ed/ed$A ../ed/led$A ../mc/mm2$A
  86.  
  87.  
  88. ME_OBJ = $(OBJ) $(TERMINAL) $(IO) $(KEYMAP) $(FILEIO)
  89.  
  90. CFLAGS = $(BASECFLAGS) $(IO_TYPE) -I. -I../mc -I../ed -I../util
  91.  
  92. oops .PHONY:
  93.     @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"
  94.  
  95. emx-mt .PHONY :
  96.     $(MAKE) $(MAKEFILE) O=.obj A=.lib BASECFLAGS="-Zomf -Zmtd $(BASECFLAGS)" CC=$(CC) \
  97.       LDFLAGS="-Zomf -Zmtd -Zlinker /base:0x10000/align:4/exepack/st:0x9000 -s" \
  98.       IO=emx1io.obj TERMLIB="" DEF=me3.def ME
  99.  
  100. emx-st .PHONY :
  101.     $(MAKE) $(MAKEFILE) O=.obj A=.lib BASECFLAGS="-Zomf -Zsys $(BASECFLAGS)" CC=$(CC) \
  102.       LDFLAGS="-Zomf -Zsys -Zlinker /base:0x10000/align:4/exepack/st:0x9000 -s" \
  103.       IO=emx1io.obj TERMLIB="" DEF=me3.def ME
  104.  
  105. emx-dos .PHONY :
  106.     $(MAKE) $(MAKEFILE) O=.o A=.a BASECFLAGS="$(BASECFLAGS)" CC=$(CC) \
  107.       LDFLAGS="-s" IO=emx2io.o TERMLIB="-lvideo" DEF="" ME
  108.  
  109. ME .PHONY: announce me3$E
  110.  
  111. announce .PHONY:
  112.     @echo "**** Building the Mutt Editor ********"
  113.     @echo "CC is:" $(CC)
  114.     @echo "CFLAGS are:" $(CFLAGS)
  115.  
  116.  
  117. me3$E: mutt.c $(ME_OBJ) $(LIB)
  118.     $(CC) -o me3$E $(ME_OBJ) $(PROCESS) $(DEF) -L../mc -L../ed -L../util \
  119.     -lmm2 -lled -led -lutil $(TERMLIB) $(LDFLAGS)
  120.  
  121.     # build the internal Mutt code
  122. mutt.c : $(internal_Mutt)
  123.     ../mc/mco_to_c $(internal_Mutt) > mutt.c
  124.  
  125. clean:
  126.     rm -f *.obj *.o mutt.c
  127.  
  128. realclean: clean
  129.     rm -f me3$E
  130.