Debian Codegraph @

Makefiles/Makefile.include

raw ◀ ▶
1 Debian patch touch this file
1 .DEFAULT_GOAL := opt
2
3 # Determine the path to this Makefile
4 MAKEFILES_PATH := $(dir $(lastword $(MAKEFILE_LIST)))
5 MAKEFILES_PATH_TMP := $(patsubst %Makefiles/, %, $(MAKEFILES_PATH))
6 # The base lib path is one above this Makefile.
7 BASE_LIB_PATH := $(dir $(MAKEFILES_PATH_TMP))
8
9 # Path names that may be needed.
10 DIR_PARTS := $(subst /, , $(CURDIR))
11 DIR_NAME := $(word $(words $(DIR_PARTS)), $(DIR_PARTS))
12 VERSION ?= 1.0.0
13
14 # Define the paths/names of the Stagen Libraries
15 STAT_GEN_LIB = $(STAT_GEN_LIB_OPT)
16 STAT_GEN_LIB_OPT = $(BASE_LIB_PATH)libStatGen.a
17 STAT_GEN_LIB_DEBUG = $(BASE_LIB_PATH)libStatGen_debug.a
18 STAT_GEN_LIB_PROFILE = $(BASE_LIB_PATH)libStatGen_profile.a
19
20 # Currently only the statgen library is required.
21 REQ_LIBS_OPT ?= $(STAT_GEN_LIB)
22 REQ_LIBS_DEBUG ?= $(STAT_GEN_LIB_DEBUG)
23 REQ_LIBS_PROFILE ?= $(STAT_GEN_LIB_PROFILE)
24
25 INCLUDE_PATH = $(BASE_LIB_PATH)include
26
27 include $(MAKEFILES_PATH)Makefile.toolchain
28
29 # -fno-ftti is sometimes useful to increase speed
30 # 2-5%, but makes linking consistently more difficult
•31 OPTFLAG_OPT?=-O4 -fPIC
32 OPTFLAG_DEBUG?=-ggdb -O0
33 OPTFLAG_PROFILE?=-pg
34
35 # User specific variables listed here.
36 # USER_INCLUDES =
37 # USER_COMPILE_VARS =
38 # USER_WARNINGS =
39
40 # If you don't wnat to include the current directory, set in your Makefile:
41 # CURRENT_DIR_INCLUDE=
42 CURRENT_DIR_INCLUDE?=-I.
43
44 ZLIB_AVAIL ?= 1
45
46 USE_ZLIB = -D__ZLIB_AVAILABLE__
47 ZLIB_LIB = -lz
48 ifeq ($(ZLIB_AVAIL), 0)
49 USE_ZLIB =
50 ZLIB_LIB =
51 endif
52
53 KNET_ON ?= 0
54
55 USE_KNET ?=
56 ifeq ($(KNET_ON), 1)
57 USE_KNET = -D_USE_KNETFILE
58 endif
59
60 CXX11_AVAIL ?= 1
61
62 CPP0X=$(shell if [ X$(CCVERSION) \> X4.3.0 ] ; then echo " -std=gnu++0x" ; fi)
63
64 ifeq ($(CXX11_AVAIL), 0)
65 CPP0X=
66 endif
67
68 REQ_SETTINGS =
69
•70 UPSTREAMCFLAGS ?= $(OPTFLAG) -pipe -Wall $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
71
•72 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)
73
74 # default installation directory
75 INSTALLDIR?=/usr/local/bin