home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vile-src.zip / vile-8.1 / makefile.djg < prev    next >
Makefile  |  1998-07-27  |  3KB  |  121 lines

  1. #
  2. # makefile for vile using DJGCC 1.09 and  GNU's MAKE 3.58
  3. #
  4. # T.DANG (dang@cogit.ign.fr)
  5. #
  6. # $Header: /usr/build/vile/vile/RCS/makefile.djg,v 1.26 1998/07/28 00:10:52 tom Exp $
  7. #
  8. #
  9.  
  10. CC = gcc
  11. LONGARGS = gcc
  12.  
  13. DEBUG = -g
  14. #OPTIM =
  15.  
  16. #DEBUG =
  17. OPTIM = -O2
  18.  
  19. # Use these two lines for the IBM/PC display (not DPMI compatible).
  20. #CFLAGS= -Wall $(DEBUG) $(OPTIM) -DDISP_IBMPC -Dscrn_chosen
  21. #DISP_SRC = ibmpc.c
  22.  
  23. # Use these two lines for the Borland/CONIO display (DPMI compatible).
  24. CFLAGS= -Wall $(DEBUG) $(OPTIM) -DDISP_BORLAND -Dscrn_chosen
  25. DISP_SRC = borland.c gppconio.c
  26.  
  27. # these are normal editable headers
  28. HDRS = estruct.h edef.h proto.h dirstuff.h
  29.  
  30. # these headers are built by the mktbls program from the information in cmdtbl
  31. # and in modetbl
  32. BUILTHDRS = nebind.h neproto.h nefunc.h nemode.h nename.h nevars.h nefkeys.h nefsms.h
  33.  
  34. SRC =     main.c $(DISP_SRC) basic.c bind.c btree.c buffer.c crypt.c \
  35.     csrch.c display.c eval.c exec.c externs.c fences.c file.c filec.c \
  36.     fileio.c finderr.c glob.c globals.c history.c \
  37.     input.c insert.c itbuff.c isearch.c \
  38.     line.c modes.c msgs.c npopen.c oneliner.c opers.c \
  39.     path.c random.c regexp.c \
  40.     region.c search.c select.c spawn.c \
  41.     tags.c tbuff.c termio.c undo.c \
  42.     version.c window.c word.c wordmov.c map.c djhandl.c
  43.  
  44. OBJ =    $(SRC:.c=.o)
  45.  
  46. %.o:    %.c estruct.h nemode.h edef.h proto.h
  47.     $(CC) $(CFLAGS) -c $< -o $@
  48.  
  49. vile :     $(BUILTHDRS) $(OBJ)
  50.     $(CC) $(CFLAGS) -o $@ $(OBJ) -lpc
  51.     coff2exe $@
  52.     -stubedit vile.exe globbing=no
  53.  
  54. c-filt : c-filt.o
  55.     $(CC) $(CFLAGS) -o $@ c-filt.o -lpc
  56.     coff2exe $@
  57.     -stubedit $@.exe globbing=no
  58.  
  59. dist :    vile
  60.     strip vile
  61.     coff2exe vile
  62.     -stubedit vile.exe globbing=no
  63.     pkzip pcvile.zip readme.pc readme vile.exe vile.hlp 
  64.     cd macros
  65.     pkzip pcvile.zip pictmode.rc digraphs.rc 
  66.     cd ..
  67.     pkzip pcvile.zip \\djgpp\\bin\\go32.exe
  68.  
  69. # for my poor slow omnibook, i do incremental linking when working on
  70. # just a couple of modules...
  71. NOBJ = $(OBJ)
  72. NOBJ := $(filter-out ibmpc.o, $(NOBJ))
  73. NOBJ := $(filter-out filec.o, $(NOBJ))
  74. NOBJ := $(filter-out glob.o, $(NOBJ))
  75. XOBJ =  ibmpc.o filec.o glob.o
  76.  
  77. rvile.o: $(NOBJ)
  78.     ld -r -o rvile.o $(NOBJ) -L/djgpp/lib -lpc -lc -lgcc
  79.  
  80. ivile: $(XOBJ) rvile.o
  81.     ld -o vile /djgpp/lib/crt0.o rvile.o $(XOBJ) -L/djgpp/lib -lpc -lc -lgcc
  82.     coff2exe vile
  83.  
  84. nebind.h \
  85. nefunc.h \
  86. nename.h :    cmdtbl mktbls.exe
  87.     mktbls.exe cmdtbl
  88.  
  89. nevars.h \
  90. nefsms.h \
  91. nemode.h:    modetbl mktbls.exe
  92.     mktbls.exe modetbl
  93.  
  94. mktbls.exe:  mktbls.c
  95.     $(CC) mktbls.c -o mktbls
  96.     coff2exe mktbls
  97.     rm -f mktbls
  98.  
  99. clean:
  100.     rm -f mktbls.exe
  101.     rm -f *.o
  102.     rm -f ne*.h
  103.  
  104. bind.o:        nefunc.h
  105. eval.o:        nevars.h
  106. exec.o:        nefunc.h
  107. externs.o:    nebind.h nename.h neproto.h nefunc.h
  108. filec.o:    dirstuff.h
  109. glob.o:        dirstuff.h
  110. globals.o:    nefunc.h
  111. main.o:        chgdfunc.h nevars.h
  112. modes.o:    chgdfunc.h
  113. opers.o:    nefunc.h
  114. path.o:        dirstuff.h
  115. random.o:    nefunc.h
  116. select.o:    nefunc.h
  117. spawn.o:    nefunc.h
  118. termio.o:    nefunc.h
  119. version.o:    patchlev.h
  120. word.o:        nefunc.h
  121.