3 include $(TOP)/configs/current
5 include Makefile.sources
9 LIBRARY_INCLUDES = -I$(TOP)/include
11 TBLGEN = $(LLVM_BINDIR)/llvm-tblgen
13 CXXFLAGS+= $(LLVM_CXXFLAGS)
15 include ../../Makefile.template
17 CXXFLAGS := $(filter-out -DDEBUG, $(CXXFLAGS))
19 tablegen = $(TBLGEN) -I $(LLVM_INCLUDEDIR) $1 $2 -o $3
21 gen: $(GENERATED_SOURCES)
23 SIRegisterInfo.td: SIGenRegisterInfo.pl
26 SIRegisterGetHWRegNum.inc: SIGenRegisterInfo.pl
27 $(PERL) $^ $@ > /dev/null
29 R600ShaderPatterns.td: AMDGPUGenShaderPatterns.pl
32 R600RegisterInfo.td: R600GenRegisterInfo.pl
35 AMDGPUInstrEnums.td: AMDGPUGenInstrEnums.pl
38 AMDGPUInstrEnums.h.include: AMDGPUGenInstrEnums.pl
41 AMDGPUInstrEnums.include: AMDGPUGenInstrEnums.pl
45 AMDILGenRegisterInfo.inc: *.td
46 $(call tablegen, -gen-register-info, AMDIL.td, $@)
48 AMDILGenInstrInfo.inc: *.td
49 $(call tablegen, -gen-instr-info, AMDIL.td, $@)
51 AMDILGenAsmWriter.inc: *.td
52 $(call tablegen, -gen-asm-writer, AMDIL.td, $@)
54 AMDILGenDAGISel.inc: *.td
55 $(call tablegen, -gen-dag-isel, AMDIL.td, $@)
57 AMDILGenCallingConv.inc: *.td
58 $(call tablegen, -gen-callingconv, AMDIL.td, $@)
60 AMDILGenSubtargetInfo.inc: *.td
61 $(call tablegen, -gen-subtarget, AMDIL.td, $@)
63 AMDILGenEDInfo.inc: *.td
64 $(call tablegen, -gen-enhanced-disassembly-info, AMDIL.td, $@)
66 AMDILGenIntrinsics.inc: *.td
67 $(call tablegen, -gen-tgt-intrinsic, AMDIL.td, $@)
69 AMDILGenCodeEmitter.inc: *.td
70 $(call tablegen, -gen-emitter, AMDIL.td, $@)
72 LOADER_LIBS=$(shell llvm-config --libs bitreader asmparser)
73 loader: loader.o libradeon.a
74 gcc -o loader -L/usr/local/lib $(LDFLAGS) loader.o libradeon.a $(LLVM_LIBS) $(LOADER_LIBS) -lpthread -ldl -lstdc++ -lm
76 # FIXME: Remove when this driver is converted to automake.