Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c72eaad7e9
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (65 sloc) 2.149 kb
# Here we should check for dependencies
# mkdir shall not fail, if the directory already exists.
MKDIR = mkdir -p ;
# Modify the main target dirs
SetConfigVar LOCATE_MAIN_TARGET : TOP src lib libsolcompat
: [ FDirName $(DISTRO_DIR) lib libsolcompat ] ;
SetConfigVar LOCATE_MAIN_TARGET : TOP src lib libavl
: [ FDirName $(DISTRO_DIR) lib libavl ] ;
SetConfigVar LOCATE_MAIN_TARGET : TOP src lib libnvpair
: [ FDirName $(DISTRO_DIR) lib libnvpair ] ;
SetConfigVar LOCATE_MAIN_TARGET : TOP src lib libuutil
: [ FDirName $(DISTRO_DIR) lib libuutil ] ;
SetConfigVar LOCATE_MAIN_TARGET : TOP src lib libumem
: [ FDirName $(DISTRO_DIR) lib libumem ] ;
rule SetUpSubDirBuildSettings {
# SetUpSubDirBuildSettings <dir> ;
#
# Sets up the compiler flags and sets the locations for the targets (objects,
# libraries and executables).
#
# <dir>: Parameters as passed to the SubDir rule, i.e. the name of the
# TOP variable and the subdir tokens.
#
local dir = $(1) ;
OBJECTS_DIR = [ FDirName $(DISTRO_DIR) objects ] ;
# This is how Solaris builds it. Plus, of course, Wfatal-errors.
CCFLAGS += -Wall
-Wno-unknown-pragmas
-Wno-missing-braces
-Wno-sign-compare
-Wno-parentheses
-Wno-uninitialized
-Wno-implicit-function-declaration
-Wno-unused
-Wno-trigraphs
-Wno-char-subscripts
-Wno-switch
-Wfatal-errors
-std=gnu99 ;
C++FLAGS += -Wall
-Wextra
-Wno-unused-parameter
-fno-strict-aliasing ;
if ($(NDEBUG)) {
OPTIM ?= -O2 -DNDEBUG=1 ;
} else {
OPTIM ?= ;
CCFLAGS += -ggdb ;
C++FLAGS += -ggdb ;
CCFLAGS += ;
C++FLAGS += ;
}
# setup objects location
local objdir = [ FDirName $(OBJECTS_DIR) $(dir[2-]) ] ;
SEARCH_SOURCE += $(objdir) ;
LOCATE_SOURCE = $(objdir) ;
LOCATE_TARGET = $(objdir) ;
# setup main targets location
LOCATE_MAIN_TARGET ?= [ FDirName $(DISTRO_DIR) ] ;
}
# The LOCATE_MAIN_TARGET variable shall be reset for each subdirectory.
AUTO_SET_UP_CONFIG_VARIABLES += LOCATE_MAIN_TARGET ;
# Add the rules setting up the build settings for a subdirectory to the
# rules invoked by SubDir.
SUBDIRRULES += SetUpSubDirBuildSettings ;
Jump to Line
Something went wrong with that request. Please try again.