Makefile revision 009d3f400cf0538be8369d17b76092817261585f
1##===- lib/Target/Sparc/V8/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 SparcV8GenCodeEmitter.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
41SparcV8GenCodeEmitter.inc:: $(TDFILES) $(TBLGEN)
42	@echo "Building SparcV8.td code emitter with tblgen"
43	$(VERB) $(TBLGEN) -I $(SourceDir) $(TDFILE) -gen-emitter -o $@
44
45clean::
46	$(VERB) rm -f *.inc
47