blob: 51208dfd6944152ba498a89e0b94c778e7f2abd4 [file] [log] [blame]
Misha Brukmane5b358c2003-11-05 06:43:36 +00001##===- lib/Target/X86/Makefile -----------------------------*- Makefile -*-===##
John Criswell4436c492003-10-20 22:26:57 +00002#
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##===----------------------------------------------------------------------===##
Chris Lattnerd92fb002002-10-25 22:55:53 +00009LEVEL = ../../..
10LIBRARYNAME = x86
11include $(LEVEL)/Makefile.common
12
Chris Lattner1d21ea72004-08-01 06:01:32 +000013TARGET = X86
14
Chris Lattnera4741a92003-08-03 15:48:14 +000015# Make sure that tblgen is run, first thing.
Chris Lattner553f6c12003-08-03 21:54:59 +000016$(SourceDepend): X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \
17 X86GenRegisterInfo.inc X86GenInstrNames.inc \
Chris Lattner1d088db2004-08-15 23:02:17 +000018 X86GenInstrInfo.inc X86GenAsmWriter.inc
Chris Lattnera4741a92003-08-03 15:48:14 +000019
Chris Lattner1d21ea72004-08-01 06:01:32 +000020TDFILES = $(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"
Chris Lattner632cccf2003-09-10 19:52:54 +000025 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000026
Chris Lattner1d21ea72004-08-01 06:01:32 +000027$(TARGET)GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
28 @echo "Building $(TARGET).td register information header with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000029 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000030
Chris Lattner1d21ea72004-08-01 06:01:32 +000031$(TARGET)GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
32 @echo "Building $(TARGET).td register info implementation with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000033 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000034
Chris Lattner1d21ea72004-08-01 06:01:32 +000035$(TARGET)GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
36 @echo "Building $(TARGET).td instruction names with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000037 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
Chris Lattner553f6c12003-08-03 21:54:59 +000038
Chris Lattner1d21ea72004-08-01 06:01:32 +000039$(TARGET)GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
40 @echo "Building $(TARGET).td instruction information with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000041 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
Chris Lattnere61db422003-08-11 14:59:22 +000042
Chris Lattner1d21ea72004-08-01 06:01:32 +000043$(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
Chris Lattner1d088db2004-08-15 23:02:17 +000047#$(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 $@
Chris Lattner553f6c12003-08-03 21:54:59 +000050
Chris Lattnera4741a92003-08-03 15:48:14 +000051clean::
52 $(VERB) rm -f *.inc