From liuw at supermicro.com Fri Sep 23 18:39:47 2011 From: liuw at supermicro.com (Liu Wang) Date: Fri, 23 Sep 2011 18:39:47 -0700 Subject: [buug] How to tell cc compiler to put -o object file freeBSD_main.o in my ./freeBSD directory ? Or how to tell ld linker to search freeBSD_main.o in my home directory /home/Liu/AOC ? Message-ID: <09F85D53A2F0C547BF5E05E214DB880A23C816A805@MAIL5.supermicro.com> Any help would be appreciated ! I am writing a FreeBSD driver module. How to tell cc compiler to put -o object file freeBSD_main.o in my ./freeBSD directory ? Or how to tell ld linker to search freeBSD_main.o in my home directory /home/Liu/AOC ? -------------- [Liuw]# pwd /home/Liu/AOC ----------------------- [Liuw]# cat AOCMakefile # # Makefile # AOC # FreeBSD # Ver:0.1 # Liu Wang # # kernel module KMOD = AOC # Enumerate source files for kernel module SRCS = freeBSD/freeBSD_main.c .include -------------------------------------------- [Liuw]# ls freeBSD/ ... freeBSD_main.c ... ----------------------------------------------------------------- [Liuw]# make -f AOCMakefile Warning: Object directory not changed from original /home/Liu/AOC cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c freeBSD/freeBSD_main.c ld -d -warn-common -r -d -o AOC_SAS2LP_MV8.kld freeBSD/freeBSD_main.o ld: freeBSD/freeBSD_main.o: No such file: No such file or directory *** Error code 1 Stop in /home/Liu/AOC. Sincerely, Liu Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: