📄 makefile-arm
字号:
# The path of kernel source code
INCLUDEDIR = /home/ArmLinuxFrame/code/linux/include/
# Compiler
CC = arm-linux-gcc
# Options
CFLAGS = -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
-mapcs -fno-strict-aliasing -fno-common -fno-common -pipe \
-mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes \
-msoft-float -I$(INCLUDEDIR)
APP-CFLAGS = -O2 -Dlinux -D__linux__ -Dunix -DEMBED -nostdinc \
-I/home/ArmLinuxFrame/code/libc/include \
-I/home/ArmLinuxFrame/code/linux/include \
-idirafter /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/include \
-nostartfiles -L/home/ArmLinuxFrame/code/libc/lib -lc -lcrypt \
/home/ArmLinuxFrame/code/libc/lib/crt0.o
# Target
OBJS = scull.o
all: $(OBJS)
$(OBJS): scull.c scull.h
$(CC) $(CFLAGS) -c $<
$(CC) $(APP-CFLAGS) app.c -o app
install:
insmod $(OBJS)
uninstall:
rmmod scull
.PHONY: clean
clean:
rm -f *.o
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -