Makefile: Examples depend on the DSO

tight-png
Andri Yngvason 2019-09-07 16:01:39 +00:00
parent 378809bad2
commit 03a13da08b
1 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,9 @@ CFLAGS += -fvisibility=hidden -Icontrib/miniz
OBJECTS += $(BUILD_DIR)/miniz.o
DSO_PATH := $(BUILD_DIR)/$(DSO_NAME)
DSO := $(DSO_PATH).so.$(DSO_MAJOR).$(DSO_MINOR)
$(DSO_PATH).so.$(DSO_MAJOR).$(DSO_MINOR): $(OBJECTS)
$(DSO): $(OBJECTS)
$(LINK_DSO)
ln -sf $(DSO_NAME).so.$(DSO_MAJOR).$(DSO_MINOR) $(DSO_PATH).so.$(DSO_MINOR)
ln -sf $(DSO_NAME).so.$(DSO_MAJOR).$(DSO_MINOR) $(DSO_PATH).so
@ -26,7 +27,7 @@ $(BUILD_DIR)/%.o: src/%.c | $(BUILD_DIR) ; $(CC_OBJ)
$(BUILD_DIR)/miniz.o: contrib/miniz/miniz.c | $(BUILD_DIR) ; $(CC_OBJ)
.PHONY: examples
examples:
examples: $(DSO)
make -C examples \
BUILD_DIR=../$(BUILD_DIR)/examples \
LIB_PATH=../$(BUILD_DIR)