mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-30 13:38:17 +01:00
ca6748f430
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
101 lines
1.7 KiB
Plaintext
101 lines
1.7 KiB
Plaintext
#
|
|
# $Id: //poco/1.4/build/rules/sample#1 $
|
|
#
|
|
# sample
|
|
#
|
|
# Global build configuration for samples
|
|
#
|
|
# Environment variables:
|
|
# POCO_BASE: Path to POCO source tree.
|
|
# POCO_CONFIG: Build configuration to use.
|
|
# Defaults to `uname`.
|
|
#
|
|
|
|
#
|
|
# Check for POCO_BASE
|
|
#
|
|
ifndef POCO_BASE
|
|
$(error POCO_BASE is not defined.)
|
|
endif
|
|
|
|
#
|
|
# Determine OS
|
|
#
|
|
POCO_HOST_OSNAME = $(shell uname)
|
|
|
|
#
|
|
# If POCO_CONFIG is not set, use the OS name as configuration name
|
|
#
|
|
ifndef POCO_CONFIG
|
|
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
|
endif
|
|
|
|
#
|
|
# Include System Specific Settings
|
|
#
|
|
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
|
|
|
#
|
|
# Define standard directories
|
|
#
|
|
SRCDIR = src
|
|
INCDIR = include
|
|
LIBDIR = lib
|
|
BINDIR = bin
|
|
OBJDIR = obj
|
|
DEPDIR = .dep
|
|
INCPATH = $(POCO_BASE)/$(INCDIR)
|
|
LIBPATH = $(POCO_BASE)/$(LIBDIR)
|
|
BINPATH = $(BINDIR)
|
|
OBJPATH = $(OBJDIR)
|
|
DEPPATH = $(DEPDIR)
|
|
|
|
#
|
|
# Determine link mode
|
|
#
|
|
ifndef LINKMODE
|
|
LINKMODE = BOTH
|
|
endif
|
|
|
|
ifeq ($(LINKMODE),SHARED)
|
|
DEFAULT_TARGET = all_shared
|
|
endif
|
|
ifeq ($(LINKMODE),STATIC)
|
|
DEFAULT_TARGET = all_static
|
|
endif
|
|
ifeq ($(LINKMODE),BOTH)
|
|
DEFAULT_TARGET = all_static all_shared
|
|
endif
|
|
|
|
#
|
|
# Compose compiler flags
|
|
#
|
|
COMMONFLAGS = $(POCO_FLAGS)
|
|
CFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
|
|
CXXFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
|
|
LINKFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
|
|
|
|
#
|
|
# Compose object file path
|
|
#
|
|
OBJPATH_RELEASE_STATIC = $(OBJPATH)/release_static
|
|
OBJPATH_DEBUG_STATIC = $(OBJPATH)/debug_static
|
|
OBJPATH_RELEASE_SHARED = $(OBJPATH)/release_shared
|
|
OBJPATH_DEBUG_SHARED = $(OBJPATH)/debug_shared
|
|
|
|
#
|
|
# Build Include directory List
|
|
#
|
|
INCLUDE = -Iinclude -I$(INCPATH)
|
|
|
|
#
|
|
# Build Library Directory List
|
|
#
|
|
LIBRARY = -L$(LIBPATH)
|
|
|
|
#
|
|
# Make CC and CXX environment vars
|
|
#
|
|
export CC
|
|
export CXX
|