blob: f210964b8cb94e557b1c38d4a637485eb3923372 [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.
16$(SourceDepend): PowerPCGenRegisterInfo.h.inc PowerPCGenRegisterNames.inc \
17 PowerPCGenRegisterInfo.inc PowerPCGenInstrNames.inc \
Nate Begeman14d89d62004-08-14 22:06:38 +000018 PowerPCGenInstrInfo.inc PowerPCGenCodeEmitter.inc \
19 PowerPCGenAsmWriter.inc
Misha Brukman5dfe3a92004-06-21 16:55:25 +000020
Misha Brukman2f947862004-08-05 18:34:15 +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"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000026 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-enums -o $@
27
Misha Brukman2f947862004-08-05 18:34:15 +000028$(TARGET)GenRegisterInfo.h.inc:: $(TDFILES) $(TBLGEN)
29 @echo "Building $(TARGET).td register information header with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000030 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc-header -o $@
31
Misha Brukman2f947862004-08-05 18:34:15 +000032$(TARGET)GenRegisterInfo.inc:: $(TDFILES) $(TBLGEN)
33 @echo "Building $(TARGET).td register information implementation with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000034 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-register-desc -o $@
35
Misha Brukman2f947862004-08-05 18:34:15 +000036$(TARGET)GenInstrNames.inc:: $(TDFILES) $(TBLGEN)
37 @echo "Building $(TARGET).td instruction names with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000038 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-enums -o $@
39
Misha Brukman2f947862004-08-05 18:34:15 +000040$(TARGET)GenInstrInfo.inc:: $(TDFILES) $(TBLGEN)
41 @echo "Building $(TARGET).td instruction information with tblgen"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000042 $(VERB) $(TBLGEN) -I $(BUILD_SRC_DIR) $< -gen-instr-desc -o $@
43
Misha Brukmanf5885482004-08-09 17:24:32 +000044$(TARGET)GenCodeEmitter.inc:: $(TDFILES) $(TBLGEN)
45 @echo "Building $(TARGET).td code emitter"
46 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-emitter -o $@
47
Nate Begeman14d89d62004-08-14 22:06:38 +000048$(TARGET)GenAsmWriter.inc:: $(TDFILES) $(TBLGEN)
49 @echo "Building $(TARGET).td assembly writer with tblgen"
50 $(VERB) $(TBLGEN) -I $(SourceDir) $< -gen-asm-writer -o $@
51
Misha Brukman5dfe3a92004-06-21 16:55:25 +000052clean::
53 $(VERB) rm -f *.inc