Skip to content

Commit 73ee68e

Browse files
carnilsimonpintarelli
authored andcommitted
Makefile: Allow to pass CPPFLAGS flags
While preparing squashfs-mount for Debian it was noticed that CPPFLAGS passed by dpkg-buildflags during the builds are not passed down. dpkg-buildflags in Debian at the point of writing, passes -Wdate-time -D_FORTIFY_SOURCE=2 Allow to pass own CPPFLAGS and fallback to the current behaviour if not set earlier. Link: https://qa.debian.org/bls/packages/s/squashfs-mount.html Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
1 parent a14e99d commit 73ee68e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ prefix = /usr/local
44
exec_prefix = $(prefix)
55
bindir = $(exec_prefix)/bin
66

7+
CPPFLAGS ?=
78
CFLAGS ?= -Os -Wall -Wpedantic -Wextra -Wformat-overflow -Werror-implicit-function-declaration
89
LDFLAGS ?= -Wl,--gc-sections,-s
910

@@ -16,7 +17,7 @@ RPMBUILD ?= rpmbuild
1617
all: squashfs-mount
1718

1819
%.o: %.c
19-
$(CC) $(CFLAGS) $(SQUASHFS_MOUNT_CFLAGS) -c -o $@ $<
20+
$(CC) $(CPPFLAGS) $(CFLAGS) $(SQUASHFS_MOUNT_CFLAGS) -c -o $@ $<
2021

2122
squashfs-mount.o: VERSION
2223

0 commit comments

Comments
 (0)