File: Variables.mk

package info (click to toggle)
fbi 2.10-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,780 kB
  • sloc: ansic: 22,994; sh: 120; perl: 12; makefile: 6
file content (60 lines) | stat: -rw-r--r-- 1,436 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
# common variables ...
########################################################################

# directories
DESTDIR	=
srcdir	?= .
prefix	?= /usr/local
bindir	=  $(DESTDIR)$(prefix)/bin
sbindir	=  $(DESTDIR)$(prefix)/sbin
libdir  =  $(DESTDIR)$(prefix)/$(LIB)
shrdir  =  $(DESTDIR)$(prefix)/share
mandir	=  $(shrdir)/man
locdir  =  $(shrdir)/locale
appdir  =  $(shrdir)/applications

# package + version
empty	:=
space	:= $(empty) $(empty)
ifneq ($(wildcard $(srcdir)/VERSION),)
  VERSION := $(shell cat $(srcdir)/VERSION)
else
  VERSION := 42
endif
RELTAG	:= v$(subst .,_,$(VERSION))

# programs
CC		?= gcc
CXX		?= g++
MOC             ?= $(if $(QTDIR),$(QTDIR)/bin/moc,moc)

STRIP		?= -s
INSTALL		?= install
INSTALL_BINARY  := $(INSTALL)
INSTALL_SCRIPT  := $(INSTALL)
INSTALL_DATA	:= $(INSTALL) -m 644
INSTALL_DIR	:= $(INSTALL) -d

# cflags
CFLAGS  	?= $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS	?= $(CFLAGS)
CFLAGS		+= -Wall -Wmissing-prototypes -Wstrict-prototypes \
		   -Wpointer-arith -Wunused
CXXFLAGS	+= -Wall -Wpointer-arith -Wunused
CFLAGS		+= $(shell dpkg-buildflags --get CPPFLAGS)

# add /usr/local to the search path if something is in there ...
ifneq ($(wildcard /usr/local/include/*.h),)
  CFLAGS  += -I/usr/local/include
  LDFLAGS += -L/usr/local/$(LIB)
endif

LDFLAGS 	?= $(shell dpkg-buildflags --get LDFLAGS)

# fixup include path for $(srcdir) != "."
ifneq ($(srcdir),.)
  CFLAGS  += -I. -I$(srcdir)
endif