chiark / gitweb /
hostside: hidrawconv: rename various variables and functions to be more sensible...
[trains.git] / cprogs.make
index e6fd70cd360aad6f777278cd628809ad5b1ec8cd..22ec57067f54c46f2edc6d0ce495c7ec1d7b2c0a 100644 (file)
@@ -8,6 +8,18 @@ CFLAGS=        $(CPPFLAGS) -D_GNU_SOURCE \
 CPPFLAGS=
 LINK=          $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
 
+LEX=flex
+BISON=bison
+
+FLEXCFLAGS=    -Wno-unused -Wno-missing-declarations -Wno-missing-prototypes
+
 %.o:   %.c $(AUTOINCS)
-       $(CC) $(CFLAGS) -MM $< >$*.d
-       $(CC) $(CFLAGS) -o $@ -c $<
+       $(CC) $(CFLAGS) $(SPECIAL_CFLAGS_$*) -MMD -o $@ -c $<
+
+%.c:   %.y
+       $(BISON) -o $@ $<
+
+ETAGS_SRCS += $(wildcard *.[ch])
+
+TAGS:  $(ETAGS_SRCS)
+       etags $^