Add automatic regeneration of files from opcode2c.pl to src/Makefile.am
[emu8051.git] / src / Makefile.am
index 30bb820..629cea7 100644 (file)
@@ -5,24 +5,30 @@ INCLUDES = -I$(top_srcdir)/pixmaps
 bin_PROGRAMS = emu8051
 # emu8051_console
 
-emu8051_SOURCES = cpu8051.c emugtk.c memory.c memwin.c pgmwin.c regwin.c options.c file.c \
-                  instructions_8051.c
+# instructions_8051.c must be first, because it and other files (instructions_8051.h and
+# disasm.h) are automatically generated by a perl script, and other source files include
+# them (the .h).
+emu8051_SOURCES = instructions_8051.c emugtk.c memwin.c pgmwin.c regwin.c filemenu.c \
+                  viewmenu.c helpmenu.c messagebox.c options.c hexfile.c cpu8051.c memory.c
 
-#emu8051_console_SOURCES = EmuConsole.cpp cpu8051.c memory.c options.c file.c
+#emu8051_console_SOURCES = EmuConsole.cpp cpu8051.c memory.c options.c file.c EmuConsole.hpp Keyboard.hpp
 
 # These headers will be included in the distribution tarball, but will not be
 # installed by 'make install'
-noinst_HEADERS = instructions_8051.h EmuConsole.hpp Keyboard.hpp reg8051.h gtksizes.h \
-                 disasm.hpp
-#                 exceptions.hpp
+noinst_HEADERS = emugtk.h memwin.h pgmwin.h regwin.h filemenu.h viewmenu.h helpmenu.h \
+                 messagebox.h options.h hexfile.h cpu8051.h memory.h reg8051.h gtksizes.h
+
+# These files are generated automatically by a perl script.
+instructions_8051.c instructions_8051.h disasm.h : opcode2c.pl opcodes.lst
+       ./opcode2c.pl
 
 CLEANFILES     = *~
 
 DISTCLEANFILES = .deps/*.P
 
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in instructions_8051.c instructions_8051.h disasm.h
 
-EXTRA_DIST = opcode2c.pl opcodes.lst instructions_8051.h
+EXTRA_DIST = opcode2c.pl opcodes.lst instructions_8051.h disasm.h
 
 # This rule is used to bypass the default rule which is generated by Automake, in order
 # to get rid of all the cluttered informations that are displayed by Make before