Clean up some messy Makefile stuff so that this can be built into the

kernel.
This commit is contained in:
Scott Long 2004-10-24 08:38:29 +00:00
parent 743d0f6640
commit b953df2a33
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136856
3 changed files with 18 additions and 21 deletions

View File

@ -28,6 +28,19 @@
#ifndef __INCmvOsBsdh
#define __INCmvOsBsdh
/* Taken out of the Makefile magic */
#define __KERNEL__ 1
#define KERNEL 1
#define _KERNEL 1
#define _FREEBSD_ 1
/*
* This binary object core for this driver is only for x86, so this constant
* will not change.
*/
#define BITS_PER_LONG 32
#define DRIVER_VERSION "1.1"
#if DBG
#define MV_DEBUG_LOG
#endif

View File

@ -116,7 +116,7 @@ typedef struct _READ_CAPACITY_DATA {
#define PRD_TABLES_FOR_VBUS (MV_SATA_CHANNELS_NUM*MV_EDMA_QUEUE_LENGTH)
typedef enum _SataEvent {
SATA_EVENT_NO_CHANGE = 0,
SATA_EVENT_NO_CHANGE = 0,
SATA_EVENT_CHANNEL_CONNECTED,
SATA_EVENT_CHANNEL_DISCONNECTED
} SATA_EVENT;
@ -221,7 +221,6 @@ int hpt_add_disk_to_array(_VBUS_ARG DEVICEID idArray, DEVICEID idDisk);
#define REBUILD_PARITY 2
#define VERIFY 3
extern char DRIVER_VERSION[];
/**********************************************************/
static __inline struct cam_periph *
hpt_get_periph(int path_id,int target_id)

View File

@ -10,26 +10,13 @@ HPTMV= ${.CURDIR}/../../contrib/dev/hptmv
KMOD= hptmv
SRCS= opt_scsi.h opt_cam.h
SRCS+= bus_if.h device_if.h pci_if.h
SRCS+= mv.c entry.c vers.c
SRCS+= mv.c entry.c
SRCS+= ioctl.c hptproc.c gui_lib.c
OBJS+= raid.o
OBJS+= hptmvraid.o
raid.o: ${HPTMV}/i386-elf.raid.o.uu
hptmvraid.o: ${HPTMV}/i386-elf.raid.o.uu
uudecode -p < ${HPTMV}/i386-elf.raid.o.uu > ${.TARGET}
#
# Driver version number.
#
.ifndef DRIVER_VERSION
DRIVER_VERSION = "1.1"
.endif
vers.c: mv.o
@echo char DRIVER_VERSION[]=\"$(DRIVER_VERSION)\"\; > ${.OBJDIR}/$(.TARGET)
# calculate system pointer size.
BITS_PER_LONG= 4
#
# Debug Options:
#
@ -55,8 +42,6 @@ DEBUGOPT += -DDEBUG_LEVEL=1
DEBUGOPT += -DFOR_DEMO
.endif
CFLAGS+= -D__KERNEL__=1 -DKERNEL=1 -D_KERNEL=1 -D_FREEBSD_=1 ${DEBUGOPT} \
-DBITS_PER_LONG=$(BITS_PER_LONG)
CFLAGS+= ${DEBUGOPT}
CLEANFILES += vers.c
.include <bsd.kmod.mk>