Clean up rules
[oota-llvm.git] / lib / Target / Sparc / Makefile
1 ##===- lib/Target/SparcV8/Makefile -------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
7
8 ##===----------------------------------------------------------------------===##
9 LEVEL = ../../..
10 LIBRARYNAME = sparcv8
11 include $(LEVEL)/Makefile.common
12
13 TDFILES := $(wildcard $(SourceDir)/*.td) $(SourceDir)/../Target.td
14 TDFILE  := $(SourceDir)/SparcV8.td
15
16 # Make sure that tblgen is run, first thing.
17 $(SourceDepend): SparcV8GenRegisterInfo.h.inc SparcV8GenRegisterNames.inc \
18                  SparcV8GenRegisterInfo.inc SparcV8GenInstrNames.inc \
19                  SparcV8GenInstrInfo.inc SparcV8GenInstrSelector.inc
20
21 SparcV8GenRegisterNames.inc:: $(TDFILES) $(TBLGEN)
22         @echo "Building SparcV8.td register names with tblgen"
23         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-register-enums -o $@
24
25 SparcV8GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
26         @echo "Building SparcV8.td register information header with tblgen"
27         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-register-desc-header -o $@
28
29 SparcV8GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
30         @echo "Building SparcV8.td register information implementation with tblgen"
31         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-register-desc -o $@
32
33 SparcV8GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
34         @echo "Building SparcV8.td instruction names with tblgen"
35         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-instr-enums -o $@
36
37 SparcV8GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
38         @echo "Building SparcV8.td instruction information with tblgen"
39         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-instr-desc -o $@
40
41 SparcV8GenInstrSelector.inc:: $(TDFILES) $(TBLGEN)
42         @echo "Building SparcV8.td instruction selector with tblgen"
43         $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $(TDFILE) -gen-instr-selector -o $@
44
45 clean::
46         $(VERB) rm -f *.inc