diff options
author | Fabian Hofmann | 2018-10-21 11:42:19 -0500 |
---|---|---|
committer | Jérôme Forissier | 2018-11-21 09:20:21 -0600 |
commit | 28eea17f4dba5bbf7848926eb031ba660e8856f0 (patch) | |
tree | ecd68bd502498f064176ebd61d60198b7c2fbbe4 | |
parent | 656e4276589fd1e4924d8155b285d19d831f7742 (diff) | |
download | ti-optee-client-28eea17f4dba5bbf7848926eb031ba660e8856f0.tar.gz ti-optee-client-28eea17f4dba5bbf7848926eb031ba660e8856f0.tar.xz ti-optee-client-28eea17f4dba5bbf7848926eb031ba660e8856f0.zip |
libteec: Makefile: Generate .so files the same way as CMake
Update the Makefile so that the generated libteec.so file and the
corresponding symlinks match those generated by the CMake script.
Specifically, before this commit the Makefile generated the following
files:
symlink: libteec.so -> libteec.so.1
symlink: libteec.so.1 -> libteec.so.1.0
file: libteec.so.1.0 (SONAME libteec.so.1.0)
With this commit the generated files are:
symlink: libteec.so -> libteec.so.1
symlink: libteec.so.1 -> libteec.so.1.0.0
symlink: libteec.so.1.0 -> libteec.so.1.0.0
file: libteec.so.1.0.0 (SONAME libteec.so.1)
The symlink "libteec.so.1.0" is kept for compatibility with existing
installations. Note that "libteec.so.1.0" is not generated by the CMake
script.
Signed-off-by: Fabian Hofmann <fabian.hofmann@fau.de>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
-rw-r--r-- | libteec/Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libteec/Makefile b/libteec/Makefile index e5cbfa30..9f475b89 100644 --- a/libteec/Makefile +++ b/libteec/Makefile | |||
@@ -11,9 +11,11 @@ all: libteec | |||
11 | ################################################################################ | 11 | ################################################################################ |
12 | MAJOR_VERSION := 1 | 12 | MAJOR_VERSION := 1 |
13 | MINOR_VERSION := 0 | 13 | MINOR_VERSION := 0 |
14 | PATCH_VERSION := 0 | ||
14 | LIB_NAME := libteec.so | 15 | LIB_NAME := libteec.so |
15 | LIB_MAJOR := $(LIB_NAME).$(MAJOR_VERSION) | 16 | LIB_MAJOR := $(LIB_NAME).$(MAJOR_VERSION) |
16 | LIB_MAJ_MIN := $(LIB_NAME).$(MAJOR_VERSION).$(MINOR_VERSION) | 17 | LIB_MAJ_MIN := $(LIB_NAME).$(MAJOR_VERSION).$(MINOR_VERSION) |
18 | LIB_MAJ_MIN_P := $(LIB_NAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION) | ||
17 | 19 | ||
18 | TEEC_SRCS := tee_client_api.c \ | 20 | TEEC_SRCS := tee_client_api.c \ |
19 | teec_trace.c | 21 | teec_trace.c |
@@ -37,15 +39,16 @@ TEEC_CFLAGS += -DCFG_TEE_BENCHMARK | |||
37 | endif | 39 | endif |
38 | 40 | ||
39 | TEEC_LFLAGS := $(LDFLAGS) -lpthread | 41 | TEEC_LFLAGS := $(LDFLAGS) -lpthread |
40 | TEEC_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN) | 42 | TEEC_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN_P) |
41 | 43 | ||
42 | libteec: $(TEEC_LIBRARY) $(OUT_DIR)/libteec.a | 44 | libteec: $(TEEC_LIBRARY) $(OUT_DIR)/libteec.a |
43 | $(VPREFIX)ln -sf $(LIB_MAJ_MIN) $(OUT_DIR)/$(LIB_MAJOR) | 45 | $(VPREFIX)ln -sf $(LIB_MAJ_MIN_P) $(OUT_DIR)/$(LIB_MAJOR) |
46 | $(VPREFIX)ln -sf $(LIB_MAJ_MIN_P) $(OUT_DIR)/$(LIB_MAJ_MIN) | ||
44 | $(VPREFIX)ln -sf $(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME) | 47 | $(VPREFIX)ln -sf $(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME) |
45 | 48 | ||
46 | $(TEEC_LIBRARY): $(TEEC_OBJS) | 49 | $(TEEC_LIBRARY): $(TEEC_OBJS) |
47 | @echo " LINK $@" | 50 | @echo " LINK $@" |
48 | $(VPREFIX)$(CC) -shared -Wl,-soname,$(LIB_MAJ_MIN) $(TEEC_LFLAGS) -o $@ $+ | 51 | $(VPREFIX)$(CC) -shared -Wl,-soname,$(LIB_MAJOR) $(TEEC_LFLAGS) -o $@ $+ |
49 | @echo "" | 52 | @echo "" |
50 | 53 | ||
51 | $(OUT_DIR)/libteec.a: $(TEEC_OBJS) | 54 | $(OUT_DIR)/libteec.a: $(TEEC_OBJS) |
@@ -61,6 +64,7 @@ $(TEEC_OBJ_DIR)/%.o: ${TEEC_SRC_DIR}/%.c | |||
61 | # Cleaning up configuration | 64 | # Cleaning up configuration |
62 | ################################################################################ | 65 | ################################################################################ |
63 | clean: | 66 | clean: |
64 | $(RM) $(TEEC_OBJS) $(TEEC_LIBRARY) $(OUT_DIR)/$(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME) | 67 | $(RM) $(TEEC_OBJS) $(TEEC_LIBRARY) $(OUT_DIR)/$(LIB_MAJOR) \ |
68 | $(OUT_DIR)/$(LIB_MAJ_MIN) $(OUT_DIR)/$(LIB_NAME) | ||
65 | $(RM) $(OUT_DIR)/libteec.a | 69 | $(RM) $(OUT_DIR)/libteec.a |
66 | $(call rmdir,$(OUT_DIR)) | 70 | $(call rmdir,$(OUT_DIR)) |