Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added basic OpenVZ checking in the Makefiles

  • Loading branch information...
commit f71dd61933ec8fe97d322301095fe045d54863ca 1 parent 9a050da
@codyro codyro authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.