Skip to content

Commit

Permalink
Take CPPFLAGS and CXXFLAGS in account in Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
fdegros committed Sep 27, 2023
1 parent bae1cf6 commit a7e00a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PKG_CONFIG ?= pkg-config
DEPS = fuse libzip icu-uc icu-i18n
LIBS := -Llib -lfusezip $(shell $(PKG_CONFIG) --libs $(DEPS))
LIBS += -Llib -lfusezip
CXXFLAGS := $(shell $(PKG_CONFIG) --cflags $(DEPS))
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEPS))
CXXFLAGS += -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -pedantic -std=c++20
ifeq ($(DEBUG), 1)
CXXFLAGS += -O0 -g
Expand Down
4 changes: 2 additions & 2 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
DEST = libfusezip.a
PKG_CONFIG ?= pkg-config
DEPS = fuse libzip icu-uc icu-i18n
CXXFLAGS := $(shell $(PKG_CONFIG) --cflags $(DEPS))
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEPS))
CXXFLAGS += -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -pedantic -std=c++20
ifeq ($(DEBUG), 1)
CXXFLAGS += -O0 -g
Expand All @@ -38,7 +38,7 @@ $(DEST): $(OBJECTS)
$(AR) -cr $@ $(OBJECTS)

.cc.o:
$(CXX) -c $(CXXFLAGS) $< -o $@
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@

clean:
rm -f $(DEST) $(OBJECTS)
Expand Down

0 comments on commit a7e00a9

Please sign in to comment.