1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/vendor/POCO/build/rules/sample
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

99 lines
1.7 KiB
Plaintext

#
# 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$(OSARCH_POSTFIX)
OBJPATH_DEBUG_STATIC = $(OBJPATH)/debug_static$(OSARCH_POSTFIX)
OBJPATH_RELEASE_SHARED = $(OBJPATH)/release_shared$(OSARCH_POSTFIX)
OBJPATH_DEBUG_SHARED = $(OBJPATH)/debug_shared$(OSARCH_POSTFIX)
#
# 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