当前位置: 技术问答>linux和unix
静态库与动态库的问题
来源: 互联网 发布时间:2016-10-14
本文导语: OBJS = inventory_live.o CC =/ixp435/xscalegcc/bin/armv5b-linux-gcc VPATH = ../.. INCLUDE_DIRS = /intel_rfid_sdk_notracer/include/ /intel_rfid_sdk_notracer/include/linux /intel_rfid_sdk_notracer/samples/include ...
OBJS = inventory_live.o
CC =/ixp435/xscalegcc/bin/armv5b-linux-gcc
VPATH = ../..
INCLUDE_DIRS = /intel_rfid_sdk_notracer/include/
/intel_rfid_sdk_notracer/include/linux
/intel_rfid_sdk_notracer/samples/include
../../../shared
#INCLUDE_DIRS = ../../../include
../../../../include
../../../../include/linux
INCLUDE_OPTS = ${INCLUDE_DIRS:%=-I%}
LINK_DIRS = /ixp435/xscalegcc/armv5b-linux/lib
/intel_rfid_sdk_notracer/samples/shared/linux/ixp4x5/
/usr/lib
/usr/local/lib
LINK_OPTS = ${LINK_DIRS:%=-L%}
CFLAGS += -Bstatic $(LINK_OPTS) -lpthread -lrt -lstdc++ -lsample_shared
CLINKS +=-Bshared -L/intel_rfid_sdk_notracer/lib/linux/ixp4x5 -lrfid -lcpl -lrfidtx
all: inventory_live
inventory_live: $(OBJS)
$(CC) -o inventory_live $(OBJS) $(CFLAGS) $(CLINKS) # -lpthread -lrt -lstdc++ -lrfid -lcpl -lrfidtx
%.o: %.c
$(CC) -Wall -DCOMPILE_BIG_ENDIAN $(INCLUDE_OPTS) -c $
CC =/ixp435/xscalegcc/bin/armv5b-linux-gcc
VPATH = ../..
INCLUDE_DIRS = /intel_rfid_sdk_notracer/include/
/intel_rfid_sdk_notracer/include/linux
/intel_rfid_sdk_notracer/samples/include
../../../shared
#INCLUDE_DIRS = ../../../include
../../../../include
../../../../include/linux
INCLUDE_OPTS = ${INCLUDE_DIRS:%=-I%}
LINK_DIRS = /ixp435/xscalegcc/armv5b-linux/lib
/intel_rfid_sdk_notracer/samples/shared/linux/ixp4x5/
/usr/lib
/usr/local/lib
LINK_OPTS = ${LINK_DIRS:%=-L%}
CFLAGS += -Bstatic $(LINK_OPTS) -lpthread -lrt -lstdc++ -lsample_shared
CLINKS +=-Bshared -L/intel_rfid_sdk_notracer/lib/linux/ixp4x5 -lrfid -lcpl -lrfidtx
all: inventory_live
inventory_live: $(OBJS)
$(CC) -o inventory_live $(OBJS) $(CFLAGS) $(CLINKS) # -lpthread -lrt -lstdc++ -lrfid -lcpl -lrfidtx
%.o: %.c
$(CC) -Wall -DCOMPILE_BIG_ENDIAN $(INCLUDE_OPTS) -c $