2002-12-02 01:23:04 +00:00
|
|
|
LEVEL = ../..
|
|
|
|
TOOLNAME = tblgen
|
|
|
|
USEDLIBS = support.a
|
|
|
|
|
2002-12-03 06:00:11 +00:00
|
|
|
.PRECIOUS: FileLexer.cpp FileParser.cpp
|
|
|
|
|
2002-12-02 01:23:04 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2003-06-30 21:59:07 +00:00
|
|
|
#
|
|
|
|
# Make the source file depend on the header file. In this way, dependencies
|
|
|
|
# (which depend on the source file) won't get generated until bison is done
|
|
|
|
# generating the C source and header files for the parser.
|
|
|
|
#
|
|
|
|
FileLexer.cpp: FileParser.h
|
|
|
|
|
2002-12-02 01:23:04 +00:00
|
|
|
clean::
|
|
|
|
-rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp
|
|
|
|
-rm -f FileParser.output
|
|
|
|
|
2002-12-02 16:13:42 +00:00
|
|
|
|
2002-12-02 16:31:46 +00:00
|
|
|
dump:: $(TOOLEXENAME_G)
|
2002-12-02 01:23:04 +00:00
|
|
|
$(TOOLEXENAME_G) < X86.td
|
2002-12-02 16:13:42 +00:00
|
|
|
|
2002-12-02 16:31:46 +00:00
|
|
|
parse: $(TOOLEXENAME_G)
|
2002-12-02 16:13:42 +00:00
|
|
|
$(TOOLEXENAME_G) < X86.td -parse
|
|
|
|
|
2002-12-02 16:31:46 +00:00
|
|
|
test:: $(TOOLEXENAME_G)
|
2002-12-02 01:23:04 +00:00
|
|
|
@echo "enum {"
|
|
|
|
@$(TOOLEXENAME_G) < X86.td -class=Register
|
|
|
|
@echo
|
|
|
|
@echo "};"
|
|
|
|
|
|
|
|
@echo "enum {"
|
|
|
|
@$(TOOLEXENAME_G) < X86.td -class=Instruction
|
|
|
|
@echo
|
|
|
|
@echo "};"
|