summaryrefslogtreecommitdiffstats
path: root/usr.bin/xlint/lint1/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/xlint/lint1/Makefile')
-rw-r--r--usr.bin/xlint/lint1/Makefile58
1 files changed, 44 insertions, 14 deletions
diff --git a/usr.bin/xlint/lint1/Makefile b/usr.bin/xlint/lint1/Makefile
index d5e519a..6c8a68f 100644
--- a/usr.bin/xlint/lint1/Makefile
+++ b/usr.bin/xlint/lint1/Makefile
@@ -1,19 +1,49 @@
-# $NetBSD: Makefile,v 1.3 1995/07/04 01:53:05 cgd Exp $
+# $NetBSD: Makefile,v 1.25 2002/02/01 01:32:20 ross Exp $
-PROG= lint1
-SRCS= cgram.c scan.c mem1.c mem.c err.c main1.c decl.c tree.c func.c \
- init.c emit.c emit1.c
-NOMAN=
-LDADD+= -ll
-DPADD+= ${LIBL}
-YFLAGS= -d
-CFLAGS+=-I.
-LINTFLAGS=-aehpz
-CLEANFILES+=y.tab.h cgram.c scan.c
+.include <bsd.own.mk>
-BINDIR= /usr/libexec
+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 inittyp.c
+MAN= lint.7
+YHEADER=
-# XXX: -O causes the gcc to die on the i386, when compiling tree.o
-CFLAGS+= -DXXX_BROKEN_GCC
+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}
+
+.if ${USETOOLS} == "yes"
+LINT1= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-lint1
+.endif
+LINT1?= ./${PROG}
+
+${MAN}: makeman ${LINT1:C/^\.\///} Makefile
+ sh ${.ALLSRC:M*makeman} ${LINT1} -m >${.TARGET}
+
+LDADD+= -lm
+DPADD+= ${LIBM}
+
+.ifndef HOSTPROG
+LDADD+= -ll
+DPADD+= ${LIBL}
.include <bsd.prog.mk>
+.endif
OpenPOWER on IntegriCloud