2019-12-31 16:06:20 +01:00
|
|
|
############################################################################
|
2021-03-08 22:29:12 +01:00
|
|
|
# boards/risc-v/k210/maix-bit/scripts/Make.defs
|
2019-12-31 16:06:20 +01:00
|
|
|
#
|
2021-03-12 05:04:15 +01:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2019-12-31 16:06:20 +01:00
|
|
|
#
|
2021-03-12 05:04:15 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2019-12-31 16:06:20 +01:00
|
|
|
#
|
2021-03-12 05:04:15 +01:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2019-12-31 16:06:20 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-19 16:25:18 +02:00
|
|
|
include $(TOPDIR)/.config
|
|
|
|
include $(TOPDIR)/tools/Config.mk
|
2021-12-26 17:18:22 +01:00
|
|
|
include $(TOPDIR)/arch/risc-v/src/common/Toolchain.defs
|
2019-12-31 16:06:20 +01:00
|
|
|
|
|
|
|
LDSCRIPT = ld.script
|
2022-02-14 22:29:40 +01:00
|
|
|
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
2019-12-31 16:06:20 +01:00
|
|
|
|
2022-05-12 15:42:03 +02:00
|
|
|
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
2019-12-31 16:06:20 +01:00
|
|
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
2022-05-12 15:42:03 +02:00
|
|
|
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
2019-12-31 16:06:20 +01:00
|
|
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
2020-09-24 12:46:51 +02:00
|
|
|
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
2022-04-23 10:33:09 +02:00
|
|
|
AFLAGS += $(CFLAGS) -D__ASSEMBLY__
|
2019-12-31 16:06:20 +01:00
|
|
|
|
2020-02-08 00:10:23 +01:00
|
|
|
# Loadable module definitions
|
|
|
|
|
|
|
|
CMODULEFLAGS = $(CFLAGS)
|
|
|
|
|
|
|
|
LDMODULEFLAGS = -r -e module_initialize
|
2022-02-20 03:34:50 +01:00
|
|
|
LDMODULEFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/modlib/gnu-elf.ld)
|
2020-02-08 00:10:23 +01:00
|
|
|
|
|
|
|
# ELF module definitions
|
|
|
|
|
|
|
|
CELFFLAGS = $(CFLAGS)
|
|
|
|
CXXELFFLAGS = $(CXXFLAGS)
|
|
|
|
|
2023-08-22 13:32:17 +02:00
|
|
|
LDELFFLAGS = -melf64lriscv -r -e main
|
2022-04-24 03:42:58 +02:00
|
|
|
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/binfmt/libelf/gnu-elf.ld)
|