host_bios: Cleanup makefiles
[processor-sdk/big-data-ipc-examples.git] / host_bios / simple_buffer_example / host / makefile
index bf94b921cbe54305d5e46d8442503e9697e8e5d3..33988c103a85078b7c8bf204fbe1b9c0634e5ecb 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
+locallibsrcs = shared/bigdataxlat/bios/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
 
+.PHONY: release debug install install_rov
+
 all: release
 #all: debug
 
@@ -59,14 +61,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 +102,13 @@ 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
+
+install_rov:
+       @$(ECHO) "#"
+       @$(ECHO) "# Making $@ ..."
+       @$(MKDIR) $(EXEC_DIR)/release
+       $(CP) bin/$(BOARD_NAME)/release/configuro/package/cfg/Host_pa15fg.rov.xs $(EXEC_DIR)/release
 
 help:
        @$(ECHO) "make                   # build executable"
@@ -160,8 +168,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