我想用我在裏面創建的自定義包來編譯OpenWRT。這裏是的OpenWRT的Makefile我的包:包缺少庫的依賴關係 - OpenWRT
#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=amld
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/amld
SECTION:=utils
CATEGORY:=Utilities
TITLE:=amld -- prints a snarky message
DEPENDS:=+libssl +libcrypto +librt
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
endef
define Package/amld/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/amld $(1)/bin/
endef
$(eval $(call BuildPackage,amld))
我編譯時出現以下錯誤:
Package amld is missing dependencies for the following libraries:
libcrypto.so.1.0.0
librt.so.0
libssl.so.1.0.0
我不確定什麼補充,沒有任何人有什麼想法?由於
編輯
這裏是我的Makefile我的包:
LDFLAGS=-lssl -lcrypto -lrt
CFLAGS=-g -I /usr/lib/i386-linux-gnu
all: amlpkcs12 amld
amlpkcs12:amlpkcs12.o
$(CC) amlpkcs12.o -g -o amlpkcs12 $(LDFLAGS)
amld: amld.o iot.o bridge.o sysconf.o
$(CC) bridge.o iot.o amld.o sysconf.o -g -o amld $(LDFLAGS)
amlpkcs12.o: amlpkcs12.c
$(CC) $(CFLAGS) -c amlpkcs12.c
amld.o: amld.c
$(CC) $(CFLAGS) -c -g -DVERSION=\"1.0\" amld.c
sysconf.o: sysconf.c sysconf.h
$(CC) $(CFLAGS) -c sysconf.c
bridge.o:bridge.c bridge.h iot.h
$(CC) $(CFLAGS) -c bridge.c
iot.o: iot.c iot.h
$(CC) $(CFLAGS) -c -g iot.c
clean:
rm *.o amlpkcs12 amld
更新
也看到我的問題和回答here,如果你仍然有問題。
爲什麼你需要這個'-I/usr/lib/i386-linux-gnu'? AFAIK你應該只使用OpenWrt提供的頭文件。 – yegorich
嘗試'DEPENDS:= + libopenssl',就像** openssh **包一樣。 – yegorich
試過@yegorich,沒有運氣:[ – TomSelleck