--- Makefile.orig 2025-03-15 17:43:45 UTC +++ Makefile @@ -130,7 +130,7 @@ lib/libtinycbor.a: $(TINYCBOR_SOURCES:.c=.o) @$(MKDIR) -p lib $(AR) cqs $@ $^ -lib/libtinycbor.so: $(TINYCBOR_SOURCES:.c=.pic.o) +lib/libtinycbor.so: $(TINYCBOR_SOURCES:.c=.o) @$(MKDIR) -p lib $(CC) -shared -Wl,-soname,libtinycbor.so.$(SOVERSION) -o lib/libtinycbor.so.$(VERSION) $(LDFLAGS) $^ $(LDLIBS) cd lib ; ln -sf libtinycbor.so.$(VERSION) libtinycbor.so ; ln -sf libtinycbor.so.$(VERSION) libtinycbor.so.$(SOVERSION) @@ -234,7 +234,7 @@ endif %.o: %.c @test -d $(@D) || $(MKDIR) $(@D) - $(CC) $(cflags) $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $< + $(CC) $(cflags) -fPIC $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $< %.pic.o: %.c @test -d $(@D) || $(MKDIR) $(@D) $(CC) $(cflags) -fPIC $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<