mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-29 08:44:15 +01:00
slightly optimize sw build
This commit is contained in:
parent
29aca8aea6
commit
19c34a861b
4
build.sh
4
build.sh
@ -39,7 +39,7 @@ build_n64 () {
|
||||
if [ "$FORCE_CLEAN" = true ]; then
|
||||
make clean
|
||||
fi
|
||||
make all
|
||||
make all -j
|
||||
popd
|
||||
|
||||
BUILT_N64=true
|
||||
@ -50,7 +50,7 @@ build_riscv () {
|
||||
|
||||
pushd sw/riscv
|
||||
if [ "$FORCE_CLEAN" = true ]; then
|
||||
make clean
|
||||
make clean -j
|
||||
fi
|
||||
make all
|
||||
popd
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run \
|
||||
--rm \
|
||||
--user $(id -u):$(id -g) \
|
||||
--mount type=bind,src="$(pwd)",target="/workdir" \
|
||||
ghcr.io/polprzewodnikowy/sc64env:v1.2 \
|
||||
./build.sh $@
|
||||
|
@ -1,11 +1,10 @@
|
||||
TOOLCHAIN = riscv32-unknown-elf-
|
||||
CC = $(TOOLCHAIN)gcc
|
||||
AS = $(TOOLCHAIN)as
|
||||
OBJCOPY = $(TOOLCHAIN)objcopy
|
||||
OBJDUMP = $(TOOLCHAIN)objdump
|
||||
SIZE = $(TOOLCHAIN)size
|
||||
|
||||
FLAGS = -mabi=ilp32 -march=rv32i
|
||||
FLAGS = -mabi=ilp32 -march=rv32i $(USER_FLAGS)
|
||||
CFLAGS = -Os -Wall -ffunction-sections -fdata-sections -ffreestanding -MMD -MP
|
||||
LDFLAGS = -nostartfiles -Wl,--gc-sections
|
||||
|
||||
@ -25,10 +24,10 @@ $(@info $(shell mkdir -p ./$(BUILD_DIR) &> /dev/null))
|
||||
all: $(BUILD_DIR)/governor.hex
|
||||
|
||||
$(BUILD_DIR)/%.c.o: %.c
|
||||
$(CC) $(FLAGS) $(CFLAGS) $(USER_FLAGS) -c $< -o $@
|
||||
$(CC) $(FLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/%.S.o: %.S
|
||||
$(AS) $(FLAGS) $(ASFLAGS) -c $< -o $@
|
||||
$(CC) -x assembler $(FLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/governor.hex: $(OBJS) SC64.ld
|
||||
$(CC) $(FLAGS) $(LDFLAGS) -TSC64.ld $(OBJS) -o $(BUILD_DIR)/governor.elf
|
||||
|
Loading…
Reference in New Issue
Block a user