File: Makefile.include

package info (click to toggle)
libstatgen 1.0.15-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,588 kB
  • sloc: cpp: 49,624; ansic: 1,408; makefile: 320; sh: 60
file content (75 lines) | stat: -rw-r--r-- 2,014 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.DEFAULT_GOAL := opt

# Determine the path to this Makefile
MAKEFILES_PATH := $(dir $(lastword $(MAKEFILE_LIST)))
MAKEFILES_PATH_TMP := $(patsubst %Makefiles/, %, $(MAKEFILES_PATH))
# The base lib path is one above this Makefile.
BASE_LIB_PATH := $(dir $(MAKEFILES_PATH_TMP))

# Path names that may be needed.
DIR_PARTS := $(subst /, , $(CURDIR))
DIR_NAME := $(word $(words $(DIR_PARTS)), $(DIR_PARTS))
VERSION ?= 1.0.0

# Define the paths/names of the Stagen Libraries
STAT_GEN_LIB = $(STAT_GEN_LIB_OPT)
STAT_GEN_LIB_OPT = $(BASE_LIB_PATH)libStatGen.a
STAT_GEN_LIB_DEBUG = $(BASE_LIB_PATH)libStatGen_debug.a
STAT_GEN_LIB_PROFILE = $(BASE_LIB_PATH)libStatGen_profile.a

# Currently only the statgen library is required.
REQ_LIBS_OPT ?= $(STAT_GEN_LIB)
REQ_LIBS_DEBUG ?= $(STAT_GEN_LIB_DEBUG)
REQ_LIBS_PROFILE ?= $(STAT_GEN_LIB_PROFILE)

INCLUDE_PATH = $(BASE_LIB_PATH)include

include $(MAKEFILES_PATH)Makefile.toolchain

# -fno-ftti is sometimes useful to increase speed
# 2-5%, but makes linking consistently more difficult
OPTFLAG_OPT?=-O4 -fPIC
OPTFLAG_DEBUG?=-ggdb -O0
OPTFLAG_PROFILE?=-pg

# User specific variables listed here.
# USER_INCLUDES =
# USER_COMPILE_VARS = 
# USER_WARNINGS =

# If you don't wnat to include the current directory, set in your Makefile:
# CURRENT_DIR_INCLUDE=
CURRENT_DIR_INCLUDE?=-I.

ZLIB_AVAIL ?= 1

USE_ZLIB = -D__ZLIB_AVAILABLE__
ZLIB_LIB = -lz
ifeq ($(ZLIB_AVAIL), 0)
  USE_ZLIB = 
  ZLIB_LIB = 
endif

KNET_ON ?= 0

USE_KNET ?= 
ifeq ($(KNET_ON), 1)
  USE_KNET = -D_USE_KNETFILE
endif

CXX11_AVAIL ?= 1

CPP0X=$(shell if [ X$(CCVERSION) \> X4.3.0 ] ; then echo " -std=gnu++0x" ; fi)

ifeq ($(CXX11_AVAIL), 0)
CPP0X=
endif

REQ_SETTINGS = 

UPSTREAMCFLAGS ?= $(OPTFLAG) -pipe -Wall $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)

COMPFLAGS = $(UPSTREAMCFLAGS) $(USER_WARNINGS) -I$(INCLUDE_PATH) $(CURRENT_DIR_INCLUDE) $(USER_INCLUDES) $(USE_KNET) $(USE_ZLIB) -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS $(USER_COMPILE_VARS)

# default installation directory
INSTALLDIR?=/usr/local/bin