f827d58e4d
components instead of with the kernel and/or modules. This ensures that it gets built with the host compiler, not the compiler in obj/... used to build the target components (which may be a cross-compiler outputting code for a different architecture and using header files with types and options set up for the wrong architecture). Reviewed by: imp
46 lines
874 B
Makefile
46 lines
874 B
Makefile
#
|
|
# $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aicasm/Makefile#2 $
|
|
#
|
|
# $FreeBSD$
|
|
|
|
PROG= aicasm
|
|
|
|
CSRCS= aicasm.c aicasm_symbol.c
|
|
YSRCS= aicasm_gram.y aicasm_macro_gram.y
|
|
LSRCS= aicasm_scan.l aicasm_macro_scan.l
|
|
|
|
GENHDRS= aicasm_gram.h aicasm_macro_gram.h
|
|
|
|
SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS}
|
|
CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
|
|
DPADD= ${LIBL}
|
|
LDADD= -ll
|
|
WARNS?= 0
|
|
|
|
# Correct path for kernel builds
|
|
# Don't rely on the kernel's .depend file
|
|
.ifdef MAKESRCPATH
|
|
.PATH: ${MAKESRCPATH}
|
|
DEPENDFILE= .depend_aicasm
|
|
.endif
|
|
|
|
CFLAGS+= -I${.CURDIR}
|
|
.ifdef MAKESRCPATH
|
|
CFLAGS+= -I${MAKESRCPATH}
|
|
.endif
|
|
NO_MAN=
|
|
YFLAGS= -b ${.TARGET:R} ${.TARGET:M*macro*:S/$(.TARGET)/-p mm/} -d
|
|
LFLAGS+= ${.TARGET:M*macro*:S/$(.TARGET)/-Pmm/}
|
|
|
|
.ifdef AICASM_DEBUG
|
|
CFLAGS+= -DDEBUG -g
|
|
YFLAGS+= -t -v
|
|
LFLAGS+= -d
|
|
.endif
|
|
|
|
BINDIR=/usr/bin
|
|
|
|
build-tools: ${PROG}
|
|
|
|
.include <bsd.prog.mk>
|