mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
c1e20acc68
gccld git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1842 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
# test/Libraries/Makefile.libs
|
|
#
|
|
# This makefile should be used by subdirectories, which are libraries that are
|
|
# to be compiled to llvm bytecode and linked together with a specified name.
|
|
#
|
|
# Variables to be defined before including this makefile:
|
|
#
|
|
# 1. LEVEL - Must be set as per normal semantics: The depth from the top of tree
|
|
# 2. LIBNAME - Name of library to link together. Forms lib<LIBNAME>.bc
|
|
#
|
|
|
|
DESTLIBDIR := $(LEVEL)/test/Libraries/Output
|
|
DESTLIBNAME := $(LEVEL)/test/Libraries/Output/lib$(LIBNAME).bc
|
|
|
|
all:: $(DESTLIBNAME)
|
|
|
|
include $(LEVEL)/test/Makefile.tests
|
|
|
|
# Figure out what object files we want to build...
|
|
LObjs := $(sort $(addsuffix .bc, $(basename $(Source))))
|
|
LObjects := $(addprefix Output/,$(LObjs))
|
|
|
|
.PRECIOUS: $(LObjects)
|
|
|
|
# Link the library, then perform postlink optimization...
|
|
$(DESTLIBNAME): $(DESTLIBDIR)/.dir $(LObjects)
|
|
$(LLINK) -f $(LObjects) | \
|
|
$(LOPT) -f -cleangcc -raise -constprop -dce -o $@
|
|
|
|
# Install target for libraries: Copy into the gcc install directory in chris's
|
|
# tree...
|
|
#
|
|
INSTALL_DIR := /home/vadve/lattner/cvs/gcc_install/lib/gcc-lib/llvm/3.1/
|
|
|
|
install:: $(DESTLIBNAME)
|
|
cp $(DESTLIBNAME) $(INSTALL_DIR)
|