mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-07-07 21:49:00 +00:00
Add support for passing CPPFLAGS to Makefiles
This is required in order to add Hardening support. See https://wiki.debian.org/Hardening Earlier version of the patch by Thorsten Alteholz <debian@alteholz.de>
This commit is contained in:
parent
695402d288
commit
47ab75eb66
4 changed files with 9 additions and 8 deletions
6
Makefile
6
Makefile
|
@ -17,8 +17,8 @@ PREFIX ?= /usr/local
|
||||||
export PREFIX
|
export PREFIX
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS)
|
CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS)
|
||||||
$(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS)
|
CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
$(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
$(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||||
|
@ -29,7 +29,7 @@ clean:
|
||||||
$(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
$(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||||
|
|
||||||
cpp/src/vers.cpp:
|
cpp/src/vers.cpp:
|
||||||
$(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) cpp/src/vers.cpp
|
CPPFLAGS=$(CPPFLAGS) $(MAKE) -C $(top_srcdir)/cpp/build/ -$(MAKEFLAGS) cpp/src/vers.cpp
|
||||||
|
|
||||||
check: xmltest
|
check: xmltest
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ else
|
||||||
LDFLAGS += -shared -Wl,-soname,libopenzwave.so.$(VERSION)
|
LDFLAGS += -shared -Wl,-soname,libopenzwave.so.$(VERSION)
|
||||||
LIBS += -ludev
|
LIBS += -ludev
|
||||||
endif
|
endif
|
||||||
|
CFLAGS += $(CPPFLAGS)
|
||||||
|
|
||||||
#where to put the temporary library
|
#where to put the temporary library
|
||||||
LIBDIR ?= $(top_builddir)
|
LIBDIR ?= $(top_builddir)
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
.PHONY: default clean
|
.PHONY: default clean
|
||||||
|
|
||||||
|
|
||||||
DEBUG_CFLAGS := -Wall -Wno-format -ggdb -DDEBUG
|
DEBUG_CFLAGS := -Wall -Wno-format -ggdb -DDEBUG $(CPPFLAGS)
|
||||||
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3
|
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3 $(CPPFLAGS)
|
||||||
|
|
||||||
DEBUG_LDFLAGS := -g
|
DEBUG_LDFLAGS := -g
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ LD := g++
|
||||||
AR := ar rc
|
AR := ar rc
|
||||||
RANLIB := ranlib
|
RANLIB := ranlib
|
||||||
|
|
||||||
DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG
|
DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG $(CPPFLAGS)
|
||||||
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3
|
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3 $(CPPFLAGS)
|
||||||
|
|
||||||
LIBS :=
|
LIBS :=
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue