Makefile
上传用户:beauty0755
上传日期:2022-02-24
资源大小:7k
文件大小:2k
- ifneq ($(KERNELRELEASE),)
- mymodule-objs := gpio.o
- obj-m := gpio.o
- else
- TOOL_CHAIN_DIR = /opt/toolchains/atheros_ap71/tools/buildroot/build_armeb/bin
- export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:$(TOOL_CHAIN_DIR)
- PWD := $(shell pwd)
- TOOLPREFIX :=armeb-linux-
- CROSS_COMPILE := armeb-linux-
- CC := $(CROSS_COMPILE)gcc
- STRIP := $(CROSS_COMPILE)strip
- KERNELPATH = ../../kernel/linux/
- CFLAGS := -mbig-endian -D__KERNEL__ -I../../kernel/linux/include -Wall -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale -DMODULE -D__linux -DCPU=XSCALE -DXSCALE=33 -Wno-trigraphs -malignment-traps -msoft-float -mapcs-32 -fno-common -pipe
- #CFLAGS := -mbig-endian -D__KERNEL__ -I../../kernel/linux/include -Wall -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale -DMODULE -D__linux -DCPU=XSCALE -DXSCALE=33 -Wno-trigraphs -malignment-traps -msoft-float -mapcs-32 -fno-common -pipe -Wstrict-prototypes -fno-strict-aliasing -ffreestanding -Os -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mno-thumb-interwork -Wa -Uarm -Wdeclaration-after-statement -D__ixp42X
- CFLAGS += -I ../ixp400_xscale_sw/src/include/ -I ../ixp_osal/include/ -I ../ixp_osal/os/linux/include/core/
- -I ../ixp_osal/include/modules/ioMem/ -I ../ixp_osal/include/modules/bufferMgt/
- -I ../ixp_osal/os/linux/include/modules/bufferMgt/ -I ../ixp_osal/include/platforms/ixp400/
- -I ../ixp_osal/os/linux/include/platforms/ixp400/
- -I ../ixp_osal/os/linux/include/platforms/ixp400/ixp425/
- TARGET = gpio.o
- OBJS = gpio.o
- all: $(TARGET)
- $(MAKE) ARCH=arm CROSS_COMPILE=$(TOOLPREFIX) -C $(KERNELPATH) M=$(PWD)
- gpio.o: gpio.c
- $(CC) $(CFLAGS) -c $<
- clean:
- rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions $(TARGET)
-
- install:
- cp gpio.ko ../../target/lib/
-
- endif