📄 makefile
字号:
## Makefile for the kernel block device drivers.## Note! Dependencies are done automagically by 'make dep', which also# removes any old dependencies. DON'T put your own dependencies here# unless it's something special (ie not a .c file).## Note 2! The CFLAGS definition is now inherited from the# parent makefile.#all: links first_ruleL_TARGET := block.aL_OBJS := ll_rw_blk.o genhd.oM_OBJS :=MOD_LIST_NAME := BLOCK_MODULESLK = README.fd README.hd README.ide README.md \ ide_modes.h ide-cd.c ide-tape.c ide-tape.h \ linear.c loop.c md.c raid0.c raid1.c raid5.c rd.c# Architecture dependenciesifeq ($(MACHINE),arc) FLOPPY = fd1772.o fd1772dma.o FLOPPYMOD = fd1772_mod.oendififeq ($(MACHINE),a5k) FLOPPY = floppy.o FLOPPYMOD = floppy.oendififeq ($(MACHINE),rpc) FLOPPY = floppy.o FLOPPYMOD = floppy.oendif# Common dependenciesifdef FLOPPY ifeq ($(CONFIG_BLK_DEV_FD),y) L_OBJS += $(FLOPPY) else ifeq ($(CONFIG_BLK_DEV_FD),m) M_OBJS += $(FLOPPYMOD) endif endifendififeq ($(CONFIG_BLK_DEV_PART),y) L_OBJS += adfspart.oendififeq ($(CONFIG_BLK_DEV_RAM),y) L_OBJS += rd.oelse ifeq ($(CONFIG_BLK_DEV_RAM),m) M_OBJS += rd.o endifendififeq ($(CONFIG_BLK_DEV_LOOP),y) L_OBJS += loop.oelse ifeq ($(CONFIG_BLK_DEV_LOOP),m) M_OBJS += loop.o endifendififeq ($(CONFIG_BLK_DEV_HD),y) L_OBJS += hd.oendififeq ($(CONFIG_BLK_DEV_IDE),y) L_OBJS += ide.oendififeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),y) L_OBJS += ide-ics.oelse ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),m) M_OBJS += ide-ics.o endifendififeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),y) L_OBJS += ide-rapide.oelse ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),m) M_OBJS += ide-rapide.o endifendififeq ($(CONFIG_BLK_DEV_IDECD),y) L_OBJS += ide-cd.oendififeq ($(CONFIG_BLK_DEV_IDETAPE),y) L_OBJS += ide-tape.oendififeq ($(CONFIG_BLK_DEV_IDEFLOPPY),y)L_OBJS += ide-floppy.oendififeq ($(CONFIG_BLK_DEV_XD),y) L_OBJS += mfmhd.o mfm.oelse ifeq ($(CONFIG_BLK_DEV_XD),m) M_OBJS += mfmhd_mod.o endifendififeq ($(CONFIG_BLK_DEV_MD),y)LX_OBJS += md.oifeq ($(CONFIG_MD_LINEAR),y)L_OBJS += linear.oelse ifeq ($(CONFIG_MD_LINEAR),m) M_OBJS += linear.o endifendififeq ($(CONFIG_MD_STRIPED),y)L_OBJS += raid0.oelse ifeq ($(CONFIG_MD_STRIPED),m) M_OBJS += raid0.o endifendififeq ($(CONFIG_MD_MIRRORING),y)L_OBJS += raid1.oelse ifeq ($(CONFIG_MD_MIRRORING),m) M_OBJS += raid1.o endifendififeq ($(CONFIG_MD_RAID5),y)L_OBJS += raid5.oelse ifeq ($(CONFIG_MD_RAID5),m) M_OBJS += raid5.o endifendifendifinclude $(TOPDIR)/Rules.makefastdep: linksfd1772_mod.o: $(FLOPPY) ld -r -o $@ $(FLOPPY)mfmhd_mod.o: mfmhd.o mfm.o ld -r -o $@ mfmhd.o mfm.o.PHONY: linkslinks: -@for f in $(LK); do \ if [ ! -e $$f ]; then \ echo "ln -s ../../../../drivers/block/$$f ."; \ ln -s ../../../../drivers/block/$$f .; \ fi; \ donemrproper: -@for f in $(LK); do \ if [ -L $$f ]; then \ echo $(RM) $$f; \ $(RM) $$f; \ elif [ -f $$f ]; then \ echo not removing $$f; \ fi; \ done%.o: %.S $(CC) $(CFLAGS) -E $< | tr ';$$' '\n#' > ..tmp.s $(CC) $(CFLAGS) -c -o $@ ..tmp.s $(RM) ..tmp.s
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -