NetBSD/usr.bin/xlint/lint1/Makefile
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* Rewrite src/tools Make logic to work like the rest of the tree wrt
  "dependall" and "install".  The old "make build" hack is gone.

* Remove the MKTOOLS logic.  This was linked to the "make build" hack,
  and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
  BSD make wrapper.  Use new ${.ALLTARGETS} variable to scan for
  targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
  src/usr.* and src/gnu/usr.* that would do target filename rewriting
  (improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
  MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
2001-11-12 23:16:17 +00:00

40 lines
733 B
Makefile

# $NetBSD: Makefile,v 1.21 2001/11/12 23:16:37 tv Exp $
.include <bsd.own.mk>
PROG= lint1
SRCS= cgram.y scan.l mem1.c mem.c err.c main1.c decl.c tree.c func.c \
init.c emit.c emit1.c
MAN= lint.7
LDADD+= -ll
DPADD+= ${LIBL}
YHEADER=
CPPFLAGS+= -I${.CURDIR} -I.
.if ${OBJECT_FMT} == "a.out"
CPPFLAGS+= -DTARGET_OBJFMT_AOUT
.elif ${OBJECT_FMT} == "COFF"
CPPFLAGS+= -DTARGET_OBJFMT_COFF
.elif ${OBJECT_FMT} == "ELF"
CPPFLAGS+= -DTARGET_OBJFMT_ELF
.else
.BEGIN:
@echo "Unrecognized OBJECT_FMT ${OBJECT_FMT}"
@false
.endif
LINTFLAGS= -aehpz
WFORMAT=1 #hopeless
BINDIR= /usr/libexec
scan.c: cgram.h
CLEANFILES+= ${MAN}
${MAN}: makeman ${PROG}
sh ${.ALLSRC} -m >${.TARGET}
.ifndef HOSTPROG
.include <bsd.prog.mk>
.endif