Makefile
changeset 16 f04e93b8af0f
parent 12 920e3b41a61f
child 22 e8c2cd004e0b
--- a/Makefile	Fri Nov 11 13:52:12 2005 +0000
+++ b/Makefile	Fri Nov 18 09:35:04 2005 +0000
@@ -8,7 +8,11 @@
 #
 #----------------------------------------------------------------
 
-KERNEL_DIRS_FILE = kerneldirs.mk
+CONFIG_FILE = ethercat.conf
+
+ifeq ($(CONFIG_FILE),$(wildcard $(CONFIG_FILE)))
+include $(CONFIG_FILE)
+endif
 
 #----------------------------------------------------------------
 
@@ -20,23 +24,38 @@
 .drivers:
 	$(MAKE) -C drivers
 
+ifeq ($(MAKE_RT),yes)
 .rt:
 	$(MAKE) -C rt
+else
+.rt:
+	@echo "Skipping Real-Time."
+endif
 
+ifeq ($(MAKE_RS232),yes)
 .rs232dbg:
 	$(MAKE) -C rs232dbg
+else
+.rs232dbg:
+	@echo "Skipping rs232dbg."
+endif
 
 .mini:
 	$(MAKE) -C mini
 
-kerneldirs:
-	@echo "# EtherCAT Standard-Kernel-Verzeichnisse" > $(KERNEL_DIRS_FILE)
-	@echo >> $(KERNEL_DIRS_FILE)
-	@echo "KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5" >> $(KERNEL_DIRS_FILE)
-	@echo "RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13" >> $(KERNEL_DIRS_FILE)
-	@echo "RTLIBDIR = rt_lib" >> $(KERNEL_DIRS_FILE)
-	@echo >> $(KERNEL_DIRS_FILE)
-	@echo "$(KERNEL_DIRS_FILE) erstellt."
+config $(CONFIG_FILE):
+	@echo "# EtherCAT Konfigurationsdatei" > $(CONFIG_FILE)
+	@echo >> $(CONFIG_FILE)
+	@echo "KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5" >> $(CONFIG_FILE)
+	@echo "RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13" >> $(CONFIG_FILE)
+	@echo "RTLIBDIR  = rt_lib" >> $(CONFIG_FILE)
+	@echo >> $(CONFIG_FILE)
+	@echo "GCC_SYSTEMDIR = /usr/lib/gcc-lib/i486-suse-linux/3.3/include" >> $(CONFIG_FILE)
+	@echo >> $(CONFIG_FILE)
+	@echo "MAKE_RT    = yes" >> $(CONFIG_FILE)
+	@echo "MAKE_RS232 = yes" >> $(CONFIG_FILE)
+	@echo >> $(CONFIG_FILE)
+	@echo "$(CONFIG_FILE) erstellt."
 
 clean:
 	$(MAKE) -C rt clean