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} $<
36 OBJ = main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \
37 command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \
38 help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \
39 lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \
40 output.${O} position.${O} prompt.${O} search.${O} signal.${O} \
41 tags.${O} ttyin.${O} version.${O}
43 all: less lesskey lessecho
46 ${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
48 lesskey: lesskey.${O} version.${O}
49 ${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}
51 lessecho: lessecho.${O} version.${O}
52 ${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}
55 command.com /c copy $< $@
57 ${OBJ}: ${srcdir}/less.h defines.h ${srcdir}/funcs.h
59 install: all ${srcdir}/less.man ${srcdir}/lesskey.man
60 ${INSTALL_PROGRAM} less.exe ${bindir}/less.exe
61 ${INSTALL_PROGRAM} lesskey.exe ${bindir}/lesskey.exe
62 ${INSTALL_PROGRAM} lessecho.exe ${bindir}/lessecho.exe
63 ${INSTALL_DATA} ${srcdir}/less.man ${mandir}/man${manext}/less.${manext}
64 ${INSTALL_DATA} ${srcdir}/lesskey.man ${mandir}/man${manext}/lesskey.${manext}
76 command.com /c if exist funcs.h del funcs.h
77 ${AWK} -f mkfuncs.awk ${OBJ:.${O}=.c} > funcs.h
80 command.com /c for %f in (*.${O} less lesskey lessecho *.exe) do if exist %f del %f
85 command.com /c if not exist Makefile.dsg ren Makefile Makefile.dsg
86 command.com /c if not exist defines.ds ren defines.h defines.ds
87 command.com /c for %f in (Makefile defines.h) do if exist %f del %f
90 command.com /c if exist TAGS del TAGS