[lld] r210177 - Initial set of Makefiles

Iain Sandoe iain at codesourcery.com
Wed Jun 4 02:54:08 PDT 2014


Author: iains
Date: Wed Jun  4 04:54:07 2014
New Revision: 210177

URL: http://llvm.org/viewvc/llvm-project?rev=210177&view=rev
Log:
Initial set of Makefiles

This provides support for the autoconfing & make build style.
The format, style and implementation follows that used within the llvm and clang projects.

TODO: implement out-of-source documentation builds.


Added:
    lld/trunk/Makefile
    lld/trunk/include/Makefile
    lld/trunk/include/lld/Makefile
    lld/trunk/lib/Core/Makefile
    lld/trunk/lib/Driver/Makefile
    lld/trunk/lib/Makefile
    lld/trunk/lib/Passes/Makefile
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/Makefile
    lld/trunk/lib/ReaderWriter/ELF/Makefile
    lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile
    lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile
    lld/trunk/lib/ReaderWriter/ELF/X86/Makefile
    lld/trunk/lib/ReaderWriter/ELF/X86_64/Makefile
    lld/trunk/lib/ReaderWriter/MachO/Makefile
    lld/trunk/lib/ReaderWriter/Makefile
    lld/trunk/lib/ReaderWriter/Native/Makefile
    lld/trunk/lib/ReaderWriter/PECOFF/Makefile
    lld/trunk/lib/ReaderWriter/YAML/Makefile
    lld/trunk/test/Makefile
    lld/trunk/tools/Makefile
    lld/trunk/tools/lld/Makefile
    lld/trunk/unittests/CoreTests/Makefile
    lld/trunk/unittests/DriverTests/Makefile
    lld/trunk/unittests/Makefile
    lld/trunk/utils/Makefile
    lld/trunk/utils/linker-script-test/Makefile

Added: lld/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/Makefile (added)
+++ lld/trunk/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,86 @@
+##===- Makefile --------------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+# If LLD_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef LLD_LEVEL
+
+IS_TOP_LEVEL := 1
+LLD_LEVEL := .
+DIRS := include lib tools utils unittests
+
+PARALLEL_DIRS :=
+
+endif
+
+ifeq ($(MAKECMDGOALS),libs-only)
+  DIRS := $(filter-out tools docs, $(DIRS))
+  OPTIONAL_DIRS :=
+endif
+ifeq ($(BUILD_LLD_ONLY),YES)
+  DIRS := $(filter-out docs unittests, $(DIRS))
+  OPTIONAL_DIRS :=
+endif
+
+###
+# Common Makefile code, shared by all lld Makefiles.
+
+# Set LLVM source root level.
+LEVEL := $(LLD_LEVEL)/../..
+
+# Include LLVM common makefile.
+include $(LEVEL)/Makefile.common
+
+ifneq ($(ENABLE_DOCS),1)
+  DIRS := $(filter-out docs, $(DIRS))
+endif
+
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/include
+CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLD_LEVEL)/include
+
+###
+# lld Top Level specific stuff.
+
+ifeq ($(IS_TOP_LEVEL),1)
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+	$(Verb) for dir in test unittests; do \
+	  if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \
+	    $(MKDIR) $${dir}; \
+	    $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \
+	  fi \
+	done
+endif
+
+test::
+	@ $(MAKE) -C test
+
+report::
+	@ $(MAKE) -C test report
+
+clean::
+	@ $(MAKE) -C test clean
+
+libs-only: all
+
+tags::
+	$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
+	  grep -v /lib/Headers | grep -v /test/`
+
+cscope.files:
+	find tools lib include -name '*.cpp' \
+	                    -or -name '*.def' \
+	                    -or -name '*.td' \
+	                    -or -name '*.h' > cscope.files
+
+.PHONY: test report clean cscope.files
+
+endif

Added: lld/trunk/include/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/include/Makefile (added)
+++ lld/trunk/include/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,4 @@
+LLD_LEVEL := ..
+DIRS := lld
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/include/lld/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/include/lld/Makefile (added)
+++ lld/trunk/include/lld/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,44 @@
+LLD_LEVEL := ../..
+DIRS :=
+
+include $(LLD_LEVEL)/Makefile
+
+install-local::
+	$(Echo) Installing lld include files
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
+	$(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \
+	  cd $(PROJ_SRC_DIR)/.. && \
+	  for  hdr in `find lld -type f \
+	      '(' -name LICENSE.TXT \
+	       -o -name '*.def' \
+	       -o -name '*.h' \
+	       -o -name '*.inc' \
+	      ')' -print \
+              | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
+	    instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+	    if test \! -d "$$instdir" ; then \
+	      $(EchoCmd) Making install directory $$instdir ; \
+	      $(MKDIR) $$instdir ;\
+	    fi ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+	$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/lld/include/lld" ; then \
+	  cd $(PROJ_OBJ_ROOT)/tools/lld/include && \
+	  for hdr in `find lld -type f \
+	      '(' -name LICENSE.TXT \
+	       -o -name '*.def' \
+	       -o -name '*.h' \
+	       -o -name '*.inc' \
+	      ')' -print \
+            | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
+	    instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+	    if test \! -d "$$instdir" ; then \
+	      $(EchoCmd) Making install directory $$instdir ; \
+	      $(MKDIR) $$instdir ;\
+	    fi ; \
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+	  done ; \
+	fi
+endif

Added: lld/trunk/lib/Core/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/Core/Makefile (added)
+++ lld/trunk/lib/Core/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,13 @@
+##===- lld/lib/Core/Makefile ---------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+LIBRARYNAME := lldCore
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/Driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/Driver/Makefile (added)
+++ lld/trunk/lib/Driver/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,38 @@
+##===- lld/lib/Driver/Makefile ---------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+LIBRARYNAME := lldDriver
+
+BUILT_SOURCES = CoreOptions.inc UniversalDriverOptions.inc DarwinLdOptions.inc \
+                GnuLdOptions.inc WinLinkOptions.inc
+
+TABLEGEN_INC_FILES_COMMON = 1
+
+include $(LLD_LEVEL)/Makefile
+
+$(ObjDir)/CoreOptions.inc.tmp : CoreOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building LLD CoreOptions Option tables with tblgen"
+	$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+$(ObjDir)/UniversalDriverOptions.inc.tmp : UniversalDriverOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building LLD Universal Driver Options tables with tblgen"
+	$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+$(ObjDir)/DarwinLdOptions.inc.tmp : DarwinLdOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building LLD Darwin ld Option tables with tblgen"
+	$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+$(ObjDir)/GnuLdOptions.inc.tmp : GnuLdOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building LLD Gnu ld Option tables with tblgen"
+	$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+$(ObjDir)/WinLinkOptions.inc.tmp : WinLinkOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building LLD WinLinkOptions Option tables with tblgen"
+	$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<

Added: lld/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/Makefile (added)
+++ lld/trunk/lib/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,16 @@
+##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LLD_LEVEL := ..
+
+# ARCMigrate and Rewrite are always needed because of libclang.
+PARALLEL_DIRS = Core Driver Passes ReaderWriter
+
+include $(LLD_LEVEL)/../../Makefile.config
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/Passes/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/Passes/Makefile (added)
+++ lld/trunk/lib/Passes/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,13 @@
+##===- lld/lib/Passes/Makefile ---------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+LIBRARYNAME := lldPasses
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/Hexagon/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,16 @@
+##===- lld/lib/ReaderWriter/ELF/Hexagon/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../../..
+LIBRARYNAME := lldHexagonELFTarget
+USEDLIBS = lldCore.a
+
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF/Hexagon -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,21 @@
+##===- lld/lib/ReaderWriter/ELF/Makefile --------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../..
+LIBRARYNAME := lldELF
+USEDLIBS = lldHexagonELFTarget.a lldPPCELFTarget.a lldMipsELFTarget.a \
+           lldX86ELFTarget.a lldX86_64ELFTarget.a \
+           lldReaderWriter.a lldPasses.a
+
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+# these link against this lib
+PARALLEL_DIRS := Hexagon PPC X86 X86_64 Mips
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,15 @@
+##===- lld/lib/ReaderWriter/ELF/PPC/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../../..
+LIBRARYNAME := lldMipsELFTarget
+USEDLIBS = lldCore.a
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,15 @@
+##===- lld/lib/ReaderWriter/ELF/PPC/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../../..
+LIBRARYNAME := lldPPCELFTarget
+USEDLIBS = lldCore.a
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/X86/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/X86/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,15 @@
+##===- lld/lib/ReaderWriter/ELF/X86/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../../..
+LIBRARYNAME := lldX86ELFTarget
+USEDLIBS = lldCore.a
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/ELF/X86_64/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,15 @@
+##===- lld/lib/ReaderWriter/ELF/X86_64/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../../..
+LIBRARYNAME := lldX86_64ELFTarget
+USEDLIBS = lldCore.a
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/MachO/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/MachO/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,14 @@
+##===- lld/lib/ReaderWriter/MachO/Makefile --------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../..
+LIBRARYNAME := lldMachO
+USEDLIBS = lldReaderWriter.a lldCore.a
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,16 @@
+##===- lld/lib/ReaderWriter/Makefile ---------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+LIBRARYNAME := lldReaderWriter
+
+# these link against this lib
+PARALLEL_DIRS := ELF MachO Native PECOFF YAML
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/Native/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/Native/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,14 @@
+##===- lld/lib/ReaderWriter/Native/Makefile --------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../..
+LIBRARYNAME := lldNative
+USEDLIBS = lldReaderWriter.a lldCore.a
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/PECOFF/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/PECOFF/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,14 @@
+##===- lld/lib/ReaderWriter/PECOFF/Makefile --------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../..
+LIBRARYNAME := lldPECOFF
+USEDLIBS = lldReaderWriter.a lldCore.a
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/lib/ReaderWriter/YAML/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/Makefile (added)
+++ lld/trunk/lib/ReaderWriter/YAML/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,14 @@
+##===- lld/lib/ReaderWriter/YAML/Makefile --------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ../../..
+LIBRARYNAME := lldYAML
+USEDLIBS = lldReaderWriter.a lldCore.a
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/test/Makefile (added)
+++ lld/trunk/test/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,71 @@
+LLD_LEVEL := ..
+include $(LLD_LEVEL)/Makefile
+
+# Test in all immediate subdirectories if unset.
+ifdef TESTSUITE
+TESTDIRS := $(TESTSUITE:%=$(PROJ_SRC_DIR)/%)
+else
+TESTDIRS ?= $(PROJ_SRC_DIR)
+endif
+
+# 'lit' wants objdir paths, so it will pick up the lit.site.cfg.
+TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=$(PROJ_OBJ_DIR)%)
+
+# Allow EXTRA_TESTDIRS to provide additional test directories.
+TESTDIRS += $(EXTRA_TESTDIRS)
+
+ifndef TESTARGS
+ifdef VERBOSE
+TESTARGS = -v
+else
+TESTARGS = -s -v
+endif
+endif
+
+# Make sure any extra test suites can find the main site config.
+LIT_ARGS := --param lld_site_config=$(PROJ_OBJ_DIR)/lit.site.cfg
+
+ifdef VG
+  LIT_ARGS += "--vg"
+endif
+
+all:: lit.site.cfg Unit/lit.site.cfg
+	@ echo '--- Running lld tests for $(TARGET_TRIPLE) ---'
+	@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
+	  $(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
+
+FORCE:
+
+lit.site.cfg: FORCE
+	@echo "Making lld 'lit.site.cfg' file..."
+	@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
+	@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
+	@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
+	@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
+	@$(ECHOPATH) s=@LLD_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
+	@$(ECHOPATH) s=@LLD_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
+	@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
+	@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
+	@-rm -f lit.tmp
+
+Unit/lit.site.cfg: FORCE
+	@echo "Making lld 'Unit/lit.site.cfg' file..."
+	@$(MKDIR) $(dir $@)
+	@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
+	@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLD_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> unit.tmp
+	@$(ECHOPATH) s=@LLD_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> unit.tmp
+	@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> unit.tmp
+	@$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
+	@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
+	@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
+	@$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
+	@sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
+	@-rm -f unit.tmp
+
+clean::
+	@ find . -name Output | xargs rm -fr
+
+.PHONY: all report clean

Added: lld/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/tools/Makefile (added)
+++ lld/trunk/tools/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,17 @@
+##===- tools/Makefile --------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ..
+LEVEL := $(LLD_LEVEL)/../..
+
+include $(LLD_LEVEL)/../../Makefile.config
+
+DIRS := lld
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/tools/lld/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/tools/lld/Makefile (added)
+++ lld/trunk/tools/lld/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,28 @@
+##===------- lld/Makefile --------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===--------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+
+TOOLNAME = lld
+
+# No plugins, optimize startup time.
+TOOL_NO_EXPORTS = 1
+
+#include /Makefile.config
+LEVEL := $(LLD_LEVEL)/../..
+include $(LEVEL)/Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD)
+USEDLIBS = lldDriver.a \
+           lldELF.a lldMachO.a lldPasses.a lldPECOFF.a lldYAML.a \
+           lldReaderWriter.a lldCore.a lldNative.a \
+           lldHexagonELFTarget.a lldPPCELFTarget.a lldMipsELFTarget.a \
+           lldX86ELFTarget.a lldX86_64ELFTarget.a LLVMOption.a
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/unittests/CoreTests/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/CoreTests/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/unittests/CoreTests/Makefile (added)
+++ lld/trunk/unittests/CoreTests/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,14 @@
+##===- unittests/CoreTests/Makefile ----------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL = ../..
+TESTNAME = CoreTest
+USEDLIBS = gtest.a LLVMOption.a LLVMSupport.a
+
+include $(LLD_LEVEL)/unittests/Makefile

Added: lld/trunk/unittests/DriverTests/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/unittests/DriverTests/Makefile (added)
+++ lld/trunk/unittests/DriverTests/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,19 @@
+##===---- unittests/DriverTests/Makefile ----------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===---------------------------------------------------------------------===##
+
+LLD_LEVEL = ../..
+TESTNAME = DriverTests
+USEDLIBS = lldDriver.a \
+           lldELF.a lldMachO.a lldPasses.a lldPECOFF.a lldYAML.a \
+           lldReaderWriter.a lldCore.a lldNative.a \
+           lldHexagonELFTarget.a lldPPCELFTarget.a lldMipsELFTarget.a \
+           lldX86ELFTarget.a lldX86_64ELFTarget.a  LLVMLinker.a \
+           LLVMOption.a LLVMObject.a LLVMBitReader.a LLVMCore.a LLVMSupport.a
+
+include $(LLD_LEVEL)/unittests/Makefile

Added: lld/trunk/unittests/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/unittests/Makefile (added)
+++ lld/trunk/unittests/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,31 @@
+##===- unittests/Makefile ----------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+# If LLD_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef LLD_LEVEL
+
+IS_UNITTEST_LEVEL := 1
+LLD_LEVEL := ..
+
+PARALLEL_DIRS = CoreTests DriverTests
+
+include $(LLD_LEVEL)/../../Makefile.config
+
+endif  # LLD_LEVEL
+
+include $(LLD_LEVEL)/Makefile
+
+ifndef IS_UNITTEST_LEVEL
+
+MAKEFILE_UNITTEST_NO_INCLUDE_COMMON := 1
+include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
+
+endif  # IS_UNITTEST_LEVEL

Added: lld/trunk/utils/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/utils/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/utils/Makefile (added)
+++ lld/trunk/utils/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,17 @@
+##===- tools/Makefile --------------------------------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLD_LEVEL := ..
+LEVEL := $(LLD_LEVEL)/../..
+
+include $(LLD_LEVEL)/../../Makefile.config
+
+DIRS := linker-script-test
+
+include $(LLD_LEVEL)/Makefile

Added: lld/trunk/utils/linker-script-test/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/utils/linker-script-test/Makefile?rev=210177&view=auto
==============================================================================
--- lld/trunk/utils/linker-script-test/Makefile (added)
+++ lld/trunk/utils/linker-script-test/Makefile Wed Jun  4 04:54:07 2014
@@ -0,0 +1,24 @@
+##===-------------- linker-script-test/Makefile ----------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===--------------------------------------------------------------------===##
+
+LLD_LEVEL := ../..
+
+TOOLNAME = linker-script-test
+
+# No plugins, optimize startup time.
+TOOL_NO_EXPORTS = 1
+
+#include /Makefile.config
+LEVEL := $(LLD_LEVEL)/../..
+include $(LEVEL)/Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD)
+USEDLIBS = lldReaderWriter.a LLVMSupport.a
+
+include $(LLD_LEVEL)/Makefile





More information about the llvm-commits mailing list