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

📄 makefile

📁 8250/16550串口芯片在Linux下的驱动(Ver5.5)
💻
字号:
## Makefile for the standalone serial driver########################################################### Begin user configuration section here########################################################## Set this to the root of your kernel source tree.  This must match # the version of the kernel for which you are building the serial driver# as the modules version information and the header files must match.# The serial.ver file is also installed into this kernel source tree on a# "make install"#LINUX_SRC=	/usr/src/linux# Change this to reflect the appropriate architecure for your system# (i.e., I386_FLAGS, PPC_FLAGS, etc.)#ARCH_FLAGS=    $(I386_FLAGS)# Define the serial driver options as appropriate .# See serial.c for more information.#CONFIG_FLAGS=	-DCONFIG_SERIAL_MANY_PORTS -DCONFIG_SERIAL_MULTIPORT########################################################## End user configuration section here#########################################################SERIALVERSION=	5.05INCL_FLAGS=	-I. -I$(LINUX_SRC)/includeDEF_FLAGS=	-D__KERNEL__ -DLINUX -DLOCAL_HEADERS -DEXPORT_SYMTAB ## Architecture specific flags go here....#I386_FLAGS=	-m486 -O2 -Wall PPC_FLAGS=	-Wall -Wstrict-prototypes -O2 -fomit-frame-poin\ter \			-D__powerpc__ \			-fsigned-char -msoft-float -pipe -fno-builtin \			-ffixed-r2 -Wno-uninitialized -mmultiple -mstringBASE_FLAGS=	$(ARCH_FLAGS) $(INCL_FLAGS) $(DEF_FLAGS) $(CONFIG_FLAGS) \			`cat .smpflag` -DMODULECFLAGS=		$(BASE_FLAGS) `cat .modflag`GENKSYM_FLAGS=	$(BASE_FLAGS) -D__GENKSYMS__LDFLAGS= 	-s -N CC=		gccGENKSYMS=	genksymsVERFILE=	$(LINUX_SRC)/include/linux/modules/serial.verMODVERFILE=	$(LINUX_SRC)/include/linux/modversions.hDEP_HEADERS=	serial.h serialP.h serial_compat.h \			$(LINUX_SRC)/include/linux/version.hall: test_version maybe_modules serial.o test_version:	@LINUX_SRC=$(LINUX_SRC) NAME="serial" CHK_OBJS=serial.o \	sh ./test_version.sh	@if [ ! -f $(LINUX_SRC)/include/linux/circ_buf.h ]; then \		echo "circ_buf.h doesn't exist, using local copy." ; \		mkdir -p linux ; cp circ_buf.h linux ; \	fimaybe_modules:	@if test -s .modflag ; then \		make modversions.h serial.ver ; \	fiinstall:	@LINUX_SRC=$(LINUX_SRC) sh ./setup.shclean:	rm -f serial.o *~ .kver serial.ver modversions.h serial.s core	rm -rf linuxreally-clean: clean	rm -f *.o .smpflag .modflagserial.o: serial.c $(DEP_HEADERS)	@echo $(CC) $(CFLAGS) -c serial.c -o serial.o ; \	$(CC) $(CFLAGS) -c serial.c -o serial.o	@syncserial.s: serial.c $(DEP_HEADERS)	@echo $(CC) $(CFLAGS) -S serial.c ; \	$(CC) $(CFLAGS) -S serial.cserial.ver: serial.c $(DEP_HEADERS)	@echo "Generating serial.ver..." ; \	if test -s .smpflag ; then smp_prefix="-p smp_"; \	else smp_prefix=; fi; \	kver=`sed -e 's/-SMP//' -e 's/-MOD//' .kver` ; \	$(CC) $(GENKSYM_FLAGS) -E serial.c > serial.tmp ; \	echo $(CC) $(GENKSYM_FLAGS) -E serial.c \> serial.tmp; \	case $$kver in \	2.0.*)	echo $(GENKSYMS) . < serial.tmp ; \		$(GENKSYMS) . < serial.tmp ;; \	2.[1234].*) echo $(GENKSYMS) $$smp_prefix -k $$kver \< serial.tmp ; \		$(GENKSYMS) $$smp_prefix -k $$kver < serial.tmp \			> serial.ver ;; \	*)      echo "Unsupported kernel version $$kver" ;; \	esac ; rm -f serial.tmp ; echo rm -f serial.tmp ; \	mkdir -p linux/modules ; cp serial.ver linux/modules ; \modversions.h: $(MODVERFILE)	@if ! grep -q /serial.ver $(MODVERFILE) ; then \		sed -f modversions.sed < $(MODVERFILE) > modversions.tmp ; \	else \		cp $(MODVERFILE) modversions.tmp ; \	fi ; \	if ! test -f modversions.h || \	   ! cmp -s modverisions.h modversions.tmp ; then \		echo "Generating modversions.h" ; \		mv modversions.tmp modversions.h ; \		mkdir -p linux ; cp modversions.h linux ; \	else rm -f modversions.tmp ; fiSRCROOT = `echo serial-$(SERIALVERSION) | sed -e 's/-WIP//' \			-e 's/pre-//' -e 's/-PLUS//'`TAR=tar.exclude-file: Makefile	a=$(SRCROOT); \	(cd .. ; find serial \( -name \*~ -o -name \*.orig -o -name \*.o \		-o -name CVS -o -name \*.rej -o -name \*.ver \		-o -name TODO -o -name changed-files -o -name .#\* \) \		-print) | sed -e "s/serial/$$a/" > .exclude-file	echo "$(SRCROOT)/Attic" >> .exclude-file	echo "$(SRCROOT)/linux" >> .exclude-file	echo "$(SRCROOT)/.kver" >> .exclude-file	echo "$(SRCROOT)/.smpflag" >> .exclude-file	echo "$(SRCROOT)/.modflag" >> .exclude-file	echo "$(SRCROOT)/.exclude-file" >> .exclude-file	echo "$(SRCROOT)/modversions.h" >> .exclude-filesource_tar_file: .exclude-file	(cd ..; a=$(SRCROOT); rm -f $$a ; ln -sf serial $$a ; \		$(TAR) -c -h -v -f - \			-X $$a/.exclude-file $$a | \		gzip -9 > serial-$(SERIALVERSION).tar.gz)	rm -f .exclude-file

⌨️ 快捷键说明

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