我有一个目录结构
树干
--lib--libParser.a
--对象
--src
--生成文件
我有以下生成文件
CRYPTOLIB_TARGET = cryptolib.a
LOCALLIBS = ./objs
LOCALLIBS_IMAGE = ./cryptolib.a
CC = gcc
AR = ar
DEBUG_FLAGS =
LDEFSECOM_LOG_VERSION = -DSECOM_LOG_VERSION
CMPL_TIME_MACROS = -DENBL_DEBUG_PRINTF $(LDEFSECOM_LOG_VERSION)
ALLWARN =
ALL_INCS = -I./src/INCLUDE
LIBS = -lrt -laio -lrt -lpthread -lm -lpq -ldl
LINK = $(CC) $(DEBUG_FLAGS) $(CMPL_TIME_MACROS) $(ALLWARN) $(ALL_INCS) $(LIBS) -c
default = CRYPTOLIB_TARGET
CRYPTOLIB_OBJ = \
$(LOCALLIBS)/AES_crypt.o \
$(LOCALLIBS)/bigdigits.o \
$(LOCALLIBS)/DataEncryption.o \
$(LOCALLIBS)/SiaEncryption.o
$(CRYPTOLIB_TARGET): $(CRYPTOLIB_OBJ)
$(AR) r $(CRYPTOLIB_TARGET) $(CRYPTOLIB_OBJ)
$(LOCALLIBS)/AES_crypt.o : \
src/AES_crypt.c
mkdir -p ./objs
$(LINK) src/AES_crypt.c -o $(LOCALLIBS)/AES_crypt.o
$(LOCALLIBS)/bigdigits.o : \
src/bigdigits.c
$(LINK) src/bigdigits.c -o $(LOCALLIBS)/bigdigits.o
$(LOCALLIBS)/DataEncryption.o : \
src/DataEncryption.c
$(LINK) src/DataEncryption.c -o $(LOCALLIBS)/DataEncryption.o
$(LOCALLIBS)/SiaEncryption.o : \
src/SiaEncryption.c
$(LINK) src/SiaEncryption.c -o $(LOCALLIBS)/SiaEncryption.o
clean:
rm -rf objs
rm -rf cryptolib.a
我想将 libParser.a 包含在我正在创建的输出库中,但我不知道该怎么做。您能否给我一些指示,以便我可以包含库(libParser.a)并创建 cryptolib.a 作为最终输出库。