Files
epics-base/configure/os/CONFIG.darwinCommon.darwinCommon
Andrew Johnson 97490f6977 Reworking of DLL build rules.
Allows static libraries and DLLs to be built without having
to do a 'make clean' in between on Cygwin and MinGW targets.
The Cygwin build still crashes when SHARED_LIBRARIES = YES
though, loading Com.dll seems to cause the problem.
2012-07-27 16:24:39 -05:00

103 lines
2.5 KiB
Plaintext

# CONFIG.darwinCommon.darwinCommon
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Common definitions for darwin builds
# Sites may override these definitions in CONFIG_SITE.darwinCommon.darwinCommon
#-------------------------------------------------------
# Include definitions common to all Unix targets
include $(CONFIG)/os/CONFIG.Common.UnixCommon
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
#
# Set OS-specific information
#
OS_CLASS = Darwin
#
# Build architecture flags
# For Darwin, ARCH_CLASS may be empty, or may contain a list of CPU
# architectures which must be valid arguments to the -arch options
# for the cc and ld commands.
# ARCH_CLASS is defined in a CONFIG_SITE file which is not loaded
# until after this file.
#
ARCH_DEP_FLAGS = $(addprefix -arch ,$(ARCH_CLASS))
ARCH_DEP_CFLAGS += $(ARCH_DEP_FLAGS)
ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#
# Special flags for Darwin
# No common blocks (as required when using shared libraries)
#
OP_SYS_CFLAGS += -fno-common
#
# Darwin os definition
#
OP_SYS_CPPFLAGS += -Ddarwin
#
# Always compile in debugging symbol table information
#
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#
# Libraries for command-line editing.
#
LDLIBS_READLINE = -lreadline
#
# Command-line input support
#
COMMANDLINE_LIBRARY=READLINE
GNU_DIR = /usr
CC = $(GNU_BIN)/cc
CCC = $(GNU_BIN)/c++
#
# Darwin shared libraries
#
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress
#
# Position-independent code is the default on Darwin.
#
CODE_CFLAGS =
CODE_CXXFLAGS =
#
# Add support for Objective-C source
#
vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS)
%.o: %.m
$(COMPILE.c) -c $<
#
# Header dependency file generation
#
# Use compiler when ARCH_CLASS is a single arch value
# otherwise use perl script command
SINGLE_ARCH=$(filter 1,$(words $(ARCH_CLASS)))
HDEPENDS_METHOD = $(if $(SINGLE_ARCH),COMP,MKMF)
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.darwinCommon.darwinCommon
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).darwinCommon