2 # Generated Sun Aug 16 09:47:26 PDT 1992 by linstall.
7 # Plain "make" is equivalent to "make all".
9 # If you add or delete functions, remake funcs.h by doing:
11 # This depends on the coding convention of function headers looking like:
12 # " \t public <function-type> \n <function-name> ( ... ) "
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".
22 ##########################################################################
23 # Compilation environment.
24 ##########################################################################
26 # LIBS is the list of libraries needed.
29 # INSTALL_LESS is a list of the public versions of less.
30 # INSTALL_KEY is a list of the public versions of lesskey.
31 # INSTALL_HELP is a list of the public version of the help file.
32 # INSTALL_LESSMAN is a list of the public versions of the less manual page.
33 # INSTALL_KEYMAN is a list of the public versions of the lesskey manual page.
34 INSTALL_LESS = $(ROOT)/usr/local/bin/less
35 INSTALL_KEY = $(ROOT)/usr/local/bin/lesskey
36 INSTALL_HELP = $(ROOT)/usr/local/bin/less.hlp
37 INSTALL_LESSMAN = $(ROOT)/usr/local/man/man1/less.1
38 INSTALL_KEYMAN = $(ROOT)/usr/local/man/man1/lesskey.1
39 LESS_MANUAL = less.nro
40 KEY_MANUAL = lesskey.nro
41 HELPFILE = /usr/local/bin/less.hlp
44 # OPTIM is passed to the compiler and the loader.
45 # It is normally "-O" but may be, for example, "-g".
52 ##########################################################################
54 ##########################################################################
56 SRC1 = ch.c cmdbuf.c command.c decode.c help.c input.c
57 SRC2 = line.c linenum.c main.c edit.c option.c optfunc.c \
59 SRC3 = charset.c filename.c lsystem.c output.c position.c ifile.c \
60 brac.c forwback.c jump.c search.c
61 SRC4 = mark.c prompt.c screen.c signal.c tags.c ttyin.c version.c
63 SRC = $(SRC1) $(SRC2) $(SRC3) $(SRC4)
65 OBJ = brac.o ch.o charset.o cmdbuf.o command.o decode.o edit.o filename.o \
66 forwback.o help.o input.o jump.o line.o linenum.o \
67 lsystem.o main.o option.o optfunc.o opttbl.o os.o \
68 output.o position.o mark.o ifile.o prompt.o screen.o \
69 search.o signal.o tags.o ttyin.o version.o
72 ##########################################################################
73 # Rules for building stuff
74 ##########################################################################
77 install: install_less install_help install_key install_lman install_kman
80 $(CC) $(LDFLAGS) $(OPTIM) -o less $(OBJ) $(LIBS) $(LDLIBS)
83 $(CC) $(LDFLAGS) $(OPTIM) -o lesskey lesskey.o $(LDLIBS)
86 for f in $(INSTALL_LESS); do rm -f $$f; cp less $$f; done
90 for f in $(INSTALL_KEY); do rm -f $$f; cp lesskey $$f; done
93 install_help: less.hlp
94 for f in $(INSTALL_HELP); do rm -f $$f; cp less.hlp $$f; done
97 install_lman: $(LESS_MANUAL)
98 for f in $(INSTALL_LESSMAN); do rm -f $$f; cp $(LESS_MANUAL) $$f; done
101 install_kman: $(KEY_MANUAL)
102 for f in $(INSTALL_KEYMAN); do rm -f $$f; cp $(KEY_MANUAL) $$f; done
105 ##########################################################################
107 ##########################################################################
113 if [ -f funcs.h ]; then mv funcs.h funcs.h.OLD; fi
114 awk -f mkfuncs.awk $(SRC) >funcs.h
117 rm -f $(OBJ) lesskey.o less lesskey vecho
120 rm -f *.o less lesskey vecho install_less install_key \
121 install_help install_lman install_kman
124 shar -v README CHANGES linstall \
125 less.nro lesskey.nro \
126 vecho.c mkfuncs.awk > less1.shr
127 shar -v less.man lesskey.man \
128 less.h position.h cmd.h option.h > less2.shr
129 shar -v lesskey.c $(SRC1) > less3.shr
130 shar -v $(SRC2) > less4.shr
131 shar -v $(SRC3) less.hlp > less5.shr
132 shar -v $(SRC4) funcs.h > less6.shr
135 ##########################################################################
137 ##########################################################################
139 $(OBJ): less.h funcs.h defines.h position.h
140 command.o decode.o: cmd.h
141 option.o opttbl.o optfunc.o: option.h
143 lesskey.o: less.h funcs.h defines.h cmd.h