mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-28 11:56:43 +01:00
77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
|
#
|
||
|
# $Id: //poco/1.1.0/build/rules/dylib#1 $
|
||
|
#
|
||
|
# dylib
|
||
|
#
|
||
|
# Rule definitions for building dynamically loadable shared libraries
|
||
|
#
|
||
|
|
||
|
#
|
||
|
# Target names
|
||
|
#
|
||
|
SHL_EXT = $(SHAREDLIBLINKEXT)
|
||
|
|
||
|
# Some systems (e.g. Mac OS X) make a difference between
|
||
|
# shared libraries (as used by the linker/loader) and
|
||
|
# dynamic libraries, as used for dynamically loadable modules.
|
||
|
# If no specific instructions for making dynamic libraries
|
||
|
# are given, use the instructions for making shared libraries.
|
||
|
|
||
|
ifndef DYLIB
|
||
|
DYLIB = $(SHLIB)
|
||
|
endif
|
||
|
|
||
|
DYLIB_DEBUG = $(BINPATH)/$(target)d$(OSARCH_POSTFIX)$(SHL_EXT)
|
||
|
DYLIB_RELEASE = $(BINPATH)/$(target)$(OSARCH_POSTFIX)$(SHL_EXT)
|
||
|
DYLIB_S_DEBUG = $(BINPATH)/$(target)d$(OSARCH_POSTFIX)_s$(SHL_EXT)
|
||
|
DYLIB_S_RELEASE = $(BINPATH)/$(target)$(OSARCH_POSTFIX)_s$(SHL_EXT)
|
||
|
|
||
|
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_BUILD)/rules/compile
|
||
|
|
||
|
#
|
||
|
# Rules for creating a dynamically loadable shared library
|
||
|
#
|
||
|
clean:
|
||
|
$(RM) $(OBJPATH)
|
||
|
$(RM) $(DYLIB_DEBUG) $(DYLIB_RELEASE) $(DYLIB_S_DEBUG) $(DYLIB_S_RELEASE)
|
||
|
|
||
|
forcelink:
|
||
|
$(RM) $(DYLIB_DEBUG) $(DYLIB_RELEASE) $(DYLIB_S_DEBUG) $(DYLIB_S_RELEASE)
|
||
|
|
||
|
ifeq ($(LINKMODE),BOTH)
|
||
|
static_debug: dirs $(DYLIB_S_DEBUG)
|
||
|
static_release: dirs $(DYLIB_S_RELEASE)
|
||
|
else
|
||
|
static_debug: dirs $(DYLIB_DEBUG)
|
||
|
static_release: dirs $(DYLIB_RELEASE)
|
||
|
endif
|
||
|
shared_debug: dirs $(DYLIB_DEBUG)
|
||
|
shared_release: dirs $(DYLIB_RELEASE)
|
||
|
|
||
|
$(DYLIB_DEBUG): $(foreach o,$(objects),$(OBJPATH_DEBUG_SHARED)/$(o).o)
|
||
|
@echo "** Building dynamic library (debug)" $@
|
||
|
$(DYLIB) $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
|
||
|
|
||
|
$(DYLIB_RELEASE): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o)
|
||
|
@echo "** Building dynamic library (release)" $@
|
||
|
$(DYLIB) $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
|
||
|
|
||
|
$(DYLIB_S_DEBUG): $(foreach o,$(objects),$(OBJPATH_DEBUG_SHARED)/$(o).o)
|
||
|
@echo "** Building dynamic library (debug)" $@
|
||
|
$(DYLIB) $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
|
||
|
|
||
|
$(DYLIB_S_RELEASE): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o)
|
||
|
@echo "** Building dynamic library (release)" $@
|
||
|
$(DYLIB) $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
|
||
|
|
||
|
#
|
||
|
# Include the automatically generated dependency files
|
||
|
#
|
||
|
sinclude $(addprefix $(DEPPATH)/,$(addsuffix .d,$(objects)))
|