Makefile.am创建一个空的D库

时间:2018-12-29 07:01:21

标签: makefile d automake

我正在尝试使用此.d通过一组D(Makefile.am扩展名)文件创建共享库:

https://github.com/vporton/redland-bindings/blob/da988c6758f7d0ced35bb87d9e5883143618b348/dlang/Makefile.am

SUFFIXES: .d
.d.o:
#   $(DC) -od=$(srcdir)/src/$(dir $<) -c $(DFLAGS) -Isrc $<
    $(DC) -of=$@ -c $(DFLAGS) -Isrc $<

#lib_LIBRARIES = librdf-dlang.a
AM_DEFAULT_SOURCE_EXT = .d
librdf_dlang_la_LIBADD = @LIBOBJS@
librdf_dlang_la_SOURCES = \
    src/rdf/auxiliary/handled_record.d

lib_LTLIBRARIES = librdf-dlang.la

#librdf_dlang_la_LDFLAGS =
rdf_test_LINK = $(DC)
rdf_test_LDADD = $(D_LDFLAGS) -L=-L.libs -L=-lrdf-dlang
#rdf_test_LDADD = -lphobos
rdf_test_SOURCES = src/rdf_test.d

TESTS = rdf_test
check_PROGRAMS  = rdf_test

相反,它创建了一个空库:

/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2   -o librdf-dlang.la -rpath /usr/local/lib   
libtool: link: gcc -shared  -fPIC -DPIC    -g -O2   -Wl,-soname -Wl,librdf-dlang.so.0 -o .libs/librdf-dlang.so.0.0.0
libtool: link: (cd ".libs" && rm -f "librdf-dlang.so.0" && ln -s "librdf-dlang.so.0.0.0" "librdf-dlang.so.0")
libtool: link: (cd ".libs" && rm -f "librdf-dlang.so" && ln -s "librdf-dlang.so.0.0.0" "librdf-dlang.so")
libtool: link: ar cru .libs/librdf-dlang.a 
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/librdf-dlang.a
libtool: link: ( cd ".libs" && rm -f "librdf-dlang.la" && ln -s "../librdf-dlang.la" "librdf-dlang.la" )

请帮助我编译我的库。

0 个答案:

没有答案