blob: 98417d2b755c66713f6ad0e6519e0e9617642994 [file] [log] [blame]
Chris Lattnere62c1182002-12-02 01:23:04 +00001LEVEL = ../..
2TOOLNAME = tblgen
3USEDLIBS = support.a
4
Chris Lattner4767a0c2002-12-03 06:00:11 +00005.PRECIOUS: FileLexer.cpp FileParser.cpp
6
Chris Lattnere62c1182002-12-02 01:23:04 +00007include $(LEVEL)/Makefile.common
8
John Criswell7a73b802003-06-30 21:59:07 +00009#
10# Make the source file depend on the header file. In this way, dependencies
11# (which depend on the source file) won't get generated until bison is done
12# generating the C source and header files for the parser.
13#
14FileLexer.cpp: FileParser.h
15
Chris Lattnere62c1182002-12-02 01:23:04 +000016clean::
17 -rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp
18 -rm -f FileParser.output
19
Chris Lattner24e79092002-12-02 16:13:42 +000020
Chris Lattnerd00e8f12002-12-02 16:31:46 +000021dump:: $(TOOLEXENAME_G)
Chris Lattnere62c1182002-12-02 01:23:04 +000022 $(TOOLEXENAME_G) < X86.td
Chris Lattner24e79092002-12-02 16:13:42 +000023
Chris Lattnerd00e8f12002-12-02 16:31:46 +000024parse: $(TOOLEXENAME_G)
Chris Lattner24e79092002-12-02 16:13:42 +000025 $(TOOLEXENAME_G) < X86.td -parse
26
Chris Lattnerd00e8f12002-12-02 16:31:46 +000027test:: $(TOOLEXENAME_G)
Chris Lattnere62c1182002-12-02 01:23:04 +000028 @echo "enum {"
29 @$(TOOLEXENAME_G) < X86.td -class=Register
30 @echo
31 @echo "};"
32
33 @echo "enum {"
34 @$(TOOLEXENAME_G) < X86.td -class=Instruction
35 @echo
36 @echo "};"