linux内核源代码概览教程范本.ppt

修饰词 __attribute__ ##,# #define test(x) #x test(123) 被替换成字符串123; #define test(x,y) x##y test(123,456) 替换成123456; #例子 程序 #define test1(x) #x #define test2(x,y) x##y #define abxy 100 main() { puts(test1(123)); printf(%d\n, test2(12, 45)); printf(%d\n, test2(ab, xy)); } 输出: 123 1245 100 Makefile例子 CC=gcc MODCFLAGS := -Wall -DMODULE -D__KERNEL__ -DLINUX -I/lib/modules/2.4.18-6mdk/build/include/ hello.o: hello.c $(CC) $(MODCFLAGS) -c hello.c CC=gcc MODCFLAGS := -Wall -DMODULE -D__KERNEL__ -DLINUX hello.o: start.o stop.o ld -m elf_i386 -r -o hello.o start.o sto

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档