1 ##===- lib/Target/PowerPC/Makefile -------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
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.
8 ##===----------------------------------------------------------------------===##
11 include $(LEVEL)/Makefile.common
15 # Make sure that tblgen is run, first thing.
16 $(SourceDepend): PowerPCGenInstrNames.inc PowerPCGenRegisterNames.inc \
17 PowerPCGenAsmWriter.inc PPC32GenCodeEmitter.inc \
18 PPC32GenRegisterInfo.h.inc PPC32GenRegisterInfo.inc PPC32GenInstrInfo.inc \
19 PPC64GenRegisterInfo.h.inc PPC64GenRegisterInfo.inc PPC64GenInstrInfo.inc
21 TDFILES = $(wildcard $(SourceDir)/*.td) $(SourceDir)/../Target.td
23 %GenRegisterNames.inc:: PPC32.td $(TDFILES) $(TBLGEN)
24 @echo "Building $(TARGET) register names with tblgen"
25 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
27 %GenRegisterInfo.h.inc:: %.td $(TDFILES) $(TBLGEN)
28 @echo "Building `basename $<` register information header with tblgen"
29 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
31 %GenRegisterInfo.inc:: %.td $(TDFILES) $(TBLGEN)
32 @echo "Building `basename $<` register information implementation with tblgen"
33 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
35 $(TARGET)GenInstrNames.inc:: PPC32.td $(TDFILES) $(TBLGEN)
36 @echo "Building $(TARGET) instruction names with tblgen"
37 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
39 %GenInstrInfo.inc:: %.td $(TDFILES) $(TBLGEN)
40 @echo "Building `basename $<` instruction information with tblgen"
41 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
43 %GenCodeEmitter.inc:: %.td $(TDFILES) $(TBLGEN)
44 @echo "Building `basename $<` code emitter with tblgen"
45 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-emitter -o $@
47 $(TARGET)GenAsmWriter.inc:: $(TARGET).td $(TDFILES) $(TBLGEN)
48 @echo "Building $(TARGET).td assembly writer with tblgen"
49 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-asm-writer -o $@