File: Make.defaults

package info (click to toggle)
efivar 30-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 792 kB
  • ctags: 1,156
  • sloc: ansic: 8,414; makefile: 207; asm: 31
file content (40 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download
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
prefix	?= /usr/
libdir	?= $(prefix)/lib64/
datadir	?= $(prefix)/share/
mandir	?= $(datadir)/man/
includedir ?= $(prefix)/include/
bindir	?= $(prefix)/bin/
PCDIR	?= $(libdir)/pkgconfig/
DESTDIR	?=

INSTALL ?= install
CROSS_COMPILE	?=
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
CC	:= $(if $(filter default,$(origin CC)),$(CROSS_COMPILE)gcc,$(CC))
CCLD	:= $(if $(filter undefined,$(origin CCLD)),$(CC),$(CCLD))
OPTIMIZE ?= -O2 -flto
CFLAGS	?= $(OPTIMIZE) -g3
CFLAGS	:= $(CFLAGS)
LDFLAGS ?=
LDFLAGS := $(LDFLAGS)
AR	:= $(CROSS_COMPILE)gcc-ar
NM	:= $(CROSS_COMPILE)gcc-nm
RANLIB	:= $(CROSS_COMPILE)gcc-ranlib

PKGS	=

clang_cflags = -D_GNU_SOURCE
gcc_cflags = -specs=$(TOPDIR)/gcc.specs
cflags	= $(CFLAGS) -I${TOPDIR}/src/include/efivar/ \
	$(if $(findstring clang,$(CC)),$(clang_cflags),) \
	$(if $(findstring gcc,$(CC)),$(gcc_cflags),) \
	$(call pkg-config-cflags)
clang_ccldflags =
gcc_ccldflags =
ccldflags = $(cflags) -L. $(CCLDFLAGS) $(LDFLAGS) \
	-Wl,-z,muldefs \
	$(if $(findstring clang,$(CCLD)),$(clang_ccldflags),) \
	$(if $(findstring gcc,$(CCLD)),$(gcc_ccldflags),) \
	$(call pkg-config-ccldflags)
SOFLAGS=-shared
LDLIBS=$(foreach lib,$(LIBS),-l$(lib)) $(call pkg-config-ldlibs)