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