Commit c7d7e0ae authored by thomasl's avatar thomasl

Use one single way to know the kernel sorce directory:

   include $(OPENAIR_HOME)/common/utils/Makefile.inc

then use the variable $(KERNEL_DIR)

this variable is set in $(OPENAIR_HOME)/common/utils/Makefile.inc as 
export KERNEL_DIR=/lib/modules/$(shell uname -r)/

Not fixed: card bus MIMO 1, third party SW as PMIPv6 and shell scripts



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6081 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b501feae
export KERNEL_DIR=/lib/modules/$(shell uname -r)/
ITTI_DIR = $(COMMON_UTILS_DIR)/itti
ITTI_OBJS = $(ITTI_DIR)/intertask_interface.o
......
......@@ -10,6 +10,7 @@
#
####################################################################################
include $(OPENAIR_HOME)/common/utils/Makefile.inc
export BIN_DIR ?= $(shell pwd)/Bin
KVERSION = $(shell uname -r)
KVERSION_LAST_DIGIT = $(shell echo ${KVERSION} | cut -d "." -f 3 | cut -d "-" -f 1)
......@@ -19,11 +20,11 @@ EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT)
all: xtlib
echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)"
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
make -C $(KERNEL_DIR)/build M=$(PWD) modules
mv xt_GTPUAH.ko $(BIN_DIR)/
clean: libclean
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
make -C $(KERNEL_DIR)/build M=$(PWD) clean
################################################################################
# The next section is used by libxt_GTPUAH
......
......@@ -19,11 +19,11 @@ EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT)
all: xtlib
echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)"
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
make -C $(KERNEL_DIR)/build M=$(PWD) modules
mv xt_GTPURH.ko $(BIN_DIR)/
clean: libclean
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
make -C $(KERNEL_DIR)/build M=$(PWD) clean
################################################################################
# The next section is used by libxt_GTPURH
......
......@@ -3,6 +3,7 @@
# these flags have to be explicitely exported so that the sub-make is aware of them
include $(OPENAIR_HOME)/common/utils/Makefile.inc
ifndef OPENAIR_LTE
export OPENAIR_LTE=1
endif
......@@ -26,16 +27,16 @@ endif
all: openair_rf_cbmimo1_softmodem.ko asn1_msg_kern.ko
openair_rf_cbmimo1_softmodem.ko:
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 && mv openair_rf.ko openair_rf_softmodem.ko)
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 && mv openair_rf.ko openair_rf_softmodem.ko)
oai_user_cbmimo1.ko:
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 BIT8_TX=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko openair_rf_softmodem.ko)
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 BIT8_TX=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko openair_rf_softmodem.ko)
oai_user_exmimo.ko:
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko openair_rf_softmodem.ko)
(cd ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko openair_rf_softmodem.ko)
asn1_msg_kern.ko:
(cd ../openair2/RRC/LITE/MESSAGES && $(MAKE) -C /usr/src/linux V=0 M=`pwd` RTAI=1 -j2)
(cd ../openair2/RRC/LITE/MESSAGES && $(MAKE) -C $(KERNEL_DIR) V=0 M=`pwd` RTAI=1 -j2)
#Remove all but source files
cleanall:
......
......@@ -10,6 +10,8 @@
CCC = gcc
include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_ARCH=$(shell echo `uname -m`)
SET_REGPARM=$(shell if [ $(KERNEL_ARCH) = 'i686' ]; then echo true ; fi)
SET_X64=$(shell if [ $(KERNEL_ARCH) = 'x86_64' ]; then echo true ; fi)
......@@ -19,7 +21,7 @@ CCC = $(shell rtai-config --cc)
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
EXTRA_CFLAGS = $(shell rtai-config --module-cflags) -g -DRTAI_ENABLED -DPC_TARGET -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX -DMAC_CONTEXT -I/usr/include $(if $(SET_REGPARM),-mregparm=3 -fno-stack-protector -mpreferred-stack-boundary=4,) $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
EXTRA_CFLAGS = $(shell rtai-config --module-cflags) -g -DRTAI_ENABLED -DPC_TARGET -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX -DMAC_CONTEXT -I/usr/include -mregparm=3 -fno-stack-protector -mpreferred-stack-boundary=4 $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
......
......@@ -37,18 +37,11 @@
#LM_LICENSE_FILE=
#export LM_LICENSE_FILE
include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_NAME=$(shell uname -r)
NUM_CORES=$(shell getconf _NPROCESSORS_CONF)
LINUX_KERNEL=$(shell for dir in /lib/modules/linux-headers-`uname -r` /usr/src/linux-`uname -r` /usr/src/linux-headers-`uname -r` ; do \
if [ -d $$dir ] ; then \
echo $$dir ; exit 0 ; \
fi \
done ;\
echo "LINUX_KERNEL DIRECTORY NOT FOUND: check the makefile" ; exit 1\
)
export SET_UM=$(shell if grep --silent User\ Mode\ Linux /proc/cpuinfo ; then echo "ARCH=um" ; else echo ""; fi)
#SUBDIRS_openair_USERRF = $(MAIN_RT_DIR) $(CONFIG_DIR)
......@@ -74,44 +67,44 @@ mac_sim_rg_cellular:
( cd SIMULATION/USER_TOOLS/LAYER2_SIM && make mac_sim_rg MASTER=1 CELLULAR=1 NO_RRM=1)
openair_layer2_emul.ko:
(cd LAYER2 && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` NO_RRM=1 PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 PHYEMUL=1 && mv openair_l2.ko openair_layer2.ko)
(cd LAYER2 && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` NO_RRM=1 PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 PHYEMUL=1 && mv openair_l2.ko openair_layer2.ko)
openair_layer2_emul_rrm.ko:
(cd LAYER2 && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 PHYEMUL=1 && mv openair_l2.ko openair_layer2.ko)
(cd LAYER2 && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 PHYEMUL=1 && mv openair_l2.ko openair_layer2.ko)
openair_layer2.ko:
(cd LAYER2 && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` NO_RRM=1 PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2.ko)
(cd LAYER2 && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` NO_RRM=1 PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2.ko)
openair_layer2_rrm.ko:
(cd LAYER2 && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2.ko)
(cd LAYER2 && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2.ko)
openair_layer2_2615.ko:
(cd LAYER2 && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2_2615.ko)
(cd LAYER2 && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 MASTER=1 OPEN_AIR=1 OPENAIR1=1 && mv openair_l2.ko openair_layer2_2615.ko)
openair_rrc.ko:
(cd RRC/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 NO_RRM=1 && mv openair_rrc.ko openair_RRC.ko)
(cd RRC/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 NO_RRM=1 && mv openair_rrc.ko openair_RRC.ko)
openair_rrc_rrm.ko:
(cd RRC/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 && mv openair_rrc.ko openair_RRC.ko)
(cd RRC/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 && mv openair_rrc.ko openair_RRC.ko)
openair_rrc_2615.ko:
(cd RRC/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 && mv openair_rrc.ko openair_RRC_2615.ko)
(cd RRC/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 && mv openair_rrc.ko openair_RRC_2615.ko)
openair_rrc_emul.ko:
(cd RRC/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 PHYEMUL=1 NO_RRM=1)
(cd RRC/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 PHYEMUL=1 NO_RRM=1)
openair_rrc_emul_rrm.ko:
(cd RRC/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 PHYEMUL=1)
(cd RRC/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 PHYEMUL=1)
openair_emul.ko:
(cd SIMULATION/PHY_EMULATION/DEVICE_DRIVER/ && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 NO_RRM=1)
(cd SIMULATION/PHY_EMULATION/DEVICE_DRIVER/ && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1 NO_RRM=1)
openair_emul_rrm.ko:
(cd SIMULATION/PHY_EMULATION/DEVICE_DRIVER/ && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1)
(cd SIMULATION/PHY_EMULATION/DEVICE_DRIVER/ && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` PCTARGET=1 RTAI=1 OPEN_AIR=1 MASTER=1)
......@@ -140,50 +133,50 @@ remove_emul:
clean_nasmesh:
(cd NAS/DRIVER/MESH && $(MAKE) V=1 -C $(LINUX_KERNEL) M=`pwd` clean)
(cd NAS/DRIVER/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` clean)
nasmesh_address_fix.ko:
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) V=1 ADDRESS_FIX=1 -C $(LINUX_KERNEL) M=`pwd`)
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) V=1 ADDRESS_FIX=1 -C $(KERNEL_DIR) M=`pwd`)
nasmesh.ko:
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) V=1 -C $(LINUX_KERNEL) M=`pwd`)
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) V=1 -C $(KERNEL_DIR) M=`pwd`)
# automatically detect the linux header files for driver compilation
nasmesh_netlink.ko:
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
naslite_netlink_ether.ko:
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
oai_nw_ether.ko:
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
oai_nw_drv.ko:
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/LITE && $(MAKE) -j$(NUM_CORES) $(SET_UM) OAI_NW_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
nasmesh_netlink_address_fix.ko:
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 ADDRESS_FIX=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/MESH && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 ADDRESS_FIX=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
nasmesh_netlink_loopback.ko:
(cd NAS/DRIVER/MESH && $(MAKE) $(SET_UM) NAS_NETLINK=1 LOOPBACK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/MESH && $(MAKE) $(SET_UM) NAS_NETLINK=1 LOOPBACK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
# drivers cellular version
nascellmt_netlink.ko:
(cd NAS/DRIVER/CELLULAR/NASMT && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/CELLULAR/NASMT && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
nascellmt_clean.ko:
(cd NAS/DRIVER/CELLULAR/NASMT && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` clean)
(cd NAS/DRIVER/CELLULAR/NASMT && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` clean)
nascellrg_netlink.ko:
(cd NAS/DRIVER/CELLULAR/NASRG && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NAS/DRIVER/CELLULAR/NASRG && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
nascellrg_clean.ko:
(cd NAS/DRIVER/CELLULAR/NASRG && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` clean)
(cd NAS/DRIVER/CELLULAR/NASRG && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_DRIVER_TYPE_ETHERNET=1 NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` clean)
# Driver for UE using LTE core network (MME, S+P-GW)
ue_ip.ko:
(cd NETWORK_DRIVER/UE_IP && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(LINUX_KERNEL) M=`pwd` modules)
(cd NETWORK_DRIVER/UE_IP && $(MAKE) -j$(NUM_CORES) $(SET_UM) NAS_NETLINK=1 OAI_NW_DRIVER_USE_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules)
rt_emul:
......@@ -205,7 +198,7 @@ fifos:
fi;\
done
# cp arch/openair_CardBus_MIMO1/device_driver/openair_rf.ko /lib/modules/$(KERNEL_NAME)/openair/
# cp arch/openair_CardBus_MIMO1/device_driver/openair_rf.ko $(KERNEL_DIR)/openair/
# depmod -aq
devs:
......@@ -264,5 +257,5 @@ tgz:
print:
@echo $(IS_KERNEL_OPENAIRINTERFACE)
@echo $(LINUX_KERNEL)
@echo $(KERNEL_DIR)
@echo $(IS_LINUX)
# NAS CELLULAR Driver makefile
#
include $(OPENAIR_HOME)/common/utils/Makefile.inc
NAS_UPDIR := $(shell /bin/pwd)
####################################################
......@@ -60,10 +61,10 @@ endif
####################################################
#netlink.ko:
#make $(x)$(y) NAS_NETLINK=1 V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
#make $(x)$(y) NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules
#nasmesh.ko:
# make V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make V=1 -C $(KERNEL_DIR) M=`pwd` modules
print:
@echo subversion : $(SUBVERSION)
@echo RRC_DIR $(RRC_DIR)
......
# NAS CELLULAR Driver makefile
#
include $(OPENAIR_HOME)/common/utils/Makefile.inc
NAS_UPDIR := $(shell /bin/pwd)
####################################################
......@@ -60,10 +62,10 @@ endif
####################################################
#netlink.ko:
#make $(x)$(y) NAS_NETLINK=1 V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
#make $(x)$(y) NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules
#nasmesh.ko:
# make V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make V=1 -C $(KERNEL_DIR) M=`pwd` modules
print:
@echo RRC_DIR $(RRC_DIR)
clean:
......
# NASMESH Driver makefile
#
include $(OPENAIR_HOME)/common/utils/Makefile.inc
NAS_UPDIR := $(shell /bin/pwd)
KERNEL_ARCH=$(shell echo `uname -m`)
......@@ -51,10 +52,10 @@ endif
####################################################
#netlink.ko:
#make $(x)$(y) NAS_NETLINK=1 V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
#make $(x)$(y) NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules
#oai_nw_drv.ko:
# make V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make V=1 -C $(KERNEL_DIR) M=`pwd` modules
print:
@echo subversion : $(SUBVERSION)
clean:
......
# NASMESH Driver makefile
#
include $(OPENAIR_HOME)/common/utils/Makefile.inc
NAS_UPDIR := $(shell /bin/pwd)
####################################################
......@@ -49,11 +50,11 @@ endif
####################################################
#netlink.ko:
# make NAS_NETLINK=1 V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make NAS_NETLINK=1 V=1 -C $(KERNEL_DIR) M=`pwd` modules
#nasmesh.ko:
# make V=1 -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make V=1 -C $(KERNEL_DIR) M=`pwd` modules
clean:
rm -f $(nasmesh-objs) $(obj-m)
# make -C /usr/src/linux-$(shell echo `uname -r`) M=`pwd` modules
# make -C $(KERNEL_DIR) modules
......@@ -7,7 +7,7 @@
# You can modify the below as well, but probably
# won't need to.
CC = gcc
include $(OPENAIR_HOME)/common/utils/Makefile.inc
#UPDIR := /homes/mwett/rh_mw/RHODOS
COMMON_DIR = $(OPENAIR2_DIR)/COMMON
RRC_CELL_DIR = $(OPENAIR2_DIR)/RRC/CELLULAR
......@@ -20,7 +20,7 @@ ASN1_DIR = $(OPENAIR2_DIR)
#RRC_DIR =$(UPDIR)/access_stratum/l3/rrc
#CFLAGS = -Wall -g -DDEBUG_RRC_STATE -DUSER_MODE -DNODE_RG -DNODE_MT
CFLAGS = -Wall -mmmx -msse -msse2 -g -ggdb -std=gnu99 -I/usr/src/linux/include/ -DUSER_MODE -DNB_ANTENNAS_RX=1
CFLAGS = -Wall -mmmx -msse -msse2 -g -ggdb -std=gnu99 -I$(KERNEL_DIR) -DUSER_MODE -DNB_ANTENNAS_RX=1
ifdef CELL_RRM
CFLAGS += -DNODE_RG
......
CCC = gcc
include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
......@@ -8,7 +10,7 @@ ifdef RTAI
CCC = $(shell rtai-config --cc)
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
CFLAGS = $(shell rtai-config --module-cflags) -march=pentium4 -DRTAI_ENABLED -DPC_TARGET -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -mregparm=3 $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
CFLAGS = $(shell rtai-config --module-cflags) -march=pentium4 -DRTAI_ENABLED -DPC_TARGET -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -mregparm=3 $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
CCC=gcc
#--------------------------------------------------------
......
include $(OPENAIR_HOME)/common/utils/Makefile.inc
OPENAIR2_TOP = ../../..
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
......@@ -10,7 +11,7 @@ CCC = $(shell rtai-config --cc)
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
EXTRA_CFLAGS += -D__IN_RTAI__ $(shell rtai-config --module-cflags) -g -march=pentium4 -DNODE_RG -DBIGPHYSAREA -DRTAI -DRTAI_ENABLED -mregparm=3 -fno-stack-protector -DHW_PREFIX_REMOVAL -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DWIDENS_DLC -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -include /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
EXTRA_CFLAGS += -D__IN_RTAI__ $(shell rtai-config --module-cflags) -g -march=pentium4 -DNODE_RG -DBIGPHYSAREA -DRTAI -DRTAI_ENABLED -mregparm=3 -fno-stack-protector -DHW_PREFIX_REMOVAL -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DWIDENS_DLC -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
......
CCC = gcc
include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
SUBVERSION=$(shell echo `grep '^SUBLEVEL =' /usr/src/linux/Makefile | sed -e 's, ,,g' | sed -e 's/SUBLEVEL=//'`)
IS_KERNEL_SUBVERSION_GREATER_THAN_20=$(shell if [ $(SUBVERSION) -ge 20 ] ; then echo true ; fi)
EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -include /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h
EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h
EXTRA_CFLAGS += -I$(PWD)/../../DEFS
......@@ -14,9 +12,9 @@ obj-m += openair_rf.o
openair_rf-objs += module_main.o irq.o fileops.o exmimo_fw.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
make -C $(KERNEL_DIR)/build M=$(PWD) modules
clean:
rm -rf *.o
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
make -C $(KERNEL_DIR)/build M=$(PWD) clean
CCC = gcc
include $(OPENAIR_HOME)/common/utils/Makefile.inc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
SUBVERSION=$(shell echo `grep '^SUBLEVEL =' /usr/src/linux/Makefile | sed -e 's, ,,g' | sed -e 's/SUBLEVEL=//'`)
IS_KERNEL_SUBVERSION_GREATER_THAN_20=$(shell if [ $(SUBVERSION) -ge 20 ] ; then echo true ; fi)
EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -include /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h
EXTRA_CFLAGS = -ggdb -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default -include $(KERNEL_DIR)/build/include/linux/autoconf.h
EXTRA_CFLAGS += -I$(PWD)/../../DEFS
......@@ -14,9 +12,9 @@ obj-m += openair_rf.o
openair_rf-objs += module_main.o irq.o fileops.o exmimo_fw.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
make -C $(KERNEL_DIR)/build M=$(PWD) modules
clean:
rm -rf *.o
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
make -C $(KERNEL_DIR)/build M=$(PWD) clean
......@@ -3,6 +3,7 @@
# these flags have to be explicitely exported so that the sub-make is aware of them
include $(OPENAIR_HOME)/common/utils/Makefile.inc
ifndef OPENAIR_LTE
export OPENAIR_LTE=1
export OPENAIR_EMU=0
......@@ -41,19 +42,19 @@ endif
all: openair_rf_cbmimo1_softmodem.ko asn1_msg_kern.ko nasmesh.ko rb_tool openair_rf scope
openair_rf_cbmimo1_softmodem.ko:
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
oai_user_cbmimo1.ko:
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 BIT8_TX=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 BIT8_TX=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
oai_user_exmimo.ko:
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C /usr/src/linux V=1 M=`pwd` RTAI=1 CBMIMO1=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
(cd $(OPENAIR1_DIR)/ARCH/CBMIMO1/DEVICE_DRIVER && $(MAKE) -C $(KERNEL_DIR) V=1 M=`pwd` RTAI=1 CBMIMO1=1 OPENAIR1=0 OPENAIR2=0 && mv openair_rf.ko $(CURDIR)/openair_rf_softmodem.ko)
asn1_msg_kern.ko:
(cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES && $(MAKE) -C /usr/src/linux V=0 M=`pwd` RTAI=1 -j2 && mv asn1_msg_kern.ko $(CURDIR)/asn1_msg_kern.ko)
(cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES && $(MAKE) -C $(KERNEL_DIR) V=0 M=`pwd` RTAI=1 -j2 && mv asn1_msg_kern.ko $(CURDIR)/asn1_msg_kern.ko)
nasmesh.ko:
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH && $(MAKE) V=1 -C /usr/src/linux M=`pwd` && mv nasmesh.ko $(CURDIR)/nasmesh.ko)
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH && $(MAKE) V=1 -C $(KERNEL_DIR) M=`pwd` && mv nasmesh.ko $(CURDIR)/nasmesh.ko)
rb_tool:
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment