Add Separate Library Build
authorAngela Stegmaier <angelabaker@ti.com>
Mon, 4 Apr 2016 17:38:59 +0000 (12:38 -0500)
committerBuddy Liong <a0270631@ti.com>
Mon, 2 Oct 2017 15:25:05 +0000 (10:25 -0500)
Add "lib" build that allows only the baselib to be built instead
of both the library and executable. This saves build time if the
executable is not needed (for example if IPUMM is being linked
into another image).

Change-Id: Ic509bd08147652938e7cfc6149d348a26b9fa131
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Makefile

index ac1b1cfca99341d2abbfd303afbe93f7e0f67ef8..a00749522b4d18690055bce4b1ee57d166b75d58 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -83,6 +83,8 @@ PROFILER    ?= DISABLE
 
 all: ducatibin
 
+lib: ducatilib
+
 # Include platform build configuration
 config:
 ifeq (bldcfg.mk,$(wildcard bldcfg.mk))
@@ -138,6 +140,19 @@ clean: config
         $(XDCROOT)/xdc --jobs=$(JOBS) clean -PD $(DUCATIDCEMMSRC)/platform/ti/dce/baselib/.; \
         $(XDCROOT)/xdc --jobs=$(JOBS) clean -PD $(DUCATIDCEMMSRC)/platform/ti/dce/baseimage/.
 
+buildlib: config
+ifeq ($(IPCSRC),)
+       @echo "ERROR: IPCSRC not set. Exiting..."
+       @echo "For more info, use 'make help'"
+       @exit 1
+else ifeq ($(TMS470CGTOOLPATH),)
+       @echo "ERROR: TMS470CGTOOLPATH not set. Exiting..."
+       @echo "For more info, use 'make help'"
+       @exit 1
+endif
+       export XDCARGS=$(MYXDCARGS); \
+       $(XDCROOT)/xdc --jobs=$(JOBS) -PD $(DUCATIDCEMMSRC)/platform/ti/dce/baselib/.
+
 build: config
 ifeq ($(IPCSRC),)
        @echo "ERROR: IPCSRC not set. Exiting..."
@@ -152,6 +167,8 @@ endif
        $(XDCROOT)/xdc --jobs=$(JOBS) -PD $(DUCATIDCEMMSRC)/platform/ti/dce/baselib/.; \
        $(XDCROOT)/xdc --jobs=$(JOBS) -PD $(DUCATIDCEMMSRC)/platform/ti/dce/baseimage/.
 
+ducatilib: buildlib
+
 ducatibin: build
 ifeq ($(FORSMP),1)
        $(TMS470CGTOOLPATH)/bin/armstrip -p $(DUCATIDCEMMSRC)/platform/ti/dce/baseimage/out/ipu/$(PROFILE)/$(INTBINNAME) -o=$(DUCATIBINNAME)