X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2FMakefile;h=acd93becb7675d1d5e41602e4067258cca7d0f5d;hb=0db6e10eac28f38bfc3b325b13ad95107c58ce1e;hp=cc571e623705f722a725ad14c40722dc6413d24e;hpb=60845a95a7b99e52d5d8450fa8a9f1877eebd60c;p=libucw.git diff --git a/images/Makefile b/images/Makefile index cc571e62..acd93bec 100644 --- a/images/Makefile +++ b/images/Makefile @@ -2,11 +2,11 @@ DIRS+=images -LIBIMAGES_PROGS=$(o)/images/image-tool $(o)/images/color-tool +LIBIMAGES_PROGS=$(o)/images/ucw-image-tool $(o)/images/ucw-color-tool LIBIMAGES_CONFIGS+=images LIBIMAGES_MODS=math config context image scale color io-main LIBIMAGES_INCLUDES=images.h error.h color.h math.h -export LIBIMAGES_LIBS= +export LIBIMAGES_LIBS=-lm ifdef CONFIG_SHERLOCK LIBIMAGES_MODS+=object @@ -15,13 +15,20 @@ else 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_IMAGES_DUP -LIBIMAGES_PROGS+=$(o)/images/image-dup-test +LIBIMAGES_PROGS+=$(o)/images/ucw-image-dup-test LIBIMAGES_MODS+=dup-init dup-cmp LIBIMAGES_INCLUDES+=duplicates.h endif ifdef CONFIG_IMAGES_SIM -LIBIMAGES_PROGS+=$(o)/images/image-sim-test +LIBIMAGES_PROGS+=$(o)/images/ucw-image-sim-test LIBIMAGES_MODS+=sig-cmp endif ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),) @@ -60,42 +67,56 @@ endif PROGS+=$(LIBIMAGES_PROGS) CONFIGS+=$(LIBIMAGES_CONFIGS) -$(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) -$(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) -$(o)/images/libimages.pc: $(LIBIMAGES_DEPS) +$(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: SONAME_SUFFIX=.0 +$(o)/images/libucw-images$(LV).so: LIBS+=$(LIBIMAGES_LIBS) +$(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS) -$(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) -$(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES) -$(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) -$(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) +$(o)/images/ucw-image-tool: $(o)/images/ucw-image-tool.o $(LIBIMAGES) $(LIBUCW) +$(o)/images/ucw-color-tool: $(o)/images/ucw-color-tool.o $(LIBIMAGES) $(LIBUCW) +$(o)/images/ucw-image-dup-test: $(o)/images/ucw-image-dup-test.o $(LIBIMAGES) $(LIBUCW) +$(o)/images/ucw-image-sim-test: $(o)/images/ucw-image-sim-test.o $(LIBIMAGES) $(LIBUCW) TESTS+=$(o)/images/image-test.test -$(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) +$(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW) $(o)/images/image-test.test: $(o)/images/image-test TESTS+=$(o)/images/color.test -$(o)/images/color-t: $(LIBIMAGES) +$(o)/images/color-t: $(LIBIMAGES) $(LIBUCW) $(o)/images/color.test: $(o)/images/color-t -API_LIBS+=libimages +API_LIBS+=libucw-images API_INCLUDES+=$(o)/images/.include-stamp $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES)) $(o)/images/.include-stamp: IDST=images -run/lib/pkgconfig/libimages.pc: $(o)/images/libimages.pc - -ifdef CONFIG_SHARED -LIBIMAGES_NAME=libimages.so -else -LIBIMAGES_NAME=libimages.a -endif - -INSTALL_TARGETS+=install-libimages -install-libimages: - install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR) $(INSTALL_CONFIG_DIR)) - install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) +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 -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 +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/$(LIBIMAGES_NAME) $(DESTDIR)$(INSTALL_LIB_DIR) - install -m 644 run/lib/pkgconfig/libimages.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) - install -m 644 $(addprefix run/cf/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) + install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) + 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_TARGETS+=install-libucw-images-utils +install-libucw-images-utils: + install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) + install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) +.PHONY: install-libucw-images-utils -.PHONY: install-libimages +INSTALL_TARGETS+=install-libucw-images-config +install-libucw-images-config: + install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR) + install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) +.PHONY: install-libucw-images-config