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

📄 makefile.txt

📁 Linux块设备驱动分析与模拟实现
💻 TXT
字号:
  1 #
  2 # Makefile for the kernel block device drivers.
  3 #
  4 # Note! Dependencies are done automagically by 'make dep', which also
  5 # removes any old dependencies. DON'T put your own dependencies here
  6 # unless it's something special (ie not a .c file).
  7 #
  8 # Note 2! The CFLAGS definition is now inherited from the
  9 # parent makefile.
 10 #
 11 
 12 .c.s:
 13         $(CC) $(CFLAGS) -S $<
 14 .s.o:
 15         $(AS) -c -o $*.o $<
 16 .c.o:
 17         $(CC) $(CFLAGS) -c $<
 18 
 19 #
 20 # Note : at this point, these files are compiled on all systems. 
 21 # In the future, some of these should be built conditionally.
 22 #
 23 
 24 OBJS := ll_rw_blk.o floppy.o ramdisk.o genhd.o 
 25 SRCS := ll_rw_blk.c floppy.c ramdisk.c genhd.c 
 26 
 27 ifdef CONFIG_CDU31A
 28 OBJS := $(OBJS) cdu31a.o
 29 SRCS := $(SRCS) cdu31a.c
 30 endif
 31 
 32 ifdef CONFIG_MCD
 33 OBJS := $(OBJS) mcd.o
 34 SRCS := $(SRCS) mcd.c
 35 endif
 36 
 37 ifdef CONFIG_SBPCD
 38 OBJS := $(OBJS) sbpcd.o
 39 SRCS := $(SRCS) sbpcd.c
 40 endif #CONFIG_SBPCD
 41 
 42 ifdef CONFIG_BLK_DEV_HD
 43 OBJS := $(OBJS) hd.o
 44 SRCS := $(SRCS) hd.c
 45 endif
 46 
 47 ifdef CONFIG_BLK_DEV_XD
 48 OBJS := $(OBJS) xd.o
 49 SRCS := $(SRCS) xd.c
 50 endif
 51 
 52 all: block.a
 53 
 54 block.a: $(OBJS)
 55         rm -f block.a
 56         $(AR) rcs block.a $(OBJS)
 57         sync
 58 
 59 dep:
 60         $(CPP) -M $(SRCS) > .depend
 61 
 62 dummy:
 63 
 64 #
 65 # include a dependency file if one exists
 66 #
 67 ifeq (.depend,$(wildcard .depend))
 68 include .depend
 69 endif

⌨️ 快捷键说明

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