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 HAVE_LLVM_INTRINSICS
= $(shell grep IntrinsicsR600.td
$(LLVM_INCLUDEDIR
)/llvm
/Intrinsics.td
)
23 gen
: $(GENERATED_SOURCES
)
25 SIRegisterInfo.td
: SIGenRegisterInfo.pl
28 SIRegisterGetHWRegNum.inc
: SIGenRegisterInfo.pl
29 $(PERL
) $^
$@
> /dev
/null
31 R600Intrinsics.td
: R600IntrinsicsNoOpenCL.td R600IntrinsicsOpenCL.td
32 ifeq ($(HAVE_LLVM_INTRINSICS
),)
33 cp R600IntrinsicsNoOpenCL.td R600Intrinsics.td
35 cp R600IntrinsicsOpenCL.td R600Intrinsics.td
38 R600RegisterInfo.td
: R600GenRegisterInfo.pl
41 AMDGPUInstrEnums.td
: AMDGPUGenInstrEnums.pl
44 AMDGPUInstrEnums.h.
include: AMDGPUGenInstrEnums.pl
47 AMDGPUInstrEnums.
include: AMDGPUGenInstrEnums.pl
51 AMDILGenRegisterInfo.inc
: *.td
52 $(call tablegen
, -gen-register-info
, AMDIL.td
, $@
)
54 AMDILGenInstrInfo.inc
: *.td
55 $(call tablegen
, -gen-instr-info
, AMDIL.td
, $@
)
57 AMDILGenAsmWriter.inc
: *.td
58 $(call tablegen
, -gen-asm-writer
, AMDIL.td
, $@
)
60 AMDILGenDAGISel.inc
: *.td
61 $(call tablegen
, -gen-dag-isel
, AMDIL.td
, $@
)
63 AMDILGenCallingConv.inc
: *.td
64 $(call tablegen
, -gen-callingconv
, AMDIL.td
, $@
)
66 AMDILGenSubtargetInfo.inc
: *.td
67 $(call tablegen
, -gen-subtarget
, AMDIL.td
, $@
)
69 AMDILGenEDInfo.inc
: *.td
70 $(call tablegen
, -gen-enhanced-disassembly-info
, AMDIL.td
, $@
)
72 AMDILGenIntrinsics.inc
: *.td
73 $(call tablegen
, -gen-tgt-intrinsic
, AMDIL.td
, $@
)
75 AMDILGenCodeEmitter.inc
: *.td
76 $(call tablegen
, -gen-emitter
, AMDIL.td
, $@
)
78 LOADER_LIBS
=$(shell llvm-config
--libs bitreader asmparser
)
79 loader
: loader.o libradeon.a
80 gcc
-o loader
-L
/usr
/local
/lib
$(LDFLAGS
) loader.o libradeon.a
$(LLVM_LIBS
) $(LOADER_LIBS
) -lpthread
-ldl
-lstdc
++ -lm
82 # FIXME: Remove when this driver is converted to automake.