blob: dd745402fe8a9e55c7fd55a57cb4ad7a51e1b026 [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 Lattner56832602004-10-03 20:36:57 +000018 X86GenInstrInfo.inc X86GenATTAsmWriter.inc \
19 X86GenIntelAsmWriter.inc
Chris Lattnera4741a92003-08-03 15:48:14 +000020
Chris Lattner1d21ea72004-08-01 06:01:32 +000021TDFILES = $(SourceDir)/$(TARGET).td $(wildcard $(SourceDir)/*.td) \
22 $(SourceDir)/../Target.td
23
24$(TARGET)GenRegisterNames.inc:: $(TDFILES) $(TBLGEN)
25 @echo "Building $(TARGET).td register names with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000026 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000027
Chris Lattner1d21ea72004-08-01 06:01:32 +000028$(TARGET)GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
29 @echo "Building $(TARGET).td register information header with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000030 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000031
Chris Lattner1d21ea72004-08-01 06:01:32 +000032$(TARGET)GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
33 @echo "Building $(TARGET).td register info implementation with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000034 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
Chris Lattnera4741a92003-08-03 15:48:14 +000035
Chris Lattner1d21ea72004-08-01 06:01:32 +000036$(TARGET)GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
37 @echo "Building $(TARGET).td instruction names with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000038 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
Chris Lattner553f6c12003-08-03 21:54:59 +000039
Chris Lattner1d21ea72004-08-01 06:01:32 +000040$(TARGET)GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
41 @echo "Building $(TARGET).td instruction information with tblgen"
Chris Lattner632cccf2003-09-10 19:52:54 +000042 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
Chris Lattnere61db422003-08-11 14:59:22 +000043
Chris Lattner56832602004-10-03 20:36:57 +000044$(TARGET)GenATTAsmWriter.inc:: $(TDFILES) $(TBLGEN)
45 @echo "Building $(TARGET).td AT&T assembly writer with tblgen"
Chris Lattner1d21ea72004-08-01 06:01:32 +000046 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-asm-writer -o $@
47
Chris Lattner56832602004-10-03 20:36:57 +000048$(TARGET)GenIntelAsmWriter.inc:: $(TDFILES) $(TBLGEN)
49 @echo "Building $(TARGET).td Intel assembly writer with tblgen"
50 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-asm-writer -asmwriternum=1 -o $@
51
Chris Lattner1d088db2004-08-15 23:02:17 +000052#$(TARGET)GenInstrSelector.inc:: $(TDFILES) $(TBLGEN)
53# @echo "Building $(TARGET).td instruction selector with tblgen"
54# $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-selector -o $@
Chris Lattner553f6c12003-08-03 21:54:59 +000055
Chris Lattnera4741a92003-08-03 15:48:14 +000056clean::
57 $(VERB) rm -f *.inc