1 # Makefile for less under DJGPP v2.0 or later.
3 #### Start of system configuration section. ####
10 INSTALL_PROGRAM = ginstall
11 INSTALL_DATA = ginstall -m 644
15 CFLAGS_COMPILE_ONLY = -c
21 prefix = /dev/env/DJDIR
22 exec_prefix = ${prefix}
24 bindir = ${exec_prefix}/bin
25 sysconfdir = ${prefix}/etc
26 mandir = ${prefix}/man
29 #### End of system configuration section. ####
31 # This rule allows us to supply the necessary -D options
32 # in addition to whatever the user asks for.
34 ${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $<
37 main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \
38 command.${O} cvt.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \
39 help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \
40 lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \
41 output.${O} pattern.${O} position.${O} prompt.${O} search.${O} signal.${O} \
42 tags.${O} ttyin.${O} version.${O}
44 all: less lesskey lessecho
47 ${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
49 lesskey: lesskey.${O} version.${O}
50 ${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}
52 lessecho: lessecho.${O} version.${O}
53 ${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}
56 command.com /c copy $< $@
58 ${OBJ}: ${srcdir}/less.h defines.h ${srcdir}/funcs.h
60 install: all ${srcdir}/less.man ${srcdir}/lesskey.man
61 ${INSTALL_PROGRAM} less.exe ${bindir}/less.exe
62 ${INSTALL_PROGRAM} lesskey.exe ${bindir}/lesskey.exe
63 ${INSTALL_PROGRAM} lessecho.exe ${bindir}/lessecho.exe
64 ${INSTALL_DATA} ${srcdir}/less.man ${mandir}/man${manext}/less.${manext}
65 ${INSTALL_DATA} ${srcdir}/lesskey.man ${mandir}/man${manext}/lesskey.${manext}
77 command.com /c if exist funcs.h del funcs.h
78 ${AWK} -f mkfuncs.awk ${OBJ:.${O}=.c} > funcs.h
81 command.com /c for %f in (*.${O} less lesskey lessecho *.exe) do if exist %f del %f
86 command.com /c if not exist Makefile.dsg ren Makefile Makefile.dsg
87 command.com /c if not exist defines.ds ren defines.h defines.ds
88 command.com /c for %f in (Makefile defines.h) do if exist %f del %f
91 command.com /c if exist TAGS del TAGS