1# $OpenBSD: Makefile,v 1.13 2017/10/17 19:31:56 naddy Exp $ 2# $FreeBSD: src/sys/dev/aic7xxx/Makefile,v 1.6 1999/08/28 00:41:22 peter Exp $ 3 4PROG= aicasm 5 6CSRCS= aicasm.c aicasm_symbol.c 7GENSRCS= aicasm_gram.c aicasm_scan.c aicasm_macro_gram.c aicasm_macro_scan.c 8 9GENHDRS= aicasm_gram.h aicasm_macro_gram.h 10 11SRCS= ${GENSRCS} ${CSRCS} 12CLEANFILES+= ${GENSRCS} ${GENHDRS} y.output 13DPADD+= ${LIBL} 14LDADD+= -ll 15CC=${HOSTCC} 16 17# Correct path for kernel builds 18.ifdef MAKESRCPATH 19.PATH: ${MAKESRCPATH} 20.endif 21 22CFLAGS+= -I. -I${.CURDIR} 23YFLAGS= -d 24LFLAGS+= ${.TARGET:M*macro*:S/$(.TARGET)/-olex.yy.c/} ${.TARGET:M*macro*:S/$(.TARGET)/-Pmm/} 25NOMAN= noman 26 27.ifdef DEBUG 28CFLAGS+= -DDEBUG -g 29YFLAGS+= -t 30LFLAGS+= -d 31SEQFLAGS= -l seq.lst 32.endif 33 34microcode: 7xxx_headers 79xx_headers 35 36aicasm_gram.c aicasm_gram.h: aicasm_gram.y 37 ${YACC} ${YFLAGS} -o aicasm_gram.c $< 38 39aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y 40 ${YACC} -pmm ${YFLAGS} -o aicams_macro_gram.c $< 41 427xxx_headers: aicasm aic7xxx.seq aic7xxx.reg 43 ${OBJDIR}./aicasm -I/sys ${SEQFLAGS} -r tempreg.h -o tempseq.h ${.CURDIR}/aic7xxx.seq 44 grep OpenBSD: ${.CURDIR}/aic7xxx.seq | cat - tempseq.h > aic7xxx_seq.h 45 grep OpenBSD: ${.CURDIR}/aic7xxx.reg | cat - tempreg.h > aic7xxx_reg.h 46 mv aic7xxx_seq.h /sys/dev/microcode/aic7xxx/ 47 mv aic7xxx_reg.h /sys/dev/microcode/aic7xxx/ 48.ifdef DEBUG 49 mv seq.lst /sys/dev/microcode/aic7xxx/seq7xxx.lst 50.endif 51 rm -f tempseq.h tempreg.h 52 5379xx_headers: aicasm aic79xx.seq aic79xx.reg 54 ${OBJDIR}./aicasm -I/sys ${SEQFLAGS} -r tempreg.h -o tempseq.h ${.CURDIR}/aic79xx.seq 55 grep OpenBSD: ${.CURDIR}/aic79xx.seq | cat - tempseq.h > aic79xx_seq.h 56 grep OpenBSD: ${.CURDIR}/aic79xx.reg | cat - tempreg.h > aic79xx_reg.h 57 mv aic79xx_seq.h /sys/dev/microcode/aic7xxx/ 58 mv aic79xx_reg.h /sys/dev/microcode/aic7xxx/ 59.ifdef DEBUG 60 mv seq.lst /sys/dev/microcode/aic7xxx/seq79xx.lst 61.endif 62 rm -f tempseq.h tempreg.h 63 64.include <bsd.prog.mk> 65