#
# Makefile to compile OIPTables
#

include ../../makefile.envars

CHECKOUT_PREFIX ?= svn://svn.atc.amit.com.tw
ifeq ("$(KERNEL_VERSION)","2.6.30")
COMPO_URL := $(CHECKOUT_PREFIX)/Sahara/OIPTables144/trunk
COMPO_REV := -r 6
COMPO_DIR := $(COMPO_BASE)/open_src/OIPTables144
INS_OPT	:=  INSTALL.copy_OIPTables144
else
  ifeq ("$(KERNEL_VERSION)","2.6.x")
  COMPO_URL := $(CHECKOUT_PREFIX)/Sahara/OIPTables138/trunk
  COMPO_REV := -r 12 
  COMPO_DIR := $(COMPO_BASE)/open_src/OIPTables138
  else
  COMPO_URL := $(CHECKOUT_PREFIX)/Sahara/OIPTables126a/trunk
  COMPO_REV := -r 5
  COMPO_DIR := $(COMPO_BASE)/open_src/OIPTables126a
  endif
INS_OPT	:=  INSTALL.copy_OIPTables
endif

include ../../makefile.compo
include ../../makefile.install

KERNEL_PATH := ${TOPDIR}/linux/src

#

build:
	KERNEL_VERSION=$(KERNEL_VERSION) KERNEL_DIR=${KERNEL_PATH} make $(OPTIONS) -C $(COMPO_DIR) all
	

install: $(INS_OPT)

clean:
	KERNEL_DIR=${KERNEL_PATH} make -C $(COMPO_DIR) distclean

copying:
