Commit
ab6825b3e3fd04564b7840e945fa32b0a7b3c0c2 fixed an issue where the
architecture option -m32 wasn't being passed to the compiler when
linking .o files. This would only fix the issue with user's building
with the hacky --enable-32-bit. The right way to fix this is to pass
CFLAGS to the linker, which the GNU make builtin rules unfortunately
don't do.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Török Edwin <edwintorok@gmail.com>
# using : to avoid APP_CC pointing to CC loop
CC := $(APP_CC)
CFLAGS := -I$(INCDIR) $(CFLAGS)
-LDLIBS = $(LIBS) $(ARCH_FLAGS)
+LDLIBS = $(LIBS)
PROG_SOURCES = \
array.c \
$(PROGS): $(UTIL_OBJS)
+.o:
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
+
clean:
-rm -f $(PROGS)
-rm -f *.o *~