Makefile
changeset 16 f04e93b8af0f
parent 12 920e3b41a61f
child 22 e8c2cd004e0b
equal deleted inserted replaced
15:72d95aa70c1d 16:f04e93b8af0f
     6 #
     6 #
     7 #  $Id$
     7 #  $Id$
     8 #
     8 #
     9 #----------------------------------------------------------------
     9 #----------------------------------------------------------------
    10 
    10 
    11 KERNEL_DIRS_FILE = kerneldirs.mk
    11 CONFIG_FILE = ethercat.conf
       
    12 
       
    13 ifeq ($(CONFIG_FILE),$(wildcard $(CONFIG_FILE)))
       
    14 include $(CONFIG_FILE)
       
    15 endif
    12 
    16 
    13 #----------------------------------------------------------------
    17 #----------------------------------------------------------------
    14 
    18 
    15 all: .rs232dbg .drivers .rt .mini
    19 all: .rs232dbg .drivers .rt .mini
    16 
    20 
    18 	doxygen Doxyfile
    22 	doxygen Doxyfile
    19 
    23 
    20 .drivers:
    24 .drivers:
    21 	$(MAKE) -C drivers
    25 	$(MAKE) -C drivers
    22 
    26 
       
    27 ifeq ($(MAKE_RT),yes)
    23 .rt:
    28 .rt:
    24 	$(MAKE) -C rt
    29 	$(MAKE) -C rt
       
    30 else
       
    31 .rt:
       
    32 	@echo "Skipping Real-Time."
       
    33 endif
    25 
    34 
       
    35 ifeq ($(MAKE_RS232),yes)
    26 .rs232dbg:
    36 .rs232dbg:
    27 	$(MAKE) -C rs232dbg
    37 	$(MAKE) -C rs232dbg
       
    38 else
       
    39 .rs232dbg:
       
    40 	@echo "Skipping rs232dbg."
       
    41 endif
    28 
    42 
    29 .mini:
    43 .mini:
    30 	$(MAKE) -C mini
    44 	$(MAKE) -C mini
    31 
    45 
    32 kerneldirs:
    46 config $(CONFIG_FILE):
    33 	@echo "# EtherCAT Standard-Kernel-Verzeichnisse" > $(KERNEL_DIRS_FILE)
    47 	@echo "# EtherCAT Konfigurationsdatei" > $(CONFIG_FILE)
    34 	@echo >> $(KERNEL_DIRS_FILE)
    48 	@echo >> $(CONFIG_FILE)
    35 	@echo "KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5" >> $(KERNEL_DIRS_FILE)
    49 	@echo "KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5" >> $(CONFIG_FILE)
    36 	@echo "RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13" >> $(KERNEL_DIRS_FILE)
    50 	@echo "RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13" >> $(CONFIG_FILE)
    37 	@echo "RTLIBDIR = rt_lib" >> $(KERNEL_DIRS_FILE)
    51 	@echo "RTLIBDIR  = rt_lib" >> $(CONFIG_FILE)
    38 	@echo >> $(KERNEL_DIRS_FILE)
    52 	@echo >> $(CONFIG_FILE)
    39 	@echo "$(KERNEL_DIRS_FILE) erstellt."
    53 	@echo "GCC_SYSTEMDIR = /usr/lib/gcc-lib/i486-suse-linux/3.3/include" >> $(CONFIG_FILE)
       
    54 	@echo >> $(CONFIG_FILE)
       
    55 	@echo "MAKE_RT    = yes" >> $(CONFIG_FILE)
       
    56 	@echo "MAKE_RS232 = yes" >> $(CONFIG_FILE)
       
    57 	@echo >> $(CONFIG_FILE)
       
    58 	@echo "$(CONFIG_FILE) erstellt."
    40 
    59 
    41 clean:
    60 clean:
    42 	$(MAKE) -C rt clean
    61 	$(MAKE) -C rt clean
    43 	$(MAKE) -C drivers clean
    62 	$(MAKE) -C drivers clean
    44 	$(MAKE) -C rs232dbg clean
    63 	$(MAKE) -C rs232dbg clean