Implement workaround for flex --header-file option
[emu8051.git] / src / cli / Makefile.am
index 63eedab..ff65f54 100644 (file)
@@ -2,21 +2,35 @@
 
 AM_CPPFLAGS = \
     $(WARNINGCFLAGS) \
-    -I@top_srcdir@ \
-    -I@top_srcdir@/src/common
+    -I$(top_srcdir)/src/common \
+    -I$(top_builddir)/src/common
+
+# Option --header-file: produce header file scanner.h.
+# Using abs_builddir as a workaround for automake-1.11
+# broken ylwrap script.
+AM_LFLAGS = --header-file=$(abs_builddir)/scanner.h
+
+# Option -d: produce header file parser.h
+AM_YFLAGS = -d
 
 LDADD = \
+    $(LIBREADLINE) \
     $(top_builddir)/src/common/libemu8051.a
 
 bin_PROGRAMS = emu8051-cli
 
 emu8051_cli_SOURCES = \
-    emuconsole.c \
+    parser.y scanner.l \
+    main.c \
+    menu.c menu.h \
     keyboard.c keyboard.h
 
-# we want these in the dist tarball
-EXTRA_DIST =
+# We want these in the dist tarball
+EXTRA_DIST = scanner.h
 
 CLEANFILES = *~
 
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = \
+    Makefile.in \
+    scanner.h scanner.c \
+    parser.h parser.c