chiark / gitweb /
new arrangements for cross-directory: ours.safety => ours.layout-data, and automatic...
[trains.git] / hostside / Makefile
1 #
2
3 include ../common.make
4 include ../cprogs.make
5
6 TARGETS=        hostside safety
7 CFLAGS=         -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes \
8                 -Wpointer-arith -Wwrite-strings -g $(OPTIMISE)
9 OPTIMISE=       -O2
10
11 all:            $(TARGETS)
12
13 hostside:       serialio.o nmra.o main.o encode.o
14                 $(LINK)
15
16 layoutinfo.h:   ../layout/ours.layout-data.c Makefile
17                 sed -e '/^#include/,$$d' $< $o
18
19 %.c:            layoutinfo.h
20
21 safety:         safety.o ../layout/ours.layout-data.o
22                 $(LINK)
23
24 encode.o:       nmra-packets.h
25 main.o:         nmra-packets.h
26 %.c:            hostside.h
27
28 clean:
29                 rm -f *.o *.d $(TARGETS)
30
31 include $(wildcard *.d)