-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (67 loc) · 2.79 KB
/
Makefile
File metadata and controls
81 lines (67 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# Copyright © 2006-2008 Ciprico Inc. All rights reserved.
# Copyright © 2008-2013 Dot Hill Systems Corp. All rights reserved.
#
# Use of this software is subject to the terms and conditions of the written
# software license agreement between you and DHS (the "License"),
# including, without limitation, the following (as further elaborated in the
# License): (i) THIS SOFTWARE IS PROVIDED "AS IS", AND DHS DISCLAIMS
# ANY AND ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY,
# BY CONDUCT, OR OTHERWISE; (ii) this software may be used only in connection
# with the integrated circuit product and storage software with which it was
# designed to be used; (iii) this source code is the confidential information
# of DHS and may not be disclosed to any third party; and (iv) you may not
# make any modification or take any action that would cause this software,
# or any other Dot Hill software, to fall under any GPL license or any other
# open source license.
#
RC_HOST=$(shell /bin/hostname)
RC_USER=$(shell whoami)
RC_DATE=$(shell /bin/date)
RC_BUILD_DATE=$(shell /bin/date +'%b %d %Y')
PLATFORM=$(shell uname -i)
EXTRA_CFLAGS += -D__LINUX__
EXTRA_CFLAGS += -DRC_AHCI_SUPPORT -DRC_AMD_AHCI -DRC_AHCI_AUTOSENSE
EXTRA_CFLAGS += -DRC_RAW_SPTD
EXTRA_CFLAGS += -DRC_RAW_PASSTHROUGH
EXTRA_CFLAGS += -DRC_LSI1068
EXTRA_CFLAGS += -DRC_MPT2
EXTRA_CFLAGS += -DRC_DETECT_AND_BLOCK_PROMISE_RAID
EXTRA_CFLAGS += -DRC_DRIVER_BUILD_DATE='"${RC_BUILD_DATE}"'
# Build against an installed kernel object tree.
# Either set the kernel version here or pass in the version.
# Defaults to building for the currently running system.
# examples: make KVERS=2.6.20-1.2933.fc6
# make KVERS=2.6.18-1.25-smp
ifndef KVERS
KVERS=$(shell uname -r)
endif
# either set path to the kernel build tree here or pass in the directory
ifndef KDIR
KDIR := /usr/src/kernels/$(KVERS)
endif
ifdef KBUILD_SRC
ifneq ($(shell grep --quiet "irq_handler_t" $(srctree)/include/linux/interrupt.h && echo yes), yes)
EXTRA_CFLAGS += -DNO_IRQ_HANDLER_T
endif
endif
PWD := $(shell pwd)
.PHONY: install bbanner ibanner
all: bbanner
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
@rm -f *.o *.ko vers.c .*.cmd .*.d
@rm -f rcraid.mod.c Module.symvers Modules.symvers
@rm -rf .tmp_versions Module.markers modules.order
obj-m := rcraid.o
rcraid-objs := rc_init.o rc_msg.o rc_mem_ops.o rc_event.o rc_config.o rcblob.${PLATFORM}.o \
vers.o
.PHONY: $(obj)/vers.c
$(obj)/vers.c:
@echo "char *rc_ident = \"built on $(RC_HOST) by $(RC_USER) on $(RC_DATE)\";" > $@
# hack to avoid warning about missing .rcblob.cmd file when modpost tries to
# find all the sources
.PHONY: $(obj)/rcblob.${PLATFORM}.o
$(obj)/rcblob.${PLATFORM}.o:
ln -sf `basename $@ .o` $@
@( echo "cmd_$@ := true"; echo "dep_$@ := \\"; echo " $@ \\"; echo "" ) > $(obj)/.`basename $@`.cmd