1136849Sscottl#
2136849Sscottl# Makefile for RR182x FreeBSD driver
3149871Sscottl# Copyright (c)  2004-2005 HighPoint Technologies, Inc. All rights reserved
4136849Sscottl#
5136849Sscottl# $FreeBSD: stable/11/sys/modules/hptmv/Makefile 319182 2017-05-30 04:11:12Z ngie $
6136849Sscottl
7319182SngieHPTMV= ${SRCTOP}/sys/dev/hptmv
8142988Sscottl.PATH: ${HPTMV}
9136849Sscottl
10136849SscottlKMOD= hptmv
11136849SscottlSRCS= opt_scsi.h opt_cam.h
12136849SscottlSRCS+= bus_if.h device_if.h pci_if.h
13149871SscottlSRCS+= mv.c entry.c ioctl.c hptproc.c gui_lib.c
14136856SscottlOBJS+= hptmvraid.o
15136849Sscottl
16211690Simp.if $(MACHINE_CPUARCH) == "amd64"
17149871SscottlHPTMV_RAID_O = amd64-elf.raid.o.uu
18149871Sscottl.else
19149871SscottlHPTMV_RAID_O = i386-elf.raid.o.uu
20149871Sscottl.endif
21136849Sscottl
22149871Sscottlhptmvraid.o:	${HPTMV}/$(HPTMV_RAID_O)
23149871Sscottl	uudecode -p < ${HPTMV}/$(HPTMV_RAID_O) > ${.TARGET}
24149871Sscottl
25136849Sscottl#
26136849Sscottl# Debug Options:
27136849Sscottl#
28136849Sscottl#   -DDEBUG: include debug code
29136849Sscottl#   -DDEBUG_LEVEL=x:
30136849Sscottl#		0 - No debug output message
31136849Sscottl#		1 - print only error messages
32136849Sscottl#		2 - print error and warning
33136849Sscottl#		3 - print all messages (info, warning, error)
34136849Sscottl#
35136849Sscottl#DEBUGOPT = -O2
36136849Sscottl
37136849Sscottl.if defined(DEBUG) && $(DEBUG) == 1
38136849SscottlDEBUGOPT += -DDEBUG
39136849Sscottl.if defined(DEBUG_LEVEL)
40136849SscottlDEBUGOPT += -DDEBUG_LEVEL=$(DEBUG_LEVEL)
41136849Sscottl.else
42136849SscottlDEBUGOPT += -DDEBUG_LEVEL=1
43136849Sscottl.endif
44136849Sscottl.endif
45136849Sscottl
46136849Sscottl.if defined(FOR_DEMO) && $(FOR_DEMO) == 1
47136849SscottlDEBUGOPT += -DFOR_DEMO
48136849Sscottl.endif
49136849Sscottl
50149871SscottlCFLAGS = ${DEBUGOPT}
51211690Simp
52136849Sscottl.include <bsd.kmod.mk>
53