mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-26 10:21:08 +01:00
75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
|
#
|
||
|
# $Id: //poco/1.1.0/build/rules/compile#1 $
|
||
|
#
|
||
|
# compiile
|
||
|
#
|
||
|
# Compile rule definitions for makefiles
|
||
|
#
|
||
|
|
||
|
#
|
||
|
# Targets
|
||
|
#
|
||
|
all: $(DEFAULT_TARGET)
|
||
|
all_static: static_debug static_release
|
||
|
all_shared: shared_debug shared_release
|
||
|
all_debug: static_debug shared_debug
|
||
|
all_release: static_release shared_release
|
||
|
|
||
|
#
|
||
|
# Create directories if necessary
|
||
|
#
|
||
|
dirs: $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OBJPATH_DEBUG_SHARED) $(LIBPATH) $(BINPATH)
|
||
|
|
||
|
$(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OBJPATH_DEBUG_SHARED) $(LIBPATH) $(BINPATH):
|
||
|
$(MKDIR) $@
|
||
|
|
||
|
#
|
||
|
# Rules for compiling
|
||
|
#
|
||
|
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(debug)"
|
||
|
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(release)"
|
||
|
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(debug)"
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(release)"
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(debug, shared)"
|
||
|
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(release, shared)"
|
||
|
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(debug, shared)"
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
|
||
|
|
||
|
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d
|
||
|
@echo "** Compiling" $< "(release, shared)"
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
|
||
|
|
||
|
#
|
||
|
# Rules for creating dependency information
|
||
|
#
|
||
|
$(DEPPATH)/%.d: $(SRCDIR)/%.cpp
|
||
|
@echo "** Creating dependency info for" $^
|
||
|
$(MKDIR) $(DEPPATH)
|
||
|
$(DEP) $(SRCDIR)/$(patsubst %.d,%.cpp,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CXXFLAGS)
|
||
|
|
||
|
$(DEPPATH)/%.d: $(SRCDIR)/%.c
|
||
|
@echo "** Creating dependency info for" $^
|
||
|
$(MKDIR) $(DEPPATH)
|
||
|
$(DEP) $(SRCDIR)/$(patsubst %.d,%.c,$(notdir $@)) $@ $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_SHARED) $(OBJPATH_RELEASE_SHARED) $(INCLUDE) $(CFLAGS)
|
||
|
|
||
|
depend: $(addprefix $(DEPPATH)/,$(addsuffix .d,$(objects)))
|