Fix Linux build and add verbose make

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
Drasko DRASKOVIC 2017-05-14 17:10:24 +02:00
parent 38dc83bcb8
commit 6929af3ee0
12 changed files with 23 additions and 3220 deletions

View file

@ -23,6 +23,15 @@ OBJ_DIR ?= $(TARGET)/obj
BIN_DIR ?= $(TARGET)/bin
ELFFILE ?= $(OBJ_DIR)/$(TARGET).axf
# For verbose make
ifeq ("$(V)","1")
Q :=
vecho := @true
else
Q := @
vecho := @echo
endif
all: prerequirement application
mp: prerequirement application
@ -41,7 +50,7 @@ build_info:
echo \#define RTL8195AFW_COMPILE_DOMAIN ; \
fi >> .ver
@echo \#define RTL195AFW_COMPILER \"gcc `$(CC) $(CFLAGS) -dumpversion | tr --delete '\r'`\" >> .ver
@mv -f .ver project/inc/$@.h
$(Q) mv -f .ver project/inc/$@.h
.PHONY: application
application: build_info $(SRC_O) $(DRAM_O) $(BOOT_O)
@ -49,9 +58,9 @@ application: build_info $(SRC_O) $(DRAM_O) $(BOOT_O)
@echo "Link ($(TARGET))"
# @echo "==========================================================="
@mkdir -p $(BIN_DIR) $(OBJ_DIR)
@$(file > $(OBJ_DIR)/obj_list.lst,$(OBJ_LIST))
@$(LD) $(LFLAGS) -o $(ELFFILE) @$(OBJ_DIR)/obj_list.lst $(LIBFLAGS) -T$(LDFILE)
@$(OBJDUMP) -d $(ELFFILE) > $(OBJ_DIR)/$(TARGET).asm
$(Q) $(file > $(OBJ_DIR)/obj_list.lst,$(OBJ_LIST))
$(Q) $(LD) $(LFLAGS) -o $(ELFFILE) @$(OBJ_DIR)/obj_list.lst $(LIBFLAGS) -T$(LDFILE)
$(Q) $(OBJDUMP) -d $(ELFFILE) > $(OBJ_DIR)/$(TARGET).asm
.PHONY: prerequirement
#.NOTPARALLEL: prerequirement
@ -65,22 +74,22 @@ prerequirement:
$(SRC_O): %.o : %.c
@echo $<
@mkdir -p $(OBJ_DIR)/$(dir $@)
@$(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
@$(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
$(Q) $(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
$(Q) $(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
$(DRAM_O): %.o : %.c
@echo $<
@mkdir -p $(OBJ_DIR)/$(dir $@)
@$(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
@$(OBJCOPY) --prefix-alloc-sections .sdram $(OBJ_DIR)/$@
@$(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
$(Q) $(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
$(Q) $(OBJCOPY) --prefix-alloc-sections .sdram $(OBJ_DIR)/$@
$(Q) $(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
$(BOOT_O): %.o : %.c
@echo $<
@mkdir -p $(OBJ_DIR)/$(dir $@)
@$(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
@$(OBJCOPY) --prefix-alloc-sections .boot $(OBJ_DIR)/$@
@$(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
$(Q) $(CC) $(CFLAGS) $(INCFLAGS) -c $< -o $(OBJ_DIR)/$@
$(Q) $(OBJCOPY) --prefix-alloc-sections .boot $(OBJ_DIR)/$@
$(Q) $(CC) -MM $(CFLAGS) $(INCFLAGS) $< -MT $@ -MF $(OBJ_DIR)/$(patsubst %.o,%.d,$@)
-include $(DEPENDENCY_LIST)
@ -90,4 +99,4 @@ VPATH:=$(OBJ_DIR) $(SDK_PATH)
clean:
rm -rf $(OBJ_DIR) $(BIN_DIR) $(OBJ_DIR)/$(SDK_PATH)

View file

@ -40,7 +40,7 @@ all: LIBS +=_platform_new _wlan _p2p _wps _websocket _sdcard _xmodem _mdns
mp: LIBS +=_platform_new _wlan_mp _wps _p2p _websocket _sdcard _xmodem _mdns
endif
# m c nosys gcc
PATHLIBS = sdk/component/soc/realtek/8195a/misc/bsp/lib/common/gcc
PATHLIBS = sdk/component/soc/realtek/8195a/misc/bsp/lib/common/GCC
LDFILE = rlx8195A-symbol-v04-img2.ld
BOOTS = sdk/component/soc/realtek/8195a/misc/bsp/image

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff