Makefile revision 2ec09e713e5cf665f1410340d4772b57b489160a
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##===----------------------------------------------------------------------===##
9LEVEL = ../../../..
10LIBRARYNAME = sparcv8
11include $(LEVEL)/Makefile.common
12
13TDFILES := $(wildcard $(SourceDir)/*.td) $(SourceDir)/../../Target.td
14TDFILE  := $(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
20
21SparcV8GenRegisterNames.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
25SparcV8GenRegisterInfo.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
29SparcV8GenRegisterInfo.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
33SparcV8GenInstrNames.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
37SparcV8GenInstrInfo.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
41clean::
42	$(VERB) rm -f *.inc
43