mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-24 02:51:43 +01:00
build: Use proper user variables during build
To compile we need to use CPPFLAGS and CFLAGS, to link CFLAGS and LDFLAGS. Rename MK_CFLAGS to MK_CPPFLAGS as those are only relevant at compilation time. Reported-by: Eric Smith <eric@brouhaha.com>
This commit is contained in:
parent
51863b6cf9
commit
06a60a166a
13
Makefile
13
Makefile
@ -104,13 +104,18 @@ AR = ar
|
||||
CC = gcc
|
||||
CCLD = $(CC)
|
||||
|
||||
# Set default value for compilation
|
||||
# Set default values for user variables
|
||||
CPPFLAGS ?=
|
||||
CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
|
||||
LDFLAGS ?=
|
||||
|
||||
MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
|
||||
# Internal makefile variables
|
||||
MK_CPPFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
|
||||
MK_CFLAGS :=
|
||||
MK_LDFLAGS :=
|
||||
|
||||
COMPILE = $(CC) $(MK_CFLAGS) $(CFLAGS)
|
||||
LINK = $(CCLD)
|
||||
COMPILE = $(CC) $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CFLAGS) $(CFLAGS)
|
||||
LINK = $(CCLD) $(MK_CFLAGS) $(CFLAGS) $(MK_LDFLAGS) $(LDFLAGS)
|
||||
|
||||
prefix = /usr
|
||||
exec_prefix =
|
||||
|
Loading…
x
Reference in New Issue
Block a user