Skip to content

Commit 6b39c2b

Browse files
committed
Pass architecture flags though single variable
1 parent a10d93a commit 6b39c2b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ $(call ensure_binary,$(PKG_CONFIG))
129129
override CFLAGS += -std=c++11 -Wall -Wextra -pedantic -O2 -g
130130

131131
ifeq ($(ARCH),i386)
132-
override CFLAGS += -m32
133-
override LFLAGS += -m32
132+
ARCH_FLAGS := -m32
134133
endif
135134

136135
DEFINES = -DFUSE_USE_VERSION=26
@@ -146,10 +145,10 @@ FUSE_CFLAGS := $(shell $(PKG_CONFIG) fuse --cflags)
146145
FUSE_LDFLAGS := $(shell $(PKG_CONFIG) fuse --libs)
147146

148147
%.o: %.cpp
149-
$(CXX) -c $< -o $@ $(CFLAGS) $(FUSE_CFLAGS) $(DEFINES)
148+
$(CXX) -c $< -o $@ $(CFLAGS) $(ARCH_FLAGS) $(FUSE_CFLAGS) $(DEFINES)
150149

151150
$(TARGET): sparsebundlefs.o
152-
$(CXX) $< -o $@ $(LFLAGS) $(FUSE_LDFLAGS)
151+
$(CXX) $< -o $@ $(LFLAGS) $(ARCH_FLAGS) $(FUSE_LDFLAGS)
153152

154153
SPARSEBUNDLEFS=$(abspath $(TARGET))
155154
export SPARSEBUNDLEFS

0 commit comments

Comments
 (0)