-CFLAGS= -Wall -Wwrite-strings -Wpointer-arith \
+OPTIMISE= -O2
+WERROR= -Werror
+CFLAGS= $(CPPFLAGS) -D_GNU_SOURCE \
+ -Wall -Wwrite-strings -Wpointer-arith -Wmissing-declarations \
-Wnested-externs -Wmissing-prototypes -Wstrict-prototypes \
- -O2 -g
+ $(WERROR) \
+ -g $(OPTIMISE)
+CPPFLAGS=
+LINK= $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
+
+%.o: %.c $(AUTOINCS)
+ $(CC) $(CFLAGS) -MM $< >$*.d
+ $(CC) $(CFLAGS) -o $@ -c $<