Commit 47f9f2b5 authored by Alessandro Rubini's avatar Alessandro Rubini

moved kernel stuff to ./kernel/; Makefiles updated

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 6de59398
LINUX ?= /lib/modules/$(shell uname -r)/build
ZIO ?= $(HOME)/zio
SPEC_SW ?= $(HOME)/spec-sw
FMC_BUS ?= $(HOME)/fmc-bus
DIRS = kernel tools lib doc
KBUILD_EXTRA_SYMBOLS := \
$(ZIO)/Module.symvers \
$(SPEC_SW)/kernel/Module.symvers \
$(FMC_BUS)/kernel/Module.sysmvers
ccflags-y = \
-I$(ZIO)/include \
-I$(SPEC_SW)/kernel \
-I$(SPEC_SW)/kernel/include \
-I$(FMC_BUS)/kernel/include \
-I$M
#ccflags-y += -DDEBUG
subdirs-ccflags-y = $(ccflags-y)
obj-m := fmc-fine-delay.o
fmc-fine-delay-objs = fd-zio.o fd-core.o
fmc-fine-delay-objs += onewire.o spi.o i2c.o gpio.o
fmc-fine-delay-objs += acam.o calibrate.o pll.o time.o
all: modules
modules_install clean modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) $@
$(MAKE) -C tools M=$(shell /bin/pwd) $@
$(MAKE) -C lib $@
all clean modules install modules_install:
for d in $(DIRS); do $(MAKE) -C $$d $@ || exit 1; done
......@@ -58,3 +58,5 @@ clean: terse
install:
# add the other unused targets, so the rule in ../Makefile works
modules modules_install:
LINUX ?= /lib/modules/$(shell uname -r)/build
ZIO ?= $(HOME)/zio
SPEC_SW ?= $(HOME)/spec-sw
FMC_BUS ?= $(HOME)/fmc-bus
KBUILD_EXTRA_SYMBOLS := \
$(ZIO)/Module.symvers \
$(SPEC_SW)/kernel/Module.symvers \
$(FMC_BUS)/kernel/Module.sysmvers
ccflags-y = \
-I$(ZIO)/include \
-I$(SPEC_SW)/kernel \
-I$(SPEC_SW)/kernel/include \
-I$(FMC_BUS)/kernel/include \
-I$M
#ccflags-y += -DDEBUG
subdirs-ccflags-y = $(ccflags-y)
obj-m := fmc-fine-delay.o
fmc-fine-delay-objs = fd-zio.o fd-core.o
fmc-fine-delay-objs += onewire.o spi.o i2c.o gpio.o
fmc-fine-delay-objs += acam.o calibrate.o pll.o time.o
all modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) modules
install modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) modules_install
# be able to run the "clean" rule even if $(LINUX) is not valid
clean:
rm -rf *.o *~ .*.cmd *.ko *.mod.c .tmp_versions Module.symvers \
Module.markers modules.order
......@@ -6,3 +6,4 @@ fdelay-term
fdelay-read
fdelay-fread
fdelay-pulse
fdelay-open-by-lun
......@@ -6,7 +6,7 @@ LOBJ += fdelay-time.o
LOBJ += fdelay-tdc.o
LOBJ += fdelay-output.o
CFLAGS = -Wall -ggdb -O2 -I.. -I$(ZIO)/include
CFLAGS = -Wall -ggdb -O2 -I../kernel -I$(ZIO)/include
LDFLAGS = -L. -lfdelay
DEMOSRC := fdelay-list.c
......@@ -37,5 +37,7 @@ clean:
.depend: Makefile $(wildcard *.c *.h ../*.h)
$(CC) $(CFLAGS) -M $(LOBJ:.o=.c) -o $@
install module_install:
-include .depend
# user-space tools for spec-fine-delay
M = $(shell /bin/pwd)/../kernel
HOST_EXTRACFLAGS += -I$(M) -I$(ZIO)/include -Wno-trigraphs -Wall -ggdb
HOSTCC ?= gcc
......@@ -12,7 +14,7 @@ hostprogs-y += fd-raw-output
hostprogs-y += fd-raw-perf
# we are not in the kernel, so we need to piggy-back on "make modules"
modules: $(hostprogs-y)
all modules: $(hostprogs-y)
clean:
rm -f $(hostprogs-y) *.o *~
......
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