]> mj.ucw.cz Git - libucw.git/blobdiff - images/Makefile
Opt: Constify
[libucw.git] / images / Makefile
index be7fed3cc89933a7950dce0abd0a7e77665bd22f..d418f7553422e270b3da49f7f9ac41970b75234b 100644 (file)
@@ -15,9 +15,6 @@ else
 LIBIMAGES_DEPS=$(LIBUCW)
 endif
 
 LIBIMAGES_DEPS=$(LIBUCW)
 endif
 
-ifdef CONFIG_STATIC_PIC
-LIBIMAGES_DEPS+=$(o)/images/libucw-images$(LV)-pic.a
-endif
 ifdef CONFIG_INSTALL_API
 $(o)/images/libucw-images.pc: $(addprefix $(o)/images/libucw-images$(LV),.a .so)
 endif
 ifdef CONFIG_INSTALL_API
 $(o)/images/libucw-images.pc: $(addprefix $(o)/images/libucw-images$(LV),.a .so)
 endif
@@ -60,17 +57,16 @@ ifdef CONFIG_IMAGES_LIBMAGICK
 LIBIMAGES_MODS+=io-libmagick
 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
 LIBIMAGES_MODS+=io-libmagick
 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
-LIBIMAGES_LIBS+=$(MAGICK_LIBS)
-$(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS)
+LIBIMAGES_LIBS+=$(MAGICK_LIBS) -lpthread
+$(addprefix $(o)/images/io-libmagick,.o .oo): CFLAGS+=$(MAGICK_CPPFLAGS) -Wno-redundant-decls -Wno-undef
 endif
 
 PROGS+=$(LIBIMAGES_PROGS)
 CONFIGS+=$(LIBIMAGES_CONFIGS)
 
 $(o)/images/libucw-images$(LV).a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
 endif
 
 PROGS+=$(LIBIMAGES_PROGS)
 CONFIGS+=$(LIBIMAGES_CONFIGS)
 
 $(o)/images/libucw-images$(LV).a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
-$(o)/images/libucw-images$(LV)-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
 $(o)/images/libucw-images$(LV).so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(LIBIMAGES_DEPS)
 $(o)/images/libucw-images$(LV).so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(LIBIMAGES_DEPS)
-$(o)/images/libucw-images$(LV).so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
+$(o)/images/libucw-images$(LV).so: SONAME_SUFFIX=.0
 $(o)/images/libucw-images$(LV).so: LIBS+=$(LIBIMAGES_LIBS)
 $(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS)
 
 $(o)/images/libucw-images$(LV).so: LIBS+=$(LIBIMAGES_LIBS)
 $(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS)
 
@@ -81,10 +77,12 @@ $(o)/images/ucw-image-sim-test: $(o)/images/ucw-image-sim-test.o $(LIBIMAGES) $(
 
 TESTS+=$(o)/images/image-test.test
 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW)
 
 TESTS+=$(o)/images/image-test.test
 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW)
+$(o)/images/image-test: LIBS+=-lpthread
 $(o)/images/image-test.test: $(o)/images/image-test
 
 TESTS+=$(o)/images/color.test
 $(o)/images/color-t: $(LIBIMAGES) $(LIBUCW)
 $(o)/images/image-test.test: $(o)/images/image-test
 
 TESTS+=$(o)/images/color.test
 $(o)/images/color-t: $(LIBIMAGES) $(LIBUCW)
+$(o)/images/color-t: LIBS+=-lm
 $(o)/images/color.test: $(o)/images/color-t
 
 API_LIBS+=libucw-images
 $(o)/images/color.test: $(o)/images/color-t
 
 API_LIBS+=libucw-images
@@ -96,8 +94,8 @@ run/lib/pkgconfig/libucw-images.pc: $(o)/images/libucw-images.pc
 INSTALL_TARGETS+=install-libucw-images-lib
 install-libucw-images-lib:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
 INSTALL_TARGETS+=install-libucw-images-lib
 install-libucw-images-lib:
        install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
-       install -m 644 run/lib/libucw-images$(LV).so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so.$(UCW_ABI_VERSION)
-       ln -sf libucw-images$(LV).so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so.$(UCW_ABI_MAJOR)
+       install -m 644 run/lib/libucw-images$(LV).so.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so.0.0
+       ln -sf libucw-images$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so.0
 .PHONY: install-libucw-images-lib
 
 INSTALL_TARGETS+=install-libucw-images-api
 .PHONY: install-libucw-images-lib
 
 INSTALL_TARGETS+=install-libucw-images-api
@@ -105,7 +103,7 @@ install-libucw-images-api:
        install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR))
        install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images
        install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
        install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR))
        install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images
        install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
-       ln -sf libucw-images$(LV).so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so
+       ln -sf libucw-images$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images$(LV).so
        install -m 644 run/lib/libucw-images$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
 .PHONY: install-libucw-images-api
 
        install -m 644 run/lib/libucw-images$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
 .PHONY: install-libucw-images-api