Makefile revision f60b91cbe333963c4a077972b3491429815314ee
1##===- lib/Target/X86/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 = x86
11include $(LEVEL)/Makefile.common
12
13TARGET = X86
14
15# Make sure that tblgen is run, first thing.
16$(SourceDepend): X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \
17                 X86GenRegisterInfo.inc X86GenInstrNames.inc \
18                 X86GenInstrInfo.inc X86GenAsmWriter.inc
19
20TDFILES = $(SourceDir)/$(TARGET).td $(wildcard $(SourceDir)/*.td) \
21          $(SourceDir)/../Target.td
22
23$(TARGET)GenRegisterNames.inc::  $(TDFILES) $(TBLGEN)
24	@echo "Building $(TARGET).td register names with tblgen"
25	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
26
27$(TARGET)GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
28	@echo "Building $(TARGET).td register information header with tblgen"
29	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
30
31$(TARGET)GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
32	@echo "Building $(TARGET).td register info implementation with tblgen"
33	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
34
35$(TARGET)GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
36	@echo "Building $(TARGET).td instruction names with tblgen"
37	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
38
39$(TARGET)GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
40	@echo "Building $(TARGET).td instruction information with tblgen"
41	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
42
43$(TARGET)GenAsmWriter.inc:: $(TDFILES) $(TBLGEN)
44	@echo "Building $(TARGET).td assembly writer with tblgen"
45	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-asm-writer -o $@
46
47#$(TARGET)GenInstrSelector.inc:: $(TDFILES) $(TBLGEN)
48#	@echo "Building $(TARGET).td instruction selector with tblgen"
49#	$(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-selector -o $@
50
51clean::
52	$(VERB) rm -f *.inc
53