sw: Makefile: fix third_party and package naming

With these changes, litex mode should now work.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-04-06 10:51:08 +08:00
parent 2a7e431947
commit 91a23d808c

View File

@ -1,5 +1,3 @@
PACKAGE := foboot
GIT_VERSION := $(shell git describe --tags) GIT_VERSION := $(shell git describe --tags)
TRGT ?= riscv64-unknown-elf- TRGT ?= riscv64-unknown-elf-
CC := $(TRGT)gcc CC := $(TRGT)gcc
@ -22,17 +20,19 @@ LDSCRIPT := $(BASE_DIR)/ld/linker.ld
LD_DIR := ../include/generated LD_DIR := ../include/generated
ADD_CFLAGS := -I../include -I$(BASE_DIR)/include -D__vexriscv__ -march=rv32im -mabi=ilp32 ADD_CFLAGS := -I../include -I$(BASE_DIR)/include -D__vexriscv__ -march=rv32im -mabi=ilp32
ADD_LFLAGS := ADD_LFLAGS :=
PACKAGE := bios
else else
BASE_DIR := . BASE_DIR := .
LD_DIR := $(BASE_DIR)/ld LD_DIR := $(BASE_DIR)/ld
LDSCRIPT := $(BASE_DIR)/ld/linker.ld LDSCRIPT := $(BASE_DIR)/ld/linker.ld
ADD_CFLAGS := -I$(BASE_DIR)/include -D__vexriscv__ -march=rv32im -mabi=ilp32 ADD_CFLAGS := -I$(BASE_DIR)/include -D__vexriscv__ -march=rv32im -mabi=ilp32
ADD_LFLAGS := ADD_LFLAGS :=
PACKAGE := foboot
endif endif
LDSCRIPTS := $(LDSCRIPT) $(LD_DIR)/output_format.ld $(LD_DIR)/regions.ld LDSCRIPTS := $(LDSCRIPT) $(LD_DIR)/output_format.ld $(LD_DIR)/regions.ld
SRC_DIR := $(BASE_DIR)/src SRC_DIR := $(BASE_DIR)/src
THIRD_PARTY := $(BASE_DIR)third_party THIRD_PARTY := $(BASE_DIR)/third_party
DBG_CFLAGS := -ggdb -g -DDEBUG -Wall DBG_CFLAGS := -ggdb -g -DDEBUG -Wall
DBG_LFLAGS := -ggdb -g -Wall DBG_LFLAGS := -ggdb -g -Wall
CFLAGS := $(ADD_CFLAGS) \ CFLAGS := $(ADD_CFLAGS) \