Advanced build system

This commit is contained in:
Florian Pose 2006-04-11 08:26:18 +00:00
parent d876fe7731
commit 5b1d341ea9
4 changed files with 534 additions and 532 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,9 +32,16 @@ KERNELDIR := /lib/modules/$(KERNEL)/build
modules:
$(MAKE) -C $(KERNELDIR) M=`pwd`
clean:
clean: cleandoc
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
doc:
doxygen Doxyfile
cleandoc:
@rm -rf doc
install:
@./install.sh $(KERNEL) $(DEVICEINDEX)

View File

@ -1,8 +1,8 @@
#------------------------------------------------------------------------------
#
# Makefile
# kbuild Makefile
#
# IgH EtherCAT-Treiber - EtherCAT Geraete
# IgH EtherCAT master device modules
#
# $Id$
#
@ -11,7 +11,7 @@
ifneq ($(KERNELRELEASE),)
#------------------------------------------------------------------------------
# Kbuild-Abschnitt
# kbuild section
obj-m := ec_8139too.o
@ -27,16 +27,18 @@ EXTRA_CFLAGS = -DEC_REV="$(REV)" -DEC_USER="$(USER)" -DEC_DATE="$(DATE)"
else
#------------------------------------------------------------------------------
# Default-Abschnitt
# default section
ifneq ($(wildcard ethercat.conf),)
include ethercat.conf
ifneq ($(wildcard ../ethercat.conf),)
include ../ethercat.conf
else
KERNELDIR = /lib/modules/`uname -r`/build
KERNEL := $(shell uname -r)
endif
KERNELDIR := /lib/modules/$(KERNEL)/build
modules:
$(MAKE) -C $(KERNELDIR) M=`pwd` modules
$(MAKE) -C $(KERNELDIR) M=`pwd`
clean:
$(MAKE) -C $(KERNELDIR) M=`pwd` clean

View File

@ -2,7 +2,7 @@
#
# Makefile
#
# IgH EtherCAT-Treiber
# IgH EtherCAT master module
#
# $Id$
#
@ -11,7 +11,7 @@
ifneq ($(KERNELRELEASE),)
#------------------------------------------------------------------------------
# Kbuild-Abschnitt
# kbuild section
obj-m := ec_master.o
@ -25,28 +25,22 @@ EXTRA_CFLAGS := -DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER)
else
#------------------------------------------------------------------------------
# Default-Abschnitt
# default section
ifneq ($(wildcard ethercat.conf),)
include ethercat.conf
ifneq ($(wildcard ../ethercat.conf),)
include ../ethercat.conf
else
KERNELDIR = /lib/modules/`uname -r`/build
KERNEL := $(shell uname -r)
endif
KERNELDIR = /lib/modules/$(KERNEL)/build
modules:
$(MAKE) -C $(KERNELDIR) M=`pwd` modules
$(MAKE) -C $(KERNELDIR) M=`pwd`
clean: cleandoc
clean:
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
doc:
doxygen Doxyfile
cleandoc:
@rm -rf doc
.PHONY: doc cleandoc modules clean
#------------------------------------------------------------------------------
endif