summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-04 21:28:50 +0000
committerChris Lattner <sabre@nondot.org>2005-02-04 21:28:50 +0000
commitf60c170ea5df891cd2e7392f5dca1cc8dca9b83f (patch)
treedea38c0ed37ff3ad736cb03504fc5f03da39eba8 /llvm
parent076b9f450713b580f7ca6ff74aa457d3a58e63dd (diff)
downloadbcm5719-llvm-f60c170ea5df891cd2e7392f5dca1cc8dca9b83f.tar.gz
bcm5719-llvm-f60c170ea5df891cd2e7392f5dca1cc8dca9b83f.zip
Add support for .cc and .hpp files. Patch contributed by Vladimir Merzliakov!
llvm-svn: 20042
Diffstat (limited to 'llvm')
-rw-r--r--llvm/Makefile.rules35
1 files changed, 33 insertions, 2 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 90ae7e7abbf..d34e93ac123 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -41,7 +41,7 @@ VPATH=$(PROJ_SRC_DIR)
# Reset the list of suffixes we know how to build
#--------------------------------------------------------------------
.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)
#--------------------------------------------------------------------
@@ -910,6 +910,12 @@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
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)
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
$(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"; \
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)
$(Echo) "Compiling $*.c for $(BuildMode) build"
$(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
@@ -936,7 +948,7 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
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)
$(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"; \
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)
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
$(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)"
$(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)
$(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
$(LTCompile.C) $< -o $@
@@ -969,6 +991,10 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES)
$(Echo) "Compiling $*.cpp for $(BuildMode) build"
$(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)
$(Echo) "Compiling $*.c for $(BuildMode) build"
$(Compile.C) $< -o $@
@@ -978,6 +1004,10 @@ $(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(BUILT_SOURCES)
$(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
$(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)
$(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
$(BCCompile.C) $< -o $@
@@ -1142,6 +1172,7 @@ endif
# which they can be "generated." This allows make to ignore them and
# reproduce the dependency lists.
%.h:: ;
+%.hpp:: ;
# Define clean-local to clean the current directory. Note that this uses a
# very conservative approach ensuring that empty variables do not cause
OpenPOWER on IntegriCloud