makefile: Cleanup to move host executable to board specific
authorSam Nelson <sam.nelson@ti.com>
Mon, 27 Feb 2017 21:57:11 +0000 (16:57 -0500)
committerSam Nelson <sam.nelson@ti.com>
Mon, 27 Feb 2017 21:57:11 +0000 (16:57 -0500)
- Making the host binary to be board specific instead of platform
specific.
( Board library used is board specific)

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
host_bios/simple_buffer_example/dsp/makefile
host_bios/simple_buffer_example/host/makefile
host_bios/simple_buffer_example/readme.txt

index 97d0fba48c6d2c84e3d9d7fc5079b3da5bd54299..67e456755169395865572308e77e1c89fe78fad1 100644 (file)
@@ -158,6 +158,8 @@ ifneq (clean,$(MAKECMDGOALS))
 ifneq (,$(PROFILE))
 ifeq (,$(wildcard bin/$(PLATFORM)/$(PROFILE)/obj))
     $(shell $(MKDIR) -p bin/$(PLATFORM)/$(PROFILE)/obj)
+endif
+ifeq (,$(wildcard bin/shared/$(PLATFORM)/$(PROFILE)/obj/shared/bigdataxlat/bios))
     $(shell $(MKDIR) -p bin/shared/$(PLATFORM)/$(PROFILE)/obj/shared/bigdataxlat/bios)
 endif
 endif
index bf94b921cbe54305d5e46d8442503e9697e8e5d3..1d9f842a856997f68d2ccad2a19926d29fed24e2 100644 (file)
 EXBASE = ..
 include $(EXBASE)/products.mak
 
-srcs = MainHost.c App.c 
-objs = $(addprefix bin/$(PLATFORM)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg,$(srcs)))
-CONFIG = bin/$(PLATFORM)/$(PROFILE)/configuro
+srcs = MainHost.c App.c
+objs = $(addprefix bin/$(BOARD_NAME)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg,$(srcs)))
+CONFIG = bin/$(BOARD_NAME)/$(PROFILE)/configuro
 
 HOSTOS = bios
 locallibsrcs = shared/bigdataxlat/$(HOSTOS)/bigdataxlat.c
 locallibobjs = $(addprefix bin/shared/$(PLATFORM)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg,$(locallibsrcs)))
 
--include $(addprefix bin/$(PLATFORM)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg.dep,$(srcs)))
+-include $(addprefix bin/$(BOARD_NAME)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg.dep,$(srcs)))
 -include $(addprefix bin/shared/$(PLATFORM)/$(PROFILE)/obj/,$(patsubst %.c,%.oa15fg.dep,$(locallibsrcs)))
 
 .PRECIOUS: %/compiler.opt %/linker.cmd
@@ -59,14 +59,14 @@ release:
 debug:
        $(MAKE) PROFILE=debug app_host.x
 
-app_host.x: bin/$(PLATFORM)/$(PROFILE)/app_host.xa15fg
-bin/$(PLATFORM)/$(PROFILE)/app_host.xa15fg: $(objs) $(locallibobjs) $(libs) $(CONFIG)/linker.cmd
+app_host.x: bin/$(BOARD_NAME)/$(PROFILE)/app_host.xa15fg
+bin/$(BOARD_NAME)/$(PROFILE)/app_host.xa15fg: $(objs) $(locallibobjs) $(libs) $(CONFIG)/linker.cmd
        @$(ECHO) "#"
        @$(ECHO) "# Making $@ ..."
        $(LD) -o $@ $(LDFLAGS) $(objs) $(locallibobjs) $(libs) -Wl,-T,$(CONFIG)/linker.cmd \
                -lgcc -lc -lm -lnosys $(LDLIBS)
 
-bin/$(PLATFORM)/$(PROFILE)/obj/%.oa15fg: %.c $(CONFIG)/compiler.opt
+bin/$(BOARD_NAME)/$(PROFILE)/obj/%.oa15fg: %.c $(CONFIG)/compiler.opt
        @$(ECHO) "#"
        @$(ECHO) "# Making $@ ..."
        $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $<
@@ -100,7 +100,7 @@ install:
 #      @$(MKDIR) $(EXEC_DIR)/debug
 #      $(CP) bin/$(PLATFORM)/debug/app_host.xa15fg $(EXEC_DIR)/debug
        @$(MKDIR) $(EXEC_DIR)/release
-       $(CP) bin/$(PLATFORM)/release/app_host.xa15fg $(EXEC_DIR)/release
+       $(CP) bin/$(BOARD_NAME)/release/app_host.xa15fg $(EXEC_DIR)/release
 
 help:
        @$(ECHO) "make                   # build executable"
@@ -160,8 +160,10 @@ endif
 #  ======== create output directories ========
 ifneq (clean,$(MAKECMDGOALS))
 ifneq (,$(PROFILE))
-ifeq (,$(wildcard bin/$(PLATFORM)/$(PROFILE)/obj))
-    $(shell $(MKDIR) -p bin/$(PLATFORM)/$(PROFILE)/obj)
+ifeq (,$(wildcard bin/$(BOARD_NAME)/$(PROFILE)/obj))
+    $(shell $(MKDIR) -p bin/$(BOARD_NAME)/$(PROFILE)/obj)
+endif
+ifeq (,$(wildcard bin/shared/$(PLATFORM)/$(PROFILE)/obj/shared/bigdataxlat/bios))
     $(shell $(MKDIR) -p bin/shared/$(PLATFORM)/$(PROFILE)/obj/shared/bigdataxlat/bios)
 endif
 endif
index 5c1a1f443696c45529123103e441c32d28721e21..5f90ca6c1a68963bec0160a7dc420557be15dedc 100644 (file)
@@ -6,6 +6,8 @@ BigdataIPC example
 
 
 Program Logic:
+--------------
+
 Initially, the host sends first message with shared memory init information
  followed by  2 more dummy messages to slave core ( all three messages sent in
  sequence without waiting for reply).
@@ -36,3 +38,8 @@ Build is structured to be initiated from the Processor SDK top level makefile.
 
 If you want to override the components or do a local build, then the product.mak
 need to be modified to supply the path names of the different components.
+
+The host binaries are expected to be at:
+host/bin/<board_name>/release
+DSP binaries are expected to be at:
+dsp/bin/<platform_name>/release