diff options
author | Derk Rembold <rembold@de.ibm.com> | 2015-06-11 16:54:55 +0200 |
---|---|---|
committer | Derk Rembold <rembold@de.ibm.com> | 2015-06-22 02:47:30 -0500 |
commit | 0de9d1fee30b7d546487464c23947403cd74ac73 (patch) | |
tree | 26cf57a71d9dab431df001c193faebb4618ff67a /sbe/sbefw/Makefile | |
parent | 6a51c182508d13c8072e5ad8868ae63d41f28d99 (diff) | |
download | talos-sbe-0de9d1fee30b7d546487464c23947403cd74ac73.tar.gz talos-sbe-0de9d1fee30b7d546487464c23947403cd74ac73.zip |
usage for only one global makefile
removed link.cmd inside sbefw dir.
Change-Id: I14746bb0fdebe47e65c3462758bc399b18f38d62
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18366
Reviewed-by: Derk Rembold <rembold@de.ibm.com>
Tested-by: Derk Rembold <rembold@de.ibm.com>
Diffstat (limited to 'sbe/sbefw/Makefile')
-rw-r--r-- | sbe/sbefw/Makefile | 71 |
1 files changed, 14 insertions, 57 deletions
diff --git a/sbe/sbefw/Makefile b/sbe/sbefw/Makefile index f986ce8b..6709d479 100644 --- a/sbe/sbefw/Makefile +++ b/sbe/sbefw/Makefile @@ -1,76 +1,33 @@ -#remove this once we have a real compiler export P2P_ENABLE = 1 -#Pull in the definitions that affect all makefiles for this image -include img_defs.mk +export SUB_OBJDIR = /sbefw -#Pull in object file names for the top directory +include img_defs.mk include topfiles.mk -ifdef P2P_ENABLE -include $(P2P_SRCDIR)/p2pfiles.mk -endif - -PK_MAKE_DIR := $(PK_SRCDIR)/$(PPE_TYPE) OBJS := $(addprefix $(OBJDIR)/, $(TOP_OBJECTS)) -PKLIB := $(OBJDIR)/pk/libpk.a - -LIB_DIRS = -L$(OBJDIR)/pk #-L$(OBJDIR)/commonlib -LINK_OBJS = $(OBJS) $(PKLIB) #$(COMMONLIB) -LINK_SCRIPT = $(addprefix $(OBJDIR)/, linkscript) -ifdef P2P_ENABLE -P2PLIB := $(OBJDIR)/p2p/libp2p.a -LIB_DIRS += -L$(OBJDIR)/p2p -LINK_OBJS += $(P2PLIB) -endif - -#default target is to make a binary application image -#This removes all unecessary headers from the ELF executable -$(OBJDIR)/$(IMAGE_NAME).bin $(OBJDIR)/$(IMAGE_NAME).dis: $(OBJDIR)/$(IMAGE_NAME).out - $(OBJCOPY) -O binary $< $(OBJDIR)/$(IMAGE_NAME).bin - $(OBJDUMP) -S $< > $(OBJDIR)/$(IMAGE_NAME).dis - -#create a linked ELF executable -$(OBJDIR)/$(IMAGE_NAME).out: $(LINK_OBJS) $(LINK_SCRIPT) - $(LD) -e __system_reset -T$(LINK_SCRIPT) -Map $(OBJDIR)/$(IMAGE_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_NAME).out $(LIB_DIRS) $(OBJS) -lpk -lp2p #-lcommon +libsbefw.a: $(OBJS) + $(AR) crs $(OBJDIR)/libsbefw.a $(OBJDIR)/*.o -#pass the link command file through the C preprocessor to evaluate macros and remove comments -$(LINK_SCRIPT): link.cmd - $(CPP) -E -x c++ -P $(DEFS) link.cmd -o $(LINK_SCRIPT) +.PHONY: clean sbefw +sbefw: $(OBJS) -#Create an obj directory if needed -$(LINK_OBJS) $(OBJS) $(OBJS:.o=.d): | $(OBJDIR) +$(OBJS) $(OBJS:.o=.d): | $(OBJDIR) $(OBJDIR): mkdir -p $(OBJDIR) - -.PHONY: clean $(PKLIB) $(P2PLIB) - -#Build macro-specific kernel code -$(PKLIB): - $(MAKE) -I $(IMAGE_SRCDIR) -C $(PK_MAKE_DIR) - -#Build the code that is common for all processors (PPEs and 405) -#$(COMMONLIB): -# $(MAKE) -I $(IMAGE_SRCDIR) -C $(COMMONLIB_SRCDIR) - -ifdef P2P_ENABLE -$(P2PLIB): - $(MAKE) -I $(IMAGE_SRCDIR) -C $(P2P_SRCDIR) -endif - -# collect all of the trace hash files for this image into a single trexStringFile -.PHONY : tracehash -tracehash: - mkdir -p $(OBJDIR) - $(THASH) -c -d $(OBJDIR) -s $(OBJDIR)/trexStringFile + echo "show something else" #clean the kernel directory first, then the application level clean clean: rm -fr $(OBJDIR) -#Add dependencies to header files ifneq ($(MAKECMDGOALS),clean) -include $(OBJS:.o=.d) +include $(OBJS:.o=.d) endif + + + + + |