#
# Makefile for the Linux fsflex with the syncppp module
# Note that you will have to copy the syncppp source file from a Kernel
# source tree that is the same version as the Kernel that you are running
#
COMPNY_DIR =	/etc/farsite
MODULE_DIR =	$(COMPNY_DIR)/modules
KMOD_DIR = 	/lib/modules/`uname -r`/kernel/drivers/net/wan
EXTRA_CFLAGS  := -I/etc/farsite/include -DFST_NET_DEV

ifneq ($(KERNELRELEASE),)
obj-m		+= farsync.o fsflex.o syncppp.o
else
KDIR		:= /lib/modules/$(shell uname -r)/build
PWD		:= $(shell pwd)

modules:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

all:	modules

install:
	install farsync.ko $(MODULE_DIR)
	install farsync.ko $(KMOD_DIR)
	install fsflex.ko $(MODULE_DIR)
	install syncppp.ko $(MODULE_DIR)/

clean:
	rm -rf *.o *.ko .*.cmd
endif
