/********************************** Makefile_arm ********************************************************/
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
else
KDIR :=/opt/FriendlyARM/mini2440/linux-2.6.32.2/
all:
make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-
clean:
rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif
/********************************** Makefile_x86 ********************************************************/
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
else
KDIR := /lib/modules/2.6.27.5-117.fc10.i686/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif
/********************************** Makefile_my_app ********************************************************/
TOOL_PATH=/opt/FriendlyARM/toolschain/arm-2012q2/bin
CROSS=arm-none-linux-gnueabi-
#CROSS=
CFLAGS = -Wall -O3
all: x86_test arm_test
x86_test: test.c
gcc $(CFLAGS) -g -o x86_test test.c
arm_test:test.c
$(CROSS)gcc $(CFLAGS) -g -lEMFU_ARM_ODM -o arm_test test.c
clean:
@rm -vf x86_test arm_test *.o *~