home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / ue312os2.zip / os2 / makefile.emx < prev    next >
Makefile  |  1994-04-12  |  5KB  |  161 lines

  1. #     makefile for
  2. #         MicroEMACS 3.12 and EMX-GCC
  3.  
  4. # To use methode (E2) for compiling as described in emxdev.doc/emxdev.inf
  5. # set USEOMFLIBS to 1. (The executable included is compiled in this way)
  6. USEOMFLIBS = 1
  7.  
  8. # modify the following lines with the proper relative directories
  9. # directory to put the file 
  10. BIND = c:/os2/apps
  11. # Name of the target (*.exe)
  12. NEXE = memacs.exe
  13. # Name of your favorite DLL library path (see LIBPATH defined in config.sys)
  14. DLLD = c:/os2/apps/dll
  15. # object file directory
  16. OBJD = .
  17. # source file directory
  18. SRCD = ../src
  19. # header file directory
  20. HDIR = ../h
  21. # system include directory
  22. INCD = $(C_INCLUDE_PATH)
  23.  
  24. # options and arguments to the C compiler
  25. CC = gcc
  26. # The following condinal part of this makefile doesn't work with dmake or
  27. # nmake. If you want to use one of these make utilities you have to comment
  28. # out the unused parts.
  29. ifeq ($(USEOMFLIBS),0)
  30. CFLAGS= -Zmtd -O -I./ -I$(HDIR) 
  31. LDFLAGS= -Zmtd -s
  32. O = .o
  33. else
  34. CFLAGS= -Zmtd -Zomf -O -I./ -I$(HDIR) 
  35. LDFLAGS= -Zmtd -Zomf -s
  36. O = .obj
  37. endif
  38.  
  39. # list of header files
  40.  
  41. HFILES = estruct.h $(HDIR)/edef.h $(HDIR)/efunc.h $(HDIR)/epath.h $(HDIR)/ebind.h $(HDIR)/eproto.h
  42.  
  43. #list of source files
  44.  
  45. F1 = $(OBJD)/basic$O $(OBJD)/bind$O $(OBJD)/buffer$O
  46. F2 = $(OBJD)/char$O $(OBJD)/crypt$O $(OBJD)/display$O  $(OBJD)/dolock$O
  47. F3 = $(OBJD)/eval$O $(OBJD)/exec$O $(OBJD)/file$O
  48. F4 = $(OBJD)/fileio$O $(OBJD)/os2$O $(OBJD)/input$O $(OBJD)/keyboard$O
  49. F5 = $(OBJD)/isearch$O $(OBJD)/line$O $(OBJD)/lock$O $(OBJD)/mouse$O
  50. F6 = $(OBJD)/main$O $(OBJD)/os2npm$O $(OBJD)/screen$O #$(OBJD)/mouse$O 
  51. F7 = $(OBJD)/random$O $(OBJD)/region$O $(OBJD)/search$O $(OBJD)/replace$O
  52. F8 = $(OBJD)/tags$O $(OBJD)/window$O $(OBJD)/word$O
  53.  
  54. # product list
  55.  
  56. all: $(NEXE)
  57.  
  58. # compilation rules
  59.  
  60. $(OBJD)/basic$O: $(SRCD)/basic.c $(HFILES)
  61.     $(CC) $(CFLAGS) -c -o $(OBJD)/basic$O $(SRCD)/basic.c
  62.  
  63. $(OBJD)/bind$O: $(SRCD)/bind.c $(HFILES)
  64.     $(CC) $(CFLAGS) -c -o $(OBJD)/bind$O $(SRCD)/bind.c
  65.  
  66. $(OBJD)/buffer$O: $(SRCD)/buffer.c $(HFILES)
  67.     $(CC) $(CFLAGS) -c -o $(OBJD)/buffer$O $(SRCD)/buffer.c
  68.  
  69. $(OBJD)/char$O: $(SRCD)/char.c $(HFILES)
  70.     $(CC) $(CFLAGS) -c -o $(OBJD)/char$O $(SRCD)/char.c
  71.  
  72. $(OBJD)/crypt$O: $(SRCD)/crypt.c $(HFILES)
  73.     $(CC) $(CFLAGS) -c -o $(OBJD)/crypt$O $(SRCD)/crypt.c
  74.  
  75. $(OBJD)/cmdfix$O: $(SRCD)/cmdfix.c $(HFILES)
  76.     $(CC) $(CFLAGS) -c -o $(OBJD)/cmdfix$O $(SRCD)/cmdfix.c
  77.  
  78. $(OBJD)/display$O: $(SRCD)/display.c $(HFILES)
  79.     $(CC) $(CFLAGS) -c -o $(OBJD)/display$O $(SRCD)/display.c
  80.  
  81. $(OBJD)/dolock$O: $(SRCD)/dolock.c $(HFILES)
  82.     $(CC) $(CFLAGS) -c -o $(OBJD)/dolock$O $(SRCD)/dolock.c
  83.  
  84. $(OBJD)/eval$O: $(SRCD)/eval.c $(HFILES) $(HDIR)/evar.h
  85.     $(CC) $(CFLAGS) -c -o $(OBJD)/eval$O $(SRCD)/eval.c
  86.  
  87. $(OBJD)/exec$O: $(SRCD)/exec.c $(HFILES)
  88.     $(CC) $(CFLAGS) -c -o $(OBJD)/exec$O $(SRCD)/exec.c
  89.  
  90. $(OBJD)/file$O: $(SRCD)/file.c $(HFILES)
  91.     $(CC) $(CFLAGS) -c -o $(OBJD)/file$O $(SRCD)/file.c
  92.  
  93. $(OBJD)/fileio$O: $(SRCD)/fileio.c $(HFILES)
  94.     $(CC) $(CFLAGS) -c -o $(OBJD)/fileio$O $(SRCD)/fileio.c
  95.  
  96. $(OBJD)/keyboard$O: $(SRCD)/keyboard.c $(HFILES)
  97.     $(CC) $(CFLAGS) -c -o $(OBJD)/keyboard$O $(SRCD)/keyboard.c
  98.  
  99. $(OBJD)/os2$O: $(SRCD)/os2.c $(HFILES)
  100.     $(CC) $(CFLAGS) -c -o $(OBJD)/os2$O $(SRCD)/os2.c
  101.  
  102. $(OBJD)/input$O: $(SRCD)/input.c $(HFILES)
  103.     $(CC) $(CFLAGS) -c -o $(OBJD)/input$O $(SRCD)/input.c
  104.  
  105. $(OBJD)/isearch$O: $(SRCD)/isearch.c $(HFILES)
  106.     $(CC) $(CFLAGS) -c -o $(OBJD)/isearch$O $(SRCD)/isearch.c
  107.  
  108. $(OBJD)/line$O: $(SRCD)/line.c $(HFILES)
  109.     $(CC) $(CFLAGS) -c -o $(OBJD)/line$O $(SRCD)/line.c
  110.  
  111. $(OBJD)/lock$O: $(SRCD)/lock.c $(HFILES)
  112.     $(CC) $(CFLAGS) -c -o $(OBJD)/lock$O $(SRCD)/lock.c
  113.  
  114. $(OBJD)/main$O: $(SRCD)/main.c $(HFILES)
  115.     $(CC) $(CFLAGS) -c -o $(OBJD)/main$O $(SRCD)/main.c
  116.  
  117. $(OBJD)/mouse$O: $(SRCD)/mouse.c $(HFILES)
  118.     $(CC) $(CFLAGS) -c -o $(OBJD)/mouse$O $(SRCD)/mouse.c
  119.  
  120. $(OBJD)/os2npm$O: $(SRCD)/os2npm.c $(HFILES)
  121.     $(CC) $(CFLAGS) -c -o $(OBJD)/os2npm$O $(SRCD)/os2npm.c
  122.  
  123. $(OBJD)/random$O: $(SRCD)/random.c $(HFILES)
  124.     $(CC) $(CFLAGS) -c -o $(OBJD)/random$O $(SRCD)/random.c
  125.  
  126. $(OBJD)/region$O: $(SRCD)/region.c $(HFILES)
  127.     $(CC) $(CFLAGS) -c -o $(OBJD)/region$O $(SRCD)/region.c
  128.  
  129. $(OBJD)/search$O: $(SRCD)/search.c $(HFILES)
  130.     $(CC) $(CFLAGS) -c -o $(OBJD)/search$O $(SRCD)/search.c
  131.  
  132. $(OBJD)/replace$O: $(SRCD)/replace.c $(HFILES)
  133.     $(CC) $(CFLAGS) -c -o $(OBJD)/replace$O $(SRCD)/replace.c
  134.  
  135. $(OBJD)/screen$O: $(SRCD)/screen.c $(HFILES)
  136.     $(CC) $(CFLAGS) -c -o $(OBJD)/screen$O $(SRCD)/screen.c
  137.  
  138. $(OBJD)/tags$O: $(SRCD)/tags.c $(HFILES)
  139.     $(CC) $(CFLAGS) -c -o $(OBJD)/tags$O $(SRCD)/tags.c
  140.  
  141. $(OBJD)/window$O: $(SRCD)/window.c $(HFILES)
  142.     $(CC) $(CFLAGS) -c -o $(OBJD)/window$O $(SRCD)/window.c
  143.  
  144. $(OBJD)/word$O: $(SRCD)/word.c $(HFILES)
  145.     $(CC) $(CFLAGS) -c -o $(OBJD)/word$O $(SRCD)/word.c
  146.  
  147. $(NEXE): $(F1) $(F2) $(F3) $(F4) $(F5) $(F6) $(F7) $(F8)
  148.     $(CC) $(LDFLAGS) -o $(NEXE) emacs.def $(F1) $(F2) $(F3) $(F4) $(F5) $(F6) $(F7) $(F8)
  149.  
  150. install:
  151.     copy *.dll $(DLLD)
  152.     copy $(NEXE) $(BIND)\$(NEXE)
  153.     copy ..\emacs.rc $(BIND)
  154.     copy ..\*.cmd $(BIND)
  155.     copy ..\ehelp?.txt $(BIND)
  156.  
  157. clean:
  158.     if exist *$O del *$O
  159.     if exist $(NEXE) del $(NEXE)
  160.     if exist core del core
  161.