Makefile
changeset 46 f2d7a73d2f32
parent 45 f525f7db2d90
child 50 458e704afc6e
equal deleted inserted replaced
45:f525f7db2d90 46:f2d7a73d2f32
     1 #----------------------------------------------------------------
     1 #------------------------------------------------------------------------------
     2 #
     2 #
     3 #  Globales Makefile
     3 #  Globales Makefile
     4 #
     4 #
     5 #  IgH EtherCAT-Treiber
     5 #  IgH EtherCAT-Treiber
     6 #
     6 #
     7 #  $Id$
     7 #  $Id$
     8 #
     8 #
     9 #----------------------------------------------------------------
     9 #------------------------------------------------------------------------------
    10 
    10 
    11 CONFIG_FILE = ethercat.conf
    11 ifneq ($(KERNELRELEASE),)
    12 
    12 
    13 ifeq ($(CONFIG_FILE),$(wildcard $(CONFIG_FILE)))
    13 #------------------------------------------------------------------------------
    14 include $(CONFIG_FILE)
    14 # Kbuild-Abschnitt
    15 endif
       
    16 
    15 
    17 obj-m := drivers/ mini/
    16 obj-m := drivers/ rt/ mini/
    18 
    17 
    19 ifeq ($(MAKE_RT),yes)
    18 #------------------------------------------------------------------------------
    20 obj-m += rt/
       
    21 endif
       
    22 
    19 
    23 #----------------------------------------------------------------
    20 else
    24 
    21 
    25 all:
    22 #------------------------------------------------------------------------------
       
    23 # Default-Abschnitt
       
    24 
       
    25 include ethercat.conf
       
    26 
       
    27 modules:
    26 	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
    28 	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
    27 
    29 
    28 clean:
    30 clean:
    29 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
    31 	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
       
    32 	rm -rvf */.tmp_versions
    30 
    33 
    31 doc docs:
    34 doc docs:
    32 	doxygen Doxyfile
    35 	doxygen Doxyfile
    33 
    36 
    34 config conf $(CONFIG_FILE):
    37 config conf $(CONFIG_FILE):
    41 	@echo "MAKE_RT    = yes" >> $(CONFIG_FILE)
    44 	@echo "MAKE_RT    = yes" >> $(CONFIG_FILE)
    42 	@echo >> $(CONFIG_FILE)
    45 	@echo >> $(CONFIG_FILE)
    43 	@echo "$(CONFIG_FILE) erstellt."
    46 	@echo "$(CONFIG_FILE) erstellt."
    44 
    47 
    45 #----------------------------------------------------------------
    48 #----------------------------------------------------------------
       
    49 
       
    50 endif