forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.conf
More file actions
155 lines (118 loc) · 4.31 KB
/
Makefile.conf
File metadata and controls
155 lines (118 loc) · 4.31 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# FOSSology Makefile configuration
# Copyright (C) 2009-2014 Hewlett-Packard Development Company, L.P.
#
# This file contains the default values for variables used in the
# Makefiles and other locations in the source tree.
# If you want different values, you can override them on
# the make command line. For example
# 'make VERSION=0.8.0.beta3 all'
# changing them here is probably a bad idea, try to use the above
#####################################################################
# Project info
#####################################################################
# the name of our project
PROJECT=fossology
# user for the project
PROJECTUSER=fossy
# group for the project
PROJECTGROUP=$(PROJECTUSER)
#####################################################################
# Install paths
#####################################################################
# pseudoroot for packaging purposes
DESTDIR=
# base of the program data tree
PREFIX=/usr/local
# executable programs that users run
BINDIR=$(PREFIX)/bin
# executable programs that sysadmins run
SBINDIR=$(PREFIX)/sbin
# config files
SYSCONFDIR=$(PREFIX)/etc/$(PROJECT)
# init script root dir
INITDIR=/etc
# object code libraries
LIBDIR=$(PREFIX)/lib
# header files
INCLUDEDIR=$(PREFIX)/include
# executables/libraries that only our project uses
LIBEXECDIR=$(PREFIX)/lib/$(PROJECT)
# non-arch-specific data
DATAROOTDIR=$(PREFIX)/share
# non-arch-dependent program data
MODDIR=$(DATAROOTDIR)/$(PROJECT)
# hardcoded repository location
REPODIR=/srv/$(PROJECT)/repository
# local state
LOCALSTATEDIR=/var/local
# project local state
PROJECTSTATEDIR=$(LOCALSTATEDIR)/lib/$(PROJECT)
# cache dir
CACHEDIR = $(LOCALSTATEDIR)/cache/$(PROJECT)
# project logdir
LOGDIR=/var/log/$(PROJECT)
# man pages
MANDIR=$(DATAROOTDIR)/man
# Man pages in *roff format, man 1
MAN1DIR=$(MANDIR)/man1
# project documentation
DOCDIR=$(DATAROOTDIR)/doc/$(PROJECT)
# webroot
WEBDIR=$(MODDIR)/www
# php root
PHPDIR=$(MODDIR)/php
#####################################################################
# Build variables
#####################################################################
SHELL = /bin/sh
CC=gcc
INSTALL = /usr/bin/install -D
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = ${INSTALL} -m 644
# these are the default cflags, recommended but not fully _required_
# if a user sets CFLAGS they get what they set it to and lose any they
# didn't include, which is the expected behavior
#CFLAGS=-O2 -Wall
CFLAGS=-g -O2 -Wall -D_FILE_OFFSET_BITS=64
COV_CFLAGS = -fprofile-arcs -ftest-coverage
# agent library
# $TOP is set in each Makefile in order to make these work
FOSRCDIR = $(TOP)/src
FOLIBDIR = $(FOSRCDIR)/lib/c
FOLIB = $(FOLIBDIR)/libfossology.a
FO_CFLAGS = -I$(PG_CFLAGS) $(GLIB_CFLAGS) -I$(FOLIBDIR)
FO_LDFLAGS = -lfossology $(GLIB_LIBS) -L$(FOLIBDIR) -lpq
PG_CFLAGS := $(shell pg_config --includedir)
GLIB_CFLAGS := $(shell pkg-config --cflags glib-2.0)
GLIB_LIBS := $(shell pkg-config --libs glib-2.0)
export PATH := $(TOP)/src/vendor/bin:$(PATH)
# these are the required flags we don't want to go away if the user sets
# CFLAGS. note we _post_fix the existing CFLAGS in case the user wants to
# override stuff (GCS 7.2.3)
ALL_CFLAGS=$(CFLAGS) $(FO_LDFLAGS) $(FO_CFLAGS)
# directory containing the php iPATHFILE include file
FOWWWDIR=$(FOSRCDIR)/www/ui
# for use when coverage C code
FLAG_COV=-fprofile-arcs -ftest-coverage
WriteVERSIONFile = echo "writing VERSION file for $(1)"; \
{\
echo "[$(1)]";\
echo "VERSION=`cat $(TOP)/VERSIONSTRING`";\
echo "SVN_REV=`git show > /dev/null 2>&1 && git show | head -1 | awk '{print substr($$2,1,6)}' || echo "unknown"`";\
echo BUILD_DATE=`date +"%Y/%m/%d %R %Z"`;\
git show -s --format="%ct.%h" 2>/dev/null | {\
IFS='.' read ctimestamp chash && {\
echo "COMMIT_DATE=$$(date -d"@$$ctimestamp" +"%Y/%m/%d %R %Z" )";\
echo "COMMIT_HASH=$$chash";\
} || {\
echo "COMMIT_DATE=unknown";\
echo "COMMIT_HASH=unknown";\
}\
}\
} > VERSION
# define VERSION and SVN_REV
VERSION=`cat $(TOP)/VERSIONSTRING`
SVN_REV=`git show > /dev/null 2>&1 && git show | head -1 | awk '{print substr($$2,1,6)}' || echo "unknown"`
DEFS=-DVERSION_S=\"$(VERSION)\" -DSVN_REV_S=\"$(SVN_REV)\"
# TWIG_CACHE = <parameter key=\"cache\" type=\"constant\">false</parameter>
TWIG_CACHE = <parameter key=\"cache\" type=\"string\">$(CACHEDIR)</parameter>