It's good practice to include CPPFLAGS, CFLAGS and LDFLAGS in the
rules which invoke the linker. We already do this for the former two,
so do the same with LDFLAGS as well.
lopsubgen-stage1: $(lsg1_objs)
$(CC) -Wall -g $(lsg1_objs) -o $@
lopsubgen: $(lsg_objs)
- $(CC) -Wall -g -o $@ $(lsg_objs)
+ $(CC) -Wall -g $(LDFLAGS) -o $@ $(lsg_objs)
$(REALNAME): $(liblopsub_objs)
- $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) -o $@ $^
+ $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) \
+ $(LDFLAGS) -o $@ $^
liblopsub.a: $(liblopsub_objs)
$(AR) -rcs $@ $^