chiark / gitweb /
autogenerate layoutinfo.h
authorian <ian>
Sun, 27 Mar 2005 21:45:27 +0000 (21:45 +0000)
committerian <ian>
Sun, 27 Mar 2005 21:45:27 +0000 (21:45 +0000)
hostside/Makefile
hostside/layoutinfo.h [deleted file]

index bee9442bce9ca413f28683b9d92a9d5049947d17..3de430e3ba8aafefe0e8e90df8285d568a67f72d 100644 (file)
@@ -10,6 +10,12 @@ all:         $(TARGETS)
 hostside:      serialio.o nmra.o main.o encode.o
                $(CC) $(CFLAGS) -o $@ $+
 
+ours.safety.o: ../layout/ours.safety.c safety.h
+               $(CC) $(CFLAGS) -I. -o $@ -c $<
+
+layoutinfo.h:  ../layout/ours.safety.c Makefile
+               sed -e '/^#include/,$d' $< $o
+
 encode.o:      nmra-packets.h
 main.o:                nmra-packets.h
 %.c:           hostside.h
diff --git a/hostside/layoutinfo.h b/hostside/layoutinfo.h
deleted file mode 100644 (file)
index 60424e8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/* will be autogenerated at some point */
-
-#define NUM_TRAINS 2
-#define NUM_SEGMENTS 100