summaryrefslogtreecommitdiff
path: root/devel/tinycbor/files/patch-Makefile
blob: 10725831cc63179c30d723be59743865eb217737 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 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 $@ $<