⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 基于瑞萨 M16C 的最新版本 IIC 通信
💻
字号:
#/****************************************************************
#KPIT Cummins Infosystems Limited Pune, India. 17-June-2005.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#*****************************************************************/

PREFIX=m32c-elf

#DEBUG_FLAGS=-gdwarf-2

# Specify compiler to be used
CC = $(PREFIX)-gcc

# Specify Assembler to be used
AS = $(PREFIX)-as

# Specify linker to be used
LD = $(PREFIX)-ld

# Specify CPU flag
CPU = -mcpu=m16c	

# Common compiler flags
CFLAGS = -nostartfiles

ALL_FLAGS = $(CFLAGS) $(DEBUG_FLAGS) $(CPU)

# Application name
APPNAME = main

# Specify all objects that you are going to link together
OBJS = start.o hwinit.o $(APPNAME).o

SOURCES = start.S vects.S hwinit.c inthandler.c uart.c i2c.c $(APPNAME).c 

$(APPNAME).mot : $(APPNAME).out
	$(PREFIX)-objcopy -O srec $(APPNAME).out $@

# Define ROMSTART if compiling for ROM

$(APPNAME).out : $(SOURCES) $(APPNAME).ls
	$(CC) $(ALL_FLAGS) -DROMSTART -DRELEASE -T$(APPNAME).ls -Xlinker -Map -Xlinker $(APPNAME).map -o $@ $(SOURCES) 

all: $(APPNAME).mot

rom: $(APPNAME).mot

clean:
	rm -f *.o *.out *.mot *.map

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -