You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pngquant/pngquant-2.5.1_fix-Makefile...

61 lines
1.7 KiB

--- pngquant-2.4.0.1.orig/lib/Makefile 2015-04-11 23:24:38.000000000 +0100
+++ pngquant-2.4.0.1/lib/Makefile 2015-04-19 03:35:15.687199897 +0100
@@ -1,7 +1,8 @@
-include config.mk
STATICLIB=libimagequant.a
-SHAREDLIB=libimagequant.so.0
+SHAREDLIB=libimagequant.so
+SOVER=0
DLL=libimagequant.dll
DLLIMP=libimagequant_dll.a
@@ -36,7 +37,8 @@ $(SHAREDOBJS):
$(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
$(SHAREDLIB): $(SHAREDOBJS)
- $(CC) -shared -o $@ $^ $(LDFLAGS)
+ $(CC) -shared -Wl,-soname,$(SHAREDLIB).$(SOVER) -o $(SHAREDLIB).$(SOVER) $^ $(LDFLAGS)
+ ln -fs $(SHAREDLIB).$(SOVER) $(SHAREDLIB)
$(OBJS): $(wildcard *.h) config.mk
--- ./Makefile.orig 2015-08-03 00:05:09.000000000 +0100
+++ ./Makefile 2015-08-27 22:26:01.956610053 +0100
@@ -12,6 +12,7 @@ OBJS += $(COCOA_OBJS)
endif
STATICLIB = lib/libimagequant.a
+SHAREDLIB = lib/libimagequant.so
DISTFILES = *.[chm] pngquant.1 Makefile configure README.md INSTALL CHANGELOG COPYRIGHT
TARNAME = pngquant-$(VERSION)
@@ -32,12 +33,17 @@ staticlib:
$(STATICLIB): config.mk staticlib
+sharedlib:
+ $(MAKE) -C lib shared
+
+$(SHAREDLIB): config.mk sharedlib
+
$(OBJS): $(wildcard *.h) config.mk
rwpng_cocoa.o: rwpng_cocoa.m
$(CC) -Wno-enum-conversion -c $(CFLAGS) -o $@ $< &> /dev/null || clang -Wno-enum-conversion -c -O3 $(CFLAGS) -o $@ $<
-$(BIN): $(OBJS) $(STATICLIB)
+$(BIN): $(OBJS) $(SHAREDLIB)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
$(TESTBIN): test/test.o $(STATICLIB)
@@ -68,7 +74,7 @@ uninstall:
clean:
$(MAKE) -C lib clean
- rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(STATICLIB) $(TARFILE)
+ rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(STATICLIB) $(SHAREDLIB) $(TARFILE)
distclean: clean
$(MAKE) -C lib distclean