home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / UTILS / H-O / LESS177 / MAKEFILE < prev    next >
Text File  |  1993-01-26  |  3KB  |  101 lines

  1. # Makefile for "less"
  2. # Generated Wed Jun 10 19:52:11 CDT 1992 by linstall.
  3. #
  4. # Invoked as:
  5. #    make all
  6. #   or    make install
  7. # Plain "make" is equivalent to "make all".
  8. #
  9. # If you add or delete functions, remake funcs.h by doing:
  10. #    make newfuncs
  11. # This depends on the coding convention of function headers looking like:
  12. #    " \t public <function-type> \n <function-name> ( ... ) "
  13. #
  14. # Also provided:
  15. #    make lint    # Runs "lint" on all the sources.
  16. #    make clean    # Removes "less" and the .o files.
  17. #    make clobber    # Pretty much the same as make "clean".
  18.  
  19. ##########################################################################
  20. # Compilation environment.
  21. ##########################################################################
  22.  
  23. # compiler
  24.  
  25. CC = gcc
  26.  
  27. # LIBS is the list of libraries needed.
  28. LIBS = -ltermc
  29.  
  30. # OPTIM is passed to the compiler and the loader.
  31. # It is normally "-O" but may be, for example, "-g".
  32. OPTIM = -O3
  33.  
  34. DEFINES = -DOS2
  35.  
  36. CFLAGS = -Zomf -Zmt
  37.  
  38. LDLIBS =
  39.  
  40. ##########################################################################
  41. # Files
  42. ##########################################################################
  43.  
  44. SRC1 =    ch.c cmdbuf.c command.c decode.c help.c input.c 
  45. SRC2 =    line.c linenum.c edit.c option.c optfunc.c \
  46.     opttbl.c os.c 
  47. SRC3 =    charset.c filename.c lsystem.c output.c position.c ifile.c \
  48.     brac.c forwback.c jump.c search.c main.c vecho.c glob.c
  49. SRC4 =    mark.c prompt.c screen.c signal.c tags.c ttyin.c version.c regex.c
  50.  
  51. SRC =    $(SRC1) $(SRC2) $(SRC3) $(SRC4) scr.c
  52.  
  53. O   = .obj
  54.  
  55. DEF = less.def
  56.  
  57. DEF2 = lesskey.def
  58.  
  59. OBJ =    brac$O ch$O charset$O cmdbuf$O command$O decode$O edit$O filename$O \
  60.     forwback$O help$O input$O jump$O line$O linenum$O \
  61.     lsystem$O option$O optfunc$O opttbl$O os$O \
  62.     output$O position$O mark$O ifile$O prompt$O screen$O \
  63.     search$O signal$O tags$O ttyin$O version$O regex$O zfiles$O scr$O
  64.  
  65. OBJ2 = main$O glob$O
  66.  
  67. DEF = less.def
  68.  
  69. .SUFFIXES: .c $(O)
  70.  
  71. .c$(O):
  72.     $(CC) $(CFLAGS) $(OPTIM) $(DEFINES) -c $*.c
  73.  
  74. ##########################################################################
  75. # Rules for building stuff
  76. ##########################################################################
  77.  
  78. all: less.exe lesskey.exe
  79.  
  80. less.exe: $(OBJ) $(OBJ2)
  81.     $(CC) $(CFLAGS) -s -o less.exe $(OBJ) $(OBJ2) $(DEF) $(LIBS)
  82.  
  83. lesskey.exe: lesskey$O
  84.     $(CC) $(CFLAGS) -o lesskey.exe lesskey$O $(DEF2)
  85.  
  86.  
  87. ##########################################################################
  88. # Dependencies
  89. ##########################################################################
  90.  
  91. $(OBJ) $(OBJ2): less.h funcs.h defines.h position.h regex.h
  92.  
  93. command$O decode$O: cmd.h
  94.  
  95. option$O opttbl$O optfunc$O: option.h
  96.  
  97. $(OBJ2): glob.h
  98.  
  99. lesskey$O: less.h funcs.h defines.h cmd.h
  100.  
  101.