makefile

来自「philips公司ISP1362 USB OTG控制芯片的驱动」· 代码 · 共 63 行

TXT
63
字号
#This is for 1362 OTG Controller

TOPDIR := $(shell cd ../..; pwd)
include $(TOPDIR)/Rules.make

SRC = usb_phci.c

ifdef OTGFLAG
SRC += otg_hub.c
endif

#Mandatory Flags
CFLAGS += -D__KERNEL__ $(OTGFLAG) $(KERN_MOD_FLAGS) -DCONFIG_PROC_FS
#-DKBUILD_BASENAME=phci

CFLAGS += -I$(INCLUDEDIR) -I$(HAL_INCL_DIR) 

ifdef PHCI_DEBUG
CFLAGS += $(DEBUG_FLAG)
endif

#Optional Flags
#Interrupt Endpoint even scheduling	CONFIG_USB_PHCD_EVEN_SCH
CFLAGS += -DCONFIG_USB_PHCD_EVEN_SCH

#For testing Paired Ptd mechanism CONFIG_USB_PHCD_PING_PONG 
#test with only one bulk device
CFLAGS += -DCONFIG_USB_PHCD_PING_PONG

#	DMA related flags
#	Use of this for data transfer between CPU and ISP1362 might not find
# 	improvement in speed under this implementation for ISA (needs to copy
#	the data from buffer to/from DMA buffer). Could be used as a sample code.
#CFLAGS += -DCONFIG_USB_PHCD_DMA

# Memory related flags
CFLAGS += -DCONFIG_PHCI_MEM_SLAB


OBJ = $(SRC:.c=.o)

TARGET = phci.o

all: .depend $(TARGET)

$(TARGET): $(OBJ)
	$(LD) -r $^ -o $@
	
install: 
#	install -d $(KERN_INSTALL_DIR)
#	install -c $(TARGET) $(KERN_INSTALL_DIR)
	cp $(TARGET) $(OBJ_INSTALL_DIR)
clean:
	rm -f $(TARGET) $(OBJ) core .depend

depend .depend dep:
	$(CC) $(CFLAGS) -M *.c > $@


ifeq (.depend,$(wildcard .depend))
include .depend
endif

⌨️ 快捷键说明

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