Don't always build CBackend and Skeleton. Make use of the TARGETS_TO_BUILD
authorReid Spencer <rspencer@reidspencer.com>
Fri, 22 Apr 2005 17:32:05 +0000 (17:32 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 22 Apr 2005 17:32:05 +0000 (17:32 +0000)
parameter instead which will correctly list the set of targets to be built.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21451 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llc/Makefile

index 8eff3c161295857cde19da5055577594952fbe8d..c4af6d806a34d3a79354f5c715e5c4e1d75b0613 100644 (file)
@@ -15,8 +15,18 @@ TOOLNAME = llc
 # early so we can set up USEDLIBS properly before includeing Makefile.rules
 include $(LEVEL)/Makefile.config
 
-# We always build the C Backend and the Skeleton
-USEDLIBS := LLVMCBackend LLVMSkeleton
+# Initialize the USEDLIBS so we can add to it
+USEDLIBS :=
+
+# Check for LLVMCBackend  target
+ifneq ($(strip $(filter CBackend,$(TARGETS_TO_BUILD))),)
+USEDLIB += LLVMCBackend
+endif
+
+# Check for Skeleton target
+ifneq ($(strip $(filter Skeleton,$(TARGETS_TO_BUILD))),)
+USEDLIB += LLVMSkeleton
+endif
 
 # Check for Sparc target
 ifneq ($(strip $(filter SparcV8,$(TARGETS_TO_BUILD))),)