###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2015 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX)
+#ifeq "$(MACHINE_TYPE)" "arm"
+CFLAGS += -fno-PIC
+#endif
+
###############################################################################
# Top-level Rules
###############################################################################
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10.37-rt2800usb_add_dlink_dwa137_usbid.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_add_libertas_uap.patch
+ # smsc mac address patch for pandaboard and raspberry pi
+ifeq "$(KCFG)" "-multi"
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
+endif
+ifeq "$(KCFG)" "-rpi"
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.10-smsc95xx-add_mac_addr_param.patch
+endif
+
# generate config
cd $(DIR_APP) && make KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ allmodconfig
cd $(DIR_APP) && sed -i -e "s/.*DEBUGFS=y/# & is not set/g" .config
cd $(DIR_APP) && sed -i -e "s/=y is not set/ is not set/g" .config
+ # Disable OF_GRAPH (not supported by kernel 3.14)
+ cd $(DIR_APP) && sed -i -e "s/CONFIG_OF/CONFIG_OF_IGNORE/g" include/linux/of_graph.h
+
cd $(DIR_APP) && make $(MAKETUNING) KLIB=/lib/modules/$(KVER)-$(VERSUFIX)/ install
# Remove vsp1 module (not mach to our platforms)