forked from rhboot/efivar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Make.defaults
38 lines (35 loc) · 1.09 KB
/
Make.defaults
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
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))
CFLAGS ?= -O2 -g
CFLAGS := $(CFLAGS)
LDFLAGS ?=
LDFLAGS := $(LDFLAGS)
AR := $(CROSS_COMPILE)gcc-ar
NM := $(CROSS_COMPILE)gcc-nm
RANLIB := $(CROSS_COMPILE)gcc-ranlib
PKGS =
clang_cflags =
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) \
$(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)