chiark / gitweb /
fail somewhat more nicely
[trains.git] / cprogs.make
1 OPTIMISE= -O2
2 WERROR= -Werror
3 CFLAGS= $(CPPFLAGS) -D_GNU_SOURCE \
4         -Wall -Wwrite-strings -Wpointer-arith -Wmissing-declarations \
5         -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes \
6         $(WERROR) \
7         -g $(OPTIMISE)
8 CPPFLAGS=
9 LINK=           $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
10
11 %.o:    %.c $(AUTOINCS)
12         $(CC) $(CFLAGS) -MM $< >$*.d
13         $(CC) $(CFLAGS) -o $@ -c $<