chiark / gitweb /
starting on flex/bison parser for hostside
[trains.git] / cprogs.make
index e6fd70cd360aad6f777278cd628809ad5b1ec8cd..19d8d04ea88da7d7b8053a623573cd565872a79a 100644 (file)
@@ -8,6 +8,12 @@ CFLAGS=        $(CPPFLAGS) -D_GNU_SOURCE \
 CPPFLAGS=
 LINK=          $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
 
+LEX=flex
+BISON=bison
+
 %.o:   %.c $(AUTOINCS)
        $(CC) $(CFLAGS) -MM $< >$*.d
        $(CC) $(CFLAGS) -o $@ -c $<
+
+%.c:   %.y
+       $(BISON) -o $@ $<