Browse files

Merge pull request #77 from codyro/master

Added basic checking for OpenVZ platforms
  • Loading branch information...
2 parents 9a050da + f71dd61 commit 3ada76bd7802970be0b191ed64e912323947bd05 @mohans mohans committed Aug 23, 2012
Showing with 15 additions and 0 deletions.
  1. +7 −0 Makefile
  2. +8 −0 src/Makefile
View
7 Makefile
@@ -9,6 +9,13 @@ ifneq "$(RHEL5_VER)" ""
KERNEL_TREE := $(RHEL5_TREE)
endif
+# Check for OpenVZ (/proc/vz)
+OPENVZ_VER ?= $(shell if [ -e /proc/vz ]; then grep 5.[0-9] /etc/redhat-release; else false; fi)
+ifneq "$(OPENVZ_VER)" ""
+ RHEL5_TREE := /usr/src/redhat/BUILD/ovzkernel-2.6.18/linux-$(shell uname -r).$(shell uname -i)
+ KERNEL_TREE := $(RHEL5_TREE)
+endif
+
all:
$(MAKE) -C src KERNEL_TREE=$(KERNEL_TREE) PWD=$(shell pwd)/src all
View
8 src/Makefile
@@ -16,6 +16,14 @@ ifneq "$(RHEL5_VER)" ""
KERNEL_TREE := $(RHEL5_TREE)
endif
+# Check for OpenVZ (/proc/vz)
+OPENVZ_VER ?= $(shell if [ -e /proc/vz ]; then grep 5.[0-9] /etc/redhat-release; else false; fi)
+ifneq "$(OPENVZ_VER)" ""
+ RHEL5_SPEC := /usr/src/redhat/SPECS/kernel-ovz.spec
+ RHEL5_TREE := /usr/src/redhat/BUILD/ovzkernel-2.6.18/linux-$(shell uname -r).$(shell uname -i)
+ KERNEL_TREE := $(RHEL5_TREE)
+endif
+
obj-m += flashcache.o
flashcache-objs := flashcache_conf.o flashcache_main.o flashcache_subr.o flashcache_ioctl.o flashcache_procfs.o

0 comments on commit 3ada76b

Please sign in to comment.