1# $OpenBSD: Makefile,v 1.9 2024/02/08 20:28:54 miod Exp $
2
3LIB=	LLVMExecutionEngine
4NOPROFILE=
5
6CPPFLAGS+=	-I${LLVM_SRCS}/include/llvm/ExecutionEngine \
7		-I${LLVM_SRCS}/include/llvm/ExecutionEngine/JITLink \
8		-I${LLVM_SRCS}/include/llvm/ExecutionEngine/Orc \
9		-I${.OBJDIR}/../include/llvm/ExecutionEngine/JITLink
10
11# ExecutionEngine
12SRCS+=	ExecutionEngine.cpp \
13	ExecutionEngineBindings.cpp \
14	GDBRegistrationListener.cpp \
15	SectionMemoryManager.cpp \
16	TargetSelect.cpp
17
18# Interpreter
19SRCS+=	Execution.cpp \
20	ExternalFunctions.cpp \
21	Interpreter.cpp
22
23# JITLink
24SRCS+=	DWARFRecordSectionSplitter.cpp \
25	EHFrameSupport.cpp \
26	JITLink.cpp \
27	JITLinkGeneric.cpp \
28	JITLinkMemoryManager.cpp \
29	ExecutionEngineMachO.cpp \
30	MachO_arm64.cpp \
31	MachO_x86_64.cpp \
32	MachOLinkGraphBuilder.cpp \
33	ExecutionEngineELF.cpp \
34	ELFLinkGraphBuilder.cpp \
35	ELF_aarch64.cpp \
36	ELF_i386.cpp \
37	ELF_loongarch.cpp \
38	ELF_riscv.cpp \
39	ELF_x86_64.cpp \
40	ExecutionEngineCOFF.cpp \
41	COFFDirectiveParser.cpp \
42	COFFLinkGraphBuilder.cpp \
43	COFF_x86_64.cpp \
44	aarch64.cpp \
45	i386.cpp \
46	loongarch.cpp \
47	riscv.cpp \
48	x86_64.cpp
49
50# MCJIT
51SRCS+=	MCJIT.cpp
52
53# OrcShared
54SRCS+=	AllocationActions.cpp \
55	OrcError.cpp \
56	OrcRTBridge.cpp \
57	SimpleRemoteEPCUtils.cpp
58
59# OrcTargetProcess
60SRCS+=	ExecutorSharedMemoryMapperService.cpp \
61	JITLoaderGDB.cpp \
62	OrcRTBootstrap.cpp \
63	RegisterEHFrames.cpp \
64	SimpleExecutorDylibManager.cpp \
65	SimpleExecutorMemoryManager.cpp \
66	SimpleRemoteEPCServer.cpp \
67	TargetExecutionUtils.cpp
68
69# Orc
70SRCS+=	COFFVCRuntimeSupport.cpp \
71	COFFPlatform.cpp \
72	CompileOnDemandLayer.cpp \
73	CompileUtils.cpp \
74	ExecutionEngineCore.cpp \
75	DebugObjectManagerPlugin.cpp \
76	DebuggerSupportPlugin.cpp \
77	DebugUtils.cpp \
78	EPCDynamicLibrarySearchGenerator.cpp \
79	EPCDebugObjectRegistrar.cpp \
80	EPCEHFrameRegistrar.cpp \
81	EPCGenericDylibManager.cpp \
82	EPCGenericJITLinkMemoryManager.cpp \
83	EPCGenericRTDyldMemoryManager.cpp \
84	EPCIndirectionUtils.cpp \
85	ExecutionUtils.cpp \
86	ObjectFileInterface.cpp \
87	IndirectionUtils.cpp \
88	IRCompileLayer.cpp \
89	IRTransformLayer.cpp \
90	JITTargetMachineBuilder.cpp \
91	LazyReexports.cpp \
92	Layer.cpp \
93	LookupAndRecordAddrs.cpp \
94	LLJIT.cpp \
95	MachOPlatform.cpp \
96	MapperJITLinkMemoryManager.cpp \
97	MemoryMapper.cpp \
98	ELFNixPlatform.cpp \
99	Mangling.cpp \
100	ObjectLinkingLayer.cpp \
101	ObjectTransformLayer.cpp \
102	OrcABISupport.cpp \
103	OrcV2CBindings.cpp \
104	RTDyldObjectLinkingLayer.cpp \
105	SimpleRemoteEPC.cpp \
106	Speculation.cpp \
107	SpeculateAnalyses.cpp \
108	ExecutorProcessControl.cpp \
109	TaskDispatch.cpp \
110	ThreadSafeModule.cpp
111
112# RuntimeDyld
113SRCS+=	JITSymbol.cpp \
114	RTDyldMemoryManager.cpp \
115	RuntimeDyld.cpp \
116	RuntimeDyldChecker.cpp \
117	RuntimeDyldCOFF.cpp \
118	RuntimeDyldELF.cpp \
119	RuntimeDyldMachO.cpp
120
121# RuntimeDyld/Targets
122SRCS+=	RuntimeDyldELFMips.cpp
123
124ExecutionEngineCOFF.cpp:
125	ln -s ${LLVM_SRCS}/lib/ExecutionEngine/JITLink/COFF.cpp $@
126
127ExecutionEngineCore.cpp:
128	ln -s ${LLVM_SRCS}/lib/ExecutionEngine/Orc/Core.cpp $@
129
130ExecutionEngineMachO.cpp:
131	ln -s ${LLVM_SRCS}/lib/ExecutionEngine/JITLink/MachO.cpp $@
132
133ExecutionEngineELF.cpp:
134	ln -s ${LLVM_SRCS}/lib/ExecutionEngine/JITLink/ELF.cpp $@
135
136.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine
137.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/Interpreter
138.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/JITLink
139.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/MCJIT
140.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/Orc
141.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/Orc/Shared
142.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/Orc/TargetProcess
143.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/RuntimeDyld
144.PATH:	${.CURDIR}/../../../llvm/llvm/lib/ExecutionEngine/RuntimeDyld/Targets
145
146CLEANFILES+= ExecutionEngineCOFF.cpp \
147	ExecutionEngineCore.cpp \
148	ExecutionEngineMachO.cpp \
149	ExecutionEngineELF.cpp
150