mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
For PR466:
Much of what this Makefile did to make a libcrtend.a file is now supported by Makefile.rules when BYTECODE_LIBRARY=1 is specified. So, we've simplified the make rules for building this library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a2f137765
commit
f5b709854f
@ -10,47 +10,30 @@
|
||||
# This directory contains the C and C++ runtime libraries for the LLVM GCC
|
||||
# front-ends. See the README.txt file for more details.
|
||||
#
|
||||
# Since this archive has strange requirements, we use almost all custom rules
|
||||
# for building it.
|
||||
# Since this archive has strange requirements, we use some custom rules for
|
||||
# building it.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
LEVEL = ../../..
|
||||
LEVEL=../../..
|
||||
DONT_BUILD_RELINKED=1
|
||||
BYTECODE_LIBRARY=1
|
||||
LIBRARYNAME=crtend
|
||||
|
||||
# Note: We're fooling Makefile.rules here. The sources listed don't exist but
|
||||
# it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of
|
||||
# object files to put in the library. Since we've specified BYTECODE_LIBRARY
|
||||
# above, it changes the .c suffix to .bc suffix. Below are rules to build
|
||||
# each of those bytecode objects from the sources we do have in this directory.
|
||||
SOURCES=comp_main.c comp_genericeh.c comp_sjljeh.c
|
||||
|
||||
EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
MainSrc := crtend.c listend.ll
|
||||
GenericEHSrc := Exception.cpp
|
||||
SJLJEHSrc := SJLJ-Exception.cpp
|
||||
Source := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) $(CXXEHSrc)
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
# CRTEND_A - The result of making 'all' - the final archive file.
|
||||
CRTEND_A = $(LibDir)/libcrtend.a
|
||||
all:: $(CRTEND_A)
|
||||
|
||||
# Installation simply requires copying the archive to it's new home.
|
||||
$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir)
|
||||
$(Echo) Installing $(CRTEND_A)
|
||||
$(Verb) $(INSTALL) $(CRTEND_A) $(bytecode_libdir)
|
||||
|
||||
install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
|
||||
install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a
|
||||
|
||||
clean-local::
|
||||
$(Verb)$(RM) -f $(CRTEND_A)
|
||||
|
||||
# The three components described in the README
|
||||
Components := main genericeh sjljeh
|
||||
ComponentLibs := $(Components:%=$(ObjDir)/comp_%.bc)
|
||||
|
||||
|
||||
# We build libcrtend.a from the four components described in the README.
|
||||
$(CRTEND_A) : $(ComponentLibs) $(LibDir)/.dir
|
||||
$(Echo) Building final libcrtend.a file from components
|
||||
$(Verb) $(LArchive) $@ $(ComponentLibs)
|
||||
|
||||
MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc
|
||||
GenericEHObj := $(ObjDir)/Exception.bc
|
||||
|
Loading…
Reference in New Issue
Block a user