blob: e76bc3b28628d50e5900f1da4ba61ed4c17231a5 [file] [log] [blame]
Misha Brukman5dfe3a92004-06-21 16:55:25 +00001##===- 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##===----------------------------------------------------------------------===##
9LEVEL = ../../..
Chris Lattner017fdcb2004-07-15 02:33:38 +000010LIBRARYNAME = powerpc
Misha Brukman5dfe3a92004-06-21 16:55:25 +000011include $(LEVEL)/Makefile.common
12
Misha Brukman2f947862004-08-05 18:34:15 +000013TARGET = PowerPC
14
Misha Brukman5dfe3a92004-06-21 16:55:25 +000015# Make sure that tblgen is run, first thing.
Misha Brukman9e368432004-08-17 05:11:54 +000016$(SourceDepend): PowerPCGenInstrNames.inc PowerPCGenRegisterNames.inc \
Misha Brukmanbab2adf2004-10-14 06:04:56 +000017 PowerPCGenAsmWriter.inc PPC32GenCodeEmitter.inc \
Misha Brukman9e368432004-08-17 05:11:54 +000018 PPC32GenRegisterInfo.h.inc PPC32GenRegisterInfo.inc PPC32GenInstrInfo.inc \
19 PPC64GenRegisterInfo.h.inc PPC64GenRegisterInfo.inc PPC64GenInstrInfo.inc
Misha Brukman5dfe3a92004-06-21 16:55:25 +000020
Misha Brukman9e368432004-08-17 05:11:54 +000021TDFILES = $(wildcard $(SourceDir)/*.td) $(SourceDir)/../Target.td
Misha Brukman2f947862004-08-05 18:34:15 +000022
Misha Brukman9e368432004-08-17 05:11:54 +000023%GenRegisterNames.inc:: PPC32.td $(TDFILES) $(TBLGEN)
Misha Brukmanbab2adf2004-10-14 06:04:56 +000024 @echo "Building $(TARGET) register names with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000025 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
26
Misha Brukman9e368432004-08-17 05:11:54 +000027%GenRegisterInfo.h.inc:: %.td $(TDFILES) $(TBLGEN)
28 @echo "Building `basename $<` register information header with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000029 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
30
Misha Brukman9e368432004-08-17 05:11:54 +000031%GenRegisterInfo.inc:: %.td $(TDFILES) $(TBLGEN)
32 @echo "Building `basename $<` register information implementation with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000033 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
34
Misha Brukman9e368432004-08-17 05:11:54 +000035$(TARGET)GenInstrNames.inc:: PPC32.td $(TDFILES) $(TBLGEN)
36 @echo "Building $(TARGET) instruction names with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000037 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
38
Misha Brukman9e368432004-08-17 05:11:54 +000039%GenInstrInfo.inc:: %.td $(TDFILES) $(TBLGEN)
Misha Brukmanbab2adf2004-10-14 06:04:56 +000040 @echo "Building `basename $<` instruction information with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000041 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
42
Misha Brukmanbab2adf2004-10-14 06:04:56 +000043%GenCodeEmitter.inc:: %.td $(TDFILES) $(TBLGEN)
44 @echo "Building `basename $<` code emitter with tblgen"
Misha Brukmanf5885482004-08-09 17:24:32 +000045 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-emitter -o $@
46
Misha Brukmanbab2adf2004-10-14 06:04:56 +000047$(TARGET)GenAsmWriter.inc:: $(TARGET).td $(TDFILES) $(TBLGEN)
Nate Begeman14d89d62004-08-14 22:06:38 +000048 @echo "Building $(TARGET).td assembly writer with tblgen"
49 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-asm-writer -o $@
50
Misha Brukman5dfe3a92004-06-21 16:55:25 +000051clean::
52 $(VERB) rm -f *.inc