Annotation of 43BSDReno/contrib/mh/miscellany/less/makefile.xen, revision 1.1.1.1

1.1       root        1: # Makefile for "less"
                      2: #
                      3: # Invoked as:
                      4: #      make all
                      5: #   or make install
                      6: # Plain "make" is equivalent to "make all".
                      7: #
                      8: # If you add or delete functions, remake funcs.h by doing:
                      9: #      make newfuncs
                     10: # This depends on the coding convention of function headers looking like:
                     11: #      " \t public <function-type> \n <function-name> ( ... ) "
                     12: #
                     13: # Also provided:
                     14: #      make lint       # Runs "lint" on all the sources.
                     15: #      make clean      # Removes "less" and the .o files.
                     16: #      make clobber    # Pretty much the same as make "clean".
                     17: 
                     18: 
                     19: ##########################################################################
                     20: # System-specific parameters
                     21: ##########################################################################
                     22: 
                     23: # Define XENIX if running under XENIX 3.0
                     24: XENIX = 1
                     25: 
                     26: # VOID is 1 if your C compiler supports the "void" type,
                     27: # 0 if it does not.
                     28: VOID = 1
                     29: 
                     30: # off_t is the type which lseek() returns.
                     31: # It is also the type of lseek()'s second argument.
                     32: off_t = long
                     33: 
                     34: # TERMIO is 1 if your system has /usr/include/termio.h.
                     35: # This is normally the case for System 5.
                     36: # If TERMIO is 0 your system must have /usr/include/sgtty.h.
                     37: # This is normally the case for BSD.
                     38: TERMIO = 1
                     39: 
                     40: # SIGSETMASK is 1 if your system has the sigsetmask() call.
                     41: # This is normally the case only for BSD 4.2,
                     42: # not for BSD 4.1 or System 5.
                     43: SIGSETMASK = 0
                     44: 
                     45: 
                     46: ##########################################################################
                     47: # Optional and semi-optional features
                     48: ##########################################################################
                     49: 
                     50: # REGCMP is 1 if your system has the regcmp() function.
                     51: # This is normally the case for System 5.
                     52: # RECOMP is 1 if your system has the re_comp() function.
                     53: # This is normally the case for BSD.
                     54: # If neither is 1, pattern matching is supported, but without metacharacters.
                     55: REGCMP = 1
                     56: RECOMP = 0
                     57: 
                     58: # SHELL_ESCAPE is 1 if you wish to allow shell escapes.
                     59: # (This is possible only if your system supplies the system() function.)
                     60: SHELL_ESCAPE = 0
                     61: 
                     62: # EDITOR is 1 if you wish to allow editor invocation (the "v" command).
                     63: # (This is possible only if your system supplies the system() function.)
                     64: # EDIT_PGM is the name of the (default) editor to be invoked.
                     65: EDITOR = 0
                     66: EDIT_PGM = /usr/ucb/vi
                     67: 
                     68: # ONLY_RETURN is 1 if you want RETURN to be the only input which
                     69: # will continue past an error message.
                     70: # Otherwise, any key will continue past an error message.
                     71: ONLY_RETURN = 0
                     72: 
                     73: 
                     74: ##########################################################################
                     75: # Compilation environment.
                     76: ##########################################################################
                     77: 
                     78: # LIBS is the list of libraries needed.
                     79: LIBS = -lcurses -ltermlib
                     80: 
                     81: # INSTALL_LESS is a list of the public versions of less.
                     82: # INSTALL_MAN is a list of the public versions of the manual page.
                     83: INSTALL_LESS = /usr/lbin/less
                     84: INSTALL_MAN =  /usr/man/manl/less.l
                     85: 
                     86: # OPTIM is passed to the compiler and the loader.
                     87: # It is normally "-O" but may be, for example, "-g".
                     88: OPTIM = -O
                     89: 
                     90: 
                     91: ##########################################################################
                     92: # Files
                     93: ##########################################################################
                     94: 
                     95: SRC1 = main.c option.c prim.c 
                     96: SRC2 = ch.c position.c input.c output.c screen.c \
                     97:        prompt.c line.c signal.c help.c ttyin.c command.c version.c
                     98: SRC =  $(SRC1) $(SRC2)
                     99: OBJ =  main.o option.o prim.o ch.o position.o input.o output.o screen.o \
                    100:        prompt.o line.o signal.o help.o ttyin.o command.o version.o
                    101: 
                    102: 
                    103: ##########################################################################
                    104: # Rules
                    105: ##########################################################################
                    106: 
                    107: DEFS = "-DTERMIO=$(TERMIO)" \
                    108:        "-DSIGSETMASK=$(SIGSETMASK)" \
                    109:        "-Doff_t=$(off_t)" "-DVOID=$(VOID)" \
                    110:        "-DREGCMP=$(REGCMP)" "-DRECOMP=$(RECOMP)" \
                    111:        "-DSHELL_ESCAPE=$(SHELL_ESCAPE)" \
                    112:        "-DEDITOR=$(EDITOR)" "-DEDIT_PGM=\"$(EDIT_PGM)\"" \
                    113:        "-DONLY_RETURN=$(ONLY_RETURN)" \
                    114:        "-DXENIX=$(XENIX)"
                    115: 
                    116: CFLAGS = $(OPTIM) $(DEFS)
                    117: 
                    118: 
                    119: all: less
                    120: 
                    121: less: $(OBJ)
                    122:        cc $(OPTIM) -o less $(OBJ) $(LIBS)
                    123: 
                    124: install: install_man install_less
                    125: 
                    126: install_man: less.l
                    127:        for f in $(INSTALL_MAN); do  rm -f $$f; cp less.l $$f;  done
                    128:        touch install_man
                    129:        
                    130: install_less: less
                    131:        for f in $(INSTALL_LESS); do  rm -f $$f; cp less $$f;  done
                    132:        touch install_less
                    133: 
                    134: $(OBJ): less.h funcs.h
                    135: 
                    136: lint:
                    137:        lint -hp $(DEFS) $(SRC)
                    138: 
                    139: newfuncs:
                    140:        mv funcs.h funcs.h.OLD
                    141:        awk -f mkfuncs.awk $(SRC) >funcs.h
                    142: 
                    143: clean:
                    144:        rm -f $(OBJ) less
                    145: 
                    146: clobber:
                    147:        rm -f *.o less install_less install_man
                    148: 
                    149: shar:
                    150:        shar -v INSTALLATION less.l makefile.* *.h *.awk $(SRC1) > less.shar.a
                    151:        shar -v $(SRC2) > less.shar.b

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.