rules_GCC_a15.mk: Added option to change SONAME outside of the makefile defaults
authorIvan Pang <i-pang@ti.com>
Mon, 27 Jan 2014 23:19:46 +0000 (18:19 -0500)
committerIvan Pang <i-pang@ti.com>
Mon, 27 Jan 2014 23:19:46 +0000 (18:19 -0500)
makerules/rules_GCC_a15.mk
packages/makefile

index 387bca2ad9098e416f9cafcbdf81f0dc8535e5d6..84524bfdbfe6e6f2643a6fd7b439b7f57be62d67 100755 (executable)
@@ -16,6 +16,8 @@ CROSSLNK ?= $(CODEGEN_PATH_A15_GCC)/bin/arm-linux-gnueabihf-gcc
 CC = $(CROSSCC)\r
 AR = $(CROSSAR)\r
 LNK = $(CROSSLNK)\r
+SONAME ?= $(MODULE_NAME).$(LIBEXT_SO)\r
+SONAME_FULL = $(subst .,$(findstring rm,$(MODULE_NAME)).,$(subst _rm,,$(SONAME)))\r
 \r
 CFLAGS_INTERNAL = -Wall -Wunknown-pragmas -c -mcpu=cortex-a15 -g -mfpu=neon -mfloat-abi=hard -mabi=aapcs -mapcs-frame  -Wswitch -fno-short-enums\r
 \r
@@ -70,11 +72,13 @@ ARFLAGS_SO = -shared
 # Archive/library file creation\r
 $(LIBDIR)/$(MODULE_NAME).$(LIBEXT_SO) : $(OBJ_PATHS_ASM_SO) $(OBJ_PATHS_SO)\r
        $(ECHO) \#\r
-       $(ECHO) \# Archiving $(PLATFORM):$(CORE):$(PROFILE_$(CORE)):$(MODULE_NAME) Shared Library\r
+       $(ECHO) \# Archiving $(PLATFORM):$(CORE):$(PROFILE_$(CORE)):$(MODULE_NAME) Shared Library $(SONAME_FULL)\r
        $(ECHO) \#\r
-       $(CC) $(ARFLAGS_SO) -Wl,-soname,$@.1 -o $@.1.0.0 $(OBJ_PATHS_ASM_SO) $(OBJ_PATHS_SO)\r
-       @ln -s $(MODULE_NAME).$(LIBEXT_SO).1.0.0 $@.1\r
-       @ln -s $(MODULE_NAME).$(LIBEXT_SO).1     $@\r
+       $(CC) $(ARFLAGS_SO) -Wl,-soname,$(SONAME_FULL).1 -o $(LIBDIR)/$(SONAME_FULL).1.0.0 $(OBJ_PATHS_ASM_SO) $(OBJ_PATHS_SO)\r
+       @ln -s $(SONAME_FULL).1.0.0 $(SONAME_FULL).1\r
+       @mv $(SONAME_FULL).1 $(LIBDIR)\r
+       @ln -s $(SONAME_FULL).1     $(SONAME_FULL)\r
+       @mv $(SONAME_FULL) $(LIBDIR)\r
 \r
 # Linker options and rules\r
 LNKFLAGS_INTERNAL_COMMON =\r
index 3f11fbd6eddccb7b1e162434023d87e862a71688..bd786e88eb1e7290ab3ab922f4f26e999df91e66 100755 (executable)
@@ -3432,9 +3432,9 @@ edma3_drv_tci6638k2k-evm_66_be_example_clean:
 
 edma3_drv_tci6638k2k-evm_a15_example_clean:
        $(ECHO) \# Cleaning example $@:debug
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6638k2k-evm CORE=a15host PROFILE_a15host=debug clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6638k2k-evm CORE=a15host PROFILE_a15host=debug TOOLCHAIN_a15=GCC clean
        $(ECHO) \# Cleaning example $@:release
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6638k2k-evm CORE=a15host PROFILE_a15host=release clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6638k2k-evm CORE=a15host PROFILE_a15host=release TOOLCHAIN_a15=GCC clean
 
 edma3_drv_tci6630k2l-evm_66_example_clean:
        $(ECHO) \# Cleaning example $@:debug
@@ -3474,21 +3474,21 @@ edma3_drv_tci6636k2h-evm_66_be_example_clean:
 
 edma3_drv_tci6630k2l-evm_a15_example_clean:
        $(ECHO) \# Cleaning example $@:debug
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6630k2l-evm CORE=a15host PROFILE_a15host=debug clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6630k2l-evm CORE=a15host PROFILE_a15host=debug TOOLCHAIN_a15=GCC clean
        $(ECHO) \# Cleaning example $@:release
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6630k2l-evm CORE=a15host PROFILE_a15host=release clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6630k2l-evm CORE=a15host PROFILE_a15host=release TOOLCHAIN_a15=GCC clean
 
 edma3_drv_c66ak2e-evm_a15_example_clean:
        $(ECHO) \# Cleaning example $@:debug
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=c66ak2e-evm CORE=a15host PROFILE_a15host=debug clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=c66ak2e-evm CORE=a15host PROFILE_a15host=debug TOOLCHAIN_a15=GCC clean
        $(ECHO) \# Cleaning example $@:release
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=c66ak2e-evm CORE=a15host PROFILE_a15host=release clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=c66ak2e-evm CORE=a15host PROFILE_a15host=release TOOLCHAIN_a15=GCC clean
 
 edma3_drv_tci6636k2h-evm_a15_example_clean:
        $(ECHO) \# Cleaning example $@:debug
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6636k2h-evm CORE=a15host PROFILE_a15host=debug clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6636k2h-evm CORE=a15host PROFILE_a15host=debug TOOLCHAIN_a15=GCC clean
        $(ECHO) \# Cleaning example $@:release
-       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6636k2h-evm CORE=a15host PROFILE_a15host=release clean
+       $(MAKE) -C $($(subst _clean,,$@)_EXAMPLES_PATH) PLATFORM=tci6636k2h-evm CORE=a15host PROFILE_a15host=release TOOLCHAIN_a15=GCC clean
 
 # Help
 help: