📄 makefile
字号:
# -*- makefile -*-
# Makefile for a retargeting library to run RVDS-built applications
# as native binaries under ARM Linux.
#
# This makefile expects GNU make.
#
# Run "make" to build the library linux.a, and "make all" to build
# a test application "linuxtest" as well.
#
# You can pass in $(CFLAGS) on the command line:
# make CFLAGS="--thumb"
# to select build options such as ARM versus Thumb.
# You need to define $(KERNELINC) to point at the "include"
# subdirectory of a set of Linux kernel sources. You can either do
# that by editing its definition in this Makefile, or by passing it
# in on the command line:
# $ make KERNELINC=/home/john/kernels/linux-2.6.6/include
KERNELINC ?= XXX-PLEASE-DEFINE-KERNELINC-XXX
LOBJS := ttywrch.o open.o close.o read.o write.o ensure.o flen.o seek.o \
istty.o exit.o argv.o cmdstr.o stackheap.o getenv.o time.o clock.o \
remove.o rename.o system.o tmpnam.o __main.o
CC_CMD = armcc --gnu $(CFLAGS) -c -I$(KERNELINC) sys.c -o $@
linux.a: $(LOBJS)
armar --create linux.a $(LOBJS)
all: linuxtest
ttywrch.o: sys.c; $(CC_CMD) -Dttywrch_c
open.o: sys.c; $(CC_CMD) -Dopen_c
close.o: sys.c; $(CC_CMD) -Dclose_c
read.o: sys.c; $(CC_CMD) -Dread_c
write.o: sys.c; $(CC_CMD) -Dwrite_c
ensure.o: sys.c; $(CC_CMD) -Densure_c
flen.o: sys.c; $(CC_CMD) -Dflen_c
seek.o: sys.c; $(CC_CMD) -Dseek_c
istty.o: sys.c; $(CC_CMD) -Distty_c
exit.o: sys.c; $(CC_CMD) -Dexit_c
argv.o: sys.c; $(CC_CMD) -Dargv_c
cmdstr.o: sys.c; $(CC_CMD) -Dcmdstr_c
stackheap.o: sys.c; $(CC_CMD) -Dstackheap_c
getenv.o: sys.c; $(CC_CMD) -Dgetenv_c
time.o: sys.c; $(CC_CMD) -Dtime_c
clock.o: sys.c; $(CC_CMD) -Dclock_c
remove.o: sys.c; $(CC_CMD) -Dremove_c
rename.o: sys.c; $(CC_CMD) -Drename_c
system.o: sys.c; $(CC_CMD) -Dsystem_c
tmpnam.o: sys.c; $(CC_CMD) -Dtmpnam_c
__main.o: __main.s
armasm __main.s
test.o: test.c
armcc $(CFLAGS) -c test.c
linuxtest: test.o linux.a
armlink --sysv -o linuxtest test.o linux.a
chmod +x linuxtest
clean:
rm -f *.o linux.a linuxtest
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -