|
刚刚接触uclinux ,关于用libpcap编程的
[复制链接]
编译uclinux的时候,我已经选择了 libpcap 编译进去了
有了/temp/uClinux-dist/lib/libpcap/libpcap.a
makefile:(最简单的那种)
EXEC =pcap
OBJS =pcap.o
SRC =pcap.c
CC =arm-elf-gcc
BASEPATH /temp/uClinux-dist
LIBPATH =$(BASEPATH)/lib
LLIBPATH =$(LIBPATH)/uClibc/lib
INCLUDEPATH =$(BASEPATH)/linux-2.4.x/include
LDFLAGS =-Os -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED
LDLIBS =-I$(LIBPATH)/uClibc/include -I$(LIBPATH)/libm -I$(LIBPATH)/libcrypt_old -I$(BASEPATH) -fno-builtin -nostartfiles -D__PIC__ -fpic -msingle-pic-base -I$(INCLUDEPATH)
LDLIBS_EXEC =-Wl,-elf2flt $(LLIBPATH)/crt0.o $(LLIBPATH)/crti.o $(LLIBPATH)/crtn.o -L$(LIBPATH)/uClibc/. -L$(LLIBPATH) -L$(LIBPATH)/libm -L$(LIBPATH)/libnet -L$(LIBPATH)/libdes -L$(LIBPATH)/libaes -L$(LIBPATH)/libpcap -L$(LIBPATH)/libcrypt_old -L$(LIBPATH)/libssl -L$(LIBPATH)/zlib -lc
LDLIBS_OBJS =-c
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) $(LDLIBS) $(LDLIBS_EXEC) -o $@ $(OBJS)
%.o:%.c
$(CC) $(LDFLAGS) $(LDLIBS) $(LDLIBS_OBJS) $< -o $@
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
======================================
可是我编译的时候,还是找不到libpcap.a
希望大家能提示一下,是哪里搞错了!谢谢大家
|
|