chiark / gitweb /
fix grammar in a comment
[trains.git] / cprogs.make
index 132c373b7cd8990acf361ea7796d21bf6416addd..ab853bad6d8987b04140042c548ab56c67ac06e5 100644 (file)
@@ -1,13 +1,20 @@
 OPTIMISE= -O2
 WERROR= -Werror
-CFLAGS=        $(CPPFLAGS) \
+CFLAGS=        $(CPPFLAGS) -D_GNU_SOURCE \
        -Wall -Wwrite-strings -Wpointer-arith -Wmissing-declarations \
        -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes \
        $(WERROR) \
        -g $(OPTIMISE)
-CPPFLAGS=      -D_GNU_SOURCE
+CPPFLAGS=
 LINK=          $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
 
-%.o:   %.c
-       $(CC) $(CFLAGS) -MM $< >$*.d
-       $(CC) $(CFLAGS) -o $@ -c $<
+LEX=flex
+BISON=bison
+
+FLEXCFLAGS=    -Wno-unused -Wno-missing-declarations -Wno-missing-prototypes
+
+%.o:   %.c $(AUTOINCS)
+       $(CC) $(CFLAGS) $(SPECIAL_CFLAGS_$*) -MMD -o $@ -c $<
+
+%.c:   %.y
+       $(BISON) -o $@ $<