Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 1 | ##===- lib/Target/PowerPC/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 | ##===----------------------------------------------------------------------===## |
| 9 | LEVEL = ../../.. |
Chris Lattner | 017fdcb | 2004-07-15 02:33:38 +0000 | [diff] [blame] | 10 | LIBRARYNAME = powerpc |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 11 | include $(LEVEL)/Makefile.common |
| 12 | |
Misha Brukman | 2f94786 | 2004-08-05 18:34:15 +0000 | [diff] [blame] | 13 | TARGET = PowerPC |
| 14 | |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 15 | # Make sure that tblgen is run, first thing. |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 16 | $(SourceDepend): PowerPCGenInstrNames.inc PowerPCGenRegisterNames.inc \ |
| 17 | PowerPCGenCodeEmitter.inc PowerPCGenAsmWriter.inc \ |
| 18 | PPC32GenRegisterInfo.h.inc PPC32GenRegisterInfo.inc PPC32GenInstrInfo.inc \ |
| 19 | PPC64GenRegisterInfo.h.inc PPC64GenRegisterInfo.inc PPC64GenInstrInfo.inc |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 20 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 21 | TDFILES = $(wildcard $(SourceDir)/*.td) $(SourceDir)/../Target.td |
Misha Brukman | 2f94786 | 2004-08-05 18:34:15 +0000 | [diff] [blame] | 22 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 23 | %GenRegisterNames.inc:: PPC32.td $(TDFILES) $(TBLGEN) |
| 24 | @echo "Building PowerPC register names with tblgen" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 25 | $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@ |
| 26 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 27 | %GenRegisterInfo.h.inc:: %.td $(TDFILES) $(TBLGEN) |
| 28 | @echo "Building `basename $<` register information header with tblgen" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 29 | $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@ |
| 30 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 31 | %GenRegisterInfo.inc:: %.td $(TDFILES) $(TBLGEN) |
| 32 | @echo "Building `basename $<` register information implementation with tblgen" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 33 | $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@ |
| 34 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 35 | $(TARGET)GenInstrNames.inc:: PPC32.td $(TDFILES) $(TBLGEN) |
| 36 | @echo "Building $(TARGET) instruction names with tblgen" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 37 | $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@ |
| 38 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 39 | %GenInstrInfo.inc:: %.td $(TDFILES) $(TBLGEN) |
| 40 | @echo "Building $(TARGET) instruction information with tblgen" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 41 | $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@ |
| 42 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 43 | $(TARGET)GenCodeEmitter.inc:: PPC32.td $(TDFILES) $(TBLGEN) |
| 44 | @echo "Building $(TARGET) code emitter" |
Misha Brukman | f588548 | 2004-08-09 17:24:32 +0000 | [diff] [blame] | 45 | $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-emitter -o $@ |
| 46 | |
Misha Brukman | 9e36843 | 2004-08-17 05:11:54 +0000 | [diff] [blame^] | 47 | $(TARGET)GenAsmWriter.inc:: PPC32.td $(TDFILES) $(TBLGEN) |
Nate Begeman | 14d89d6 | 2004-08-14 22:06:38 +0000 | [diff] [blame] | 48 | @echo "Building $(TARGET).td assembly writer with tblgen" |
| 49 | $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-asm-writer -o $@ |
| 50 | |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 51 | clean:: |
| 52 | $(VERB) rm -f *.inc |