poco/build/rules/exec

61 lines
2.0 KiB
Plaintext
Raw Normal View History

2006-10-23 17:40:50 +02:00
#
2007-02-23 15:50:42 +01:00
# $Id: //poco/Main/build/rules/exec#9 $
2006-10-23 17:40:50 +02:00
#
# exec
#
# Rule definitions for building executables
#
#
# Target names
#
EXEC_RELEASE_STATIC = $(BINPATH)/$(target)$(OSARCH_POSTFIX)_s
EXEC_DEBUG_STATIC = $(BINPATH)/$(target)d$(OSARCH_POSTFIX)_s
EXEC_RELEASE_SHARED = $(BINPATH)/$(target)$(OSARCH_POSTFIX)
EXEC_DEBUG_SHARED = $(BINPATH)/$(target)d$(OSARCH_POSTFIX)
TARGET_LIBS_DEBUG = $(foreach l,$(target_libs),-l$(l)d$(OSARCH_POSTFIX))
TARGET_LIBS_RELEASE = $(foreach l,$(target_libs),-l$(l)$(OSARCH_POSTFIX))
#
# Include the compile rules
#
include $(POCO_BASE)/build/rules/compile
#
# Rules for creating an executable
#
clean:
$(RM) $(OBJPATH)
$(RM) $(EXEC_RELEASE_STATIC) $(EXEC_DEBUG_STATIC) $(EXEC_RELEASE_SHARED) $(EXEC_DEBUG_SHARED)
static_debug: bindirs $(EXEC_DEBUG_STATIC)
static_release: bindirs $(EXEC_RELEASE_STATIC)
shared_debug: bindirs $(EXEC_DEBUG_SHARED)
shared_release: bindirs $(EXEC_RELEASE_SHARED)
$(EXEC_DEBUG_STATIC): $(foreach o,$(objects),$(OBJPATH_DEBUG_STATIC)/$(o).o)
@echo "** Building executable (debug)" $@
$(LINK) $(LINKFLAGS) $(DEBUGOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
2006-12-22 11:07:47 +01:00
$(CPYDBG)
$(STRIPDBGCMD)
2006-10-23 17:40:50 +02:00
$(EXEC_RELEASE_STATIC): $(foreach o,$(objects),$(OBJPATH_RELEASE_STATIC)/$(o).o)
@echo "** Building executable (release)" $@
$(LINK) $(LINKFLAGS) $(RELEASEOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
2006-11-17 17:40:16 +01:00
$(STRIPCMD)
2006-10-23 17:40:50 +02:00
$(EXEC_DEBUG_SHARED): $(foreach o,$(objects),$(OBJPATH_DEBUG_SHARED)/$(o).o)
@echo "** Building shared executable (debug)" $@
$(LINK) $(LINKFLAGS) $(DEBUGOPT_LINK) $(SHAREDOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
$(EXEC_RELEASE_SHARED): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o)
@echo "** Building shared executable (release)" $@
$(LINK) $(LINKFLAGS) $(RELEASEOPT_LINK) $(SHAREDOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
2006-11-17 17:40:16 +01:00
$(STRIPCMD)
2006-10-23 17:40:50 +02:00
#
# Include the automatically generated dependency files
#
sinclude $(addprefix $(DEPPATH)/,$(addsuffix .d,$(objects)))