Makefile
changeset 281 c91bbf7bc52c
parent 272 efb1c792a6a4
child 287 529c27d9d4d7
equal deleted inserted replaced
280:35c99cdda518 281:c91bbf7bc52c
     1 #------------------------------------------------------------------------------
     1 #------------------------------------------------------------------------------
     2 #
     2 #
     3 #  Makefile
     3 #  Makefile
     4 #  
     4 #
     5 #  IgH EtherCAT master
     5 #  IgH EtherCAT master
     6 #
     6 #
     7 #  $Id$
     7 #  $Id$
     8 #
     8 #
     9 #  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
     9 #  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
    53 KERNEL := $(shell uname -r)
    53 KERNEL := $(shell uname -r)
    54 endif
    54 endif
    55 
    55 
    56 KERNEL_DIR := /lib/modules/$(KERNEL)/build
    56 KERNEL_DIR := /lib/modules/$(KERNEL)/build
    57 CURRENT_DIR := $(shell pwd)
    57 CURRENT_DIR := $(shell pwd)
       
    58 INSTALL_MOD_DIR := ethercat
    58 
    59 
    59 modules:
    60 modules:
    60 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
    61 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
    61 
    62 
    62 install: modules_install
    63 install: modules_install
    63 	@script/install.sh $(KERNEL)
    64 	@script/install.sh $(KERNEL)
    64 
    65 
    65 modules_install:
    66 modules_install:
    66 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/master modules_install
    67 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \
    67 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)/devices modules_install
    68 		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
    68 
    69 
    69 clean: cleandoc
    70 clean: cleandoc
    70 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
    71 	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
    71 
    72 
    72 doc:
    73 doc: