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

📄 makefile

📁 一个小型化的嵌入式实时操作系统源代码
💻
字号:
#
#   id: @(#)makefile 1.7 96/07/24
#
#   Copyright(c) 1995, FMI, Fujitsu Microelectronics, Inc.
#   All rights reserved.
#
#   This software (including any documentation) is untested, has not been
#   fully tested for viruses and has been provided to you without charge.
#   ACCORDINGLY, IT IS DELIVERED "AS IS" WITH NO WARRANTIES EXPRESS OR
#   IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY,
#   FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.  You bear all 
#   risk of nonperformance, loss of data and other problems and Fujitsu
#   Microelectronics, Inc. and Fujitsu Limited will not be liable under any
#   contract, negligence, strict liability or other theory for any damages
#   including, without limitation, direct, consequential or incidental nor
#   be required to provide substitute goods, services or technology.
#
#

SLITELIB	= ../../../gnulib

# Specific SPARClite chip: eg. 930, 933h, 936
CHIP		= 832
BOARD		= 832ek

# Name of executable program
PROGRAM		= libbsp.a
HOME		= ..
CHIPDIR		= $(HOME)/$(CHIP)
BSPDIR		= $(CHIPDIR)/$(BOARD)
INCDIR		= $(HOME)/include
LIBDIR		= lib

# List of object modules
OBJS		= $(CHIPDIR)/cpu.o $(CHIPDIR)/cpu_a.o $(BSPDIR)/bsp.o $(BSPDIR)/bsp_a.o

# Controls if GDB debugger stub is invoked (i.e. controls which crt0** is linked)
#DEBUG		= 
DEBUG		= debug

# Address where programs is to be loaded
# We use beginning of DRAM
LOADADR		=  4010000

# Optimization level (from -O0 to -O3)
# -O0 is recommended for easy use of GDB. When code is optimized 
# sometimes the code execution path does not match the source
# which can cause confusion when using GDB.
# The higher optimization levels are recommended when benchmarking code
OPTIMIZATION    = -O0

# Additional special compiler flags 
PROGFLAGS       =  -DLANGUAGE_C

CHIPLIB         = $(SLITELIB)/chips/$(CHIP)
BOARDLIB        = $(SLITELIB)/boards/$(BOARD)

# Definition of host (Unix v. DOS) specifics
include $(SLITELIB)/host.mak

# Chip specific stuff
include $(CHIPLIB)/chip.mak

# Compiler etc. switches. 
INCLUDES        = -I . -I $(INCDIR) 
CCFLAGS         = -g -c $(OPTIMIZATION) $(INCLUDES) $(FPUCCFLAG) -DLANGUAGE_C
CCFLAGS         += $(PROGFLAGS)
CPPFLAGS        = $(INCLUDES)
ASFLAGS         = 
C_LIB           = $(C_LIB_BASE)/$(FPULDFLAG)
CYGNUS_LIB      = $(CYGNUS_LIB_BASE)/$(FPULDFLAG)
LDFLAGS         = -Ttext $(LOADADR) -T$(SLITELIB)/sparclit.ld -L$(BOARDLIB) -L$(CYGNUS_LIB) -L$(C_LIB)

# These are default make rules for making any C or assembly modules
# which do not have explicit rules. We include the application makefile 
# in the dependecy list since it defines some compiler flags.
%.o: %.s makefile
	$(CPP) $(CPPFLAGS) $*.s $*.i
	$(AS) $(ASFLAGS) -o $*.o $*.i

%.o: %.c makefile
	$(CC) $(CCFLAGS) $*.c -o $*.o

# default: $(PROGRAM).sr
default: clean $(PROGRAM)

# Executable program
$(PROGRAM): $(OBJS)
	$(AR) -r $@  $(OBJS) 
	copy $@ ..\$(LIBDIR)

# Delete all objects etc. to rebuild from scratch.
clean: 
	${DEL} $(PROGRAM)
	${DEL} *.i
	${DEL} *.o
	cd ..\$(LIBDIR)
	${DEL} $(PROGRAM)
	cd ..\832

⌨️ 快捷键说明

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