mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Add support for .cc and .hpp files. Patch contributed by Vladimir Merzliakov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -41,7 +41,7 @@ VPATH=$(PROJ_SRC_DIR)
|
|||||||
# Reset the list of suffixes we know how to build
|
# Reset the list of suffixes we know how to build
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a .bc .td .ps .dot
|
.SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot
|
||||||
.SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
|
.SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@@ -910,6 +910,12 @@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
|
then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
|
||||||
else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
|
else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
|
||||||
|
|
||||||
|
$(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
|
||||||
|
$(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ; \
|
||||||
|
then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
|
||||||
|
else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
|
||||||
|
|
||||||
$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
|
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
|
||||||
$(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
|
$(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
|
||||||
@@ -927,6 +933,12 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
|
then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
|
||||||
else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
|
else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
|
||||||
|
|
||||||
|
$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build"
|
||||||
|
$(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
|
||||||
|
then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
|
||||||
|
else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
|
||||||
|
|
||||||
$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build"
|
$(Echo) "Compiling $*.c for $(BuildMode) build"
|
||||||
$(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
|
$(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
|
||||||
@@ -936,7 +948,7 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# Create .bc files in the ObjDir directory from .cpp and .c files...
|
# Create .bc files in the ObjDir directory from .cpp .cc and .c files...
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
|
||||||
@@ -944,6 +956,12 @@ $(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
|||||||
then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
|
then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
|
||||||
else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
|
else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
|
||||||
|
|
||||||
|
$(ObjDir)/%.bc: %.cc $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
|
||||||
|
$(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" $< -o $@ ; \
|
||||||
|
then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
|
||||||
|
else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
|
||||||
|
|
||||||
$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
|
||||||
$(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" $< -o $@ ; \
|
$(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" $< -o $@ ; \
|
||||||
@@ -959,6 +977,10 @@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
$(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
|
$(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
|
||||||
$(LTCompile.CXX) $< -o $@
|
$(LTCompile.CXX) $< -o $@
|
||||||
|
|
||||||
|
$(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)"
|
||||||
|
$(LTCompile.CXX) $< -o $@
|
||||||
|
|
||||||
$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
|
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
|
||||||
$(LTCompile.C) $< -o $@
|
$(LTCompile.C) $< -o $@
|
||||||
@@ -969,6 +991,10 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
$(Echo) "Compiling $*.cpp for $(BuildMode) build"
|
$(Echo) "Compiling $*.cpp for $(BuildMode) build"
|
||||||
$(Compile.CXX) $< -o $@
|
$(Compile.CXX) $< -o $@
|
||||||
|
|
||||||
|
$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build"
|
||||||
|
$(Compile.CXX) $< -o $@
|
||||||
|
|
||||||
$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build"
|
$(Echo) "Compiling $*.c for $(BuildMode) build"
|
||||||
$(Compile.C) $< -o $@
|
$(Compile.C) $< -o $@
|
||||||
@@ -978,6 +1004,10 @@ $(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
|||||||
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
|
||||||
$(BCCompile.CXX) $< -o $@
|
$(BCCompile.CXX) $< -o $@
|
||||||
|
|
||||||
|
$(ObjDir)/%.bc: %.cc $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
||||||
|
$(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)"
|
||||||
|
$(BCCompile.CXX) $< -o $@
|
||||||
|
|
||||||
$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
|
||||||
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
|
||||||
$(BCCompile.C) $< -o $@
|
$(BCCompile.C) $< -o $@
|
||||||
@@ -1142,6 +1172,7 @@ endif
|
|||||||
# which they can be "generated." This allows make to ignore them and
|
# which they can be "generated." This allows make to ignore them and
|
||||||
# reproduce the dependency lists.
|
# reproduce the dependency lists.
|
||||||
%.h:: ;
|
%.h:: ;
|
||||||
|
%.hpp:: ;
|
||||||
|
|
||||||
# Define clean-local to clean the current directory. Note that this uses a
|
# Define clean-local to clean the current directory. Note that this uses a
|
||||||
# very conservative approach ensuring that empty variables do not cause
|
# very conservative approach ensuring that empty variables do not cause
|
||||||
|
Reference in New Issue
Block a user