home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / memacs32.zip / os2 / makefile < prev    next >
Makefile  |  1994-03-20  |  5KB  |  150 lines

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