LDFLAGS needs to be set, or the final library produced won't have dependency on the parser(expat/libxml2).
Someone has fixed the issue on SSL linking(ac886a156a), and the parser should be linked as well. Thus it will confuse the packager manager's dependency generator(At least RPM).
And, this commit also correct the usage of libtool file cflags and ldflags introduced from the commit mentioned above, as they are not the same terminology.
60 lines
1.8 KiB
Makefile
60 lines
1.8 KiB
Makefile
AUTOMAKE_OPTIONS = subdir-objects
|
|
|
|
AM_CFLAGS = -g -Wall
|
|
|
|
PARSER_CFLAGS=@PARSER_CFLAGS@
|
|
PARSER_LIBS=@PARSER_LIBS@
|
|
|
|
SSL_LIBS = -lssl -lcrypto -lz
|
|
|
|
STROPHE_FLAGS = -I$(top_srcdir)
|
|
STROPHE_LIBS = -lstrophe $(PARSER_LIBS) $(SSL_LIBS)
|
|
|
|
## Main build targets
|
|
lib_LTLIBRARIES = libstrophe.la
|
|
|
|
libstrophe_la_CFLAGS=$(STROPHE_FLAGS) $(PARSER_CFLAGS)
|
|
libstrophe_la_LDFLAGS=$(SSL_LIBS) $(PARSER_LIBS)
|
|
libstrophe_la_SOURCES = src/auth.c src/conn.c src/ctx.c \
|
|
src/event.c src/handler.c src/hash.c \
|
|
src/jid.c src/md5.c src/sasl.c src/sha1.c \
|
|
src/snprintf.c src/sock.c src/stanza.c src/thread.c \
|
|
src/tls_openssl.c src/util.c \
|
|
src/common.h src/hash.h src/md5.h src/ostypes.h src/parser.h \
|
|
src/sasl.h src/sha1.h src/sock.h src/thread.h src/tls.h src/util.h
|
|
|
|
if PARSER_EXPAT
|
|
libstrophe_la_SOURCES += src/parser_expat.c
|
|
else
|
|
libstrophe_la_SOURCES += src/parser_libxml2.c
|
|
endif
|
|
|
|
include_HEADERS = strophe.h
|
|
noinst_HEADERS = strophepp.h
|
|
|
|
EXTRA_DIST = docs
|
|
|
|
## Examples
|
|
noinst_PROGRAMS = examples/active examples/roster examples/basic examples/bot
|
|
examples_active_SOURCES = examples/active.c
|
|
examples_active_CFLAGS = $(STROPHE_FLAGS)
|
|
examples_active_LDADD = $(STROPHE_LIBS)
|
|
examples_roster_SOURCES = examples/roster.c
|
|
examples_roster_CFLAGS = $(STROPHE_FLAGS)
|
|
examples_roster_LDADD = $(STROPHE_LIBS)
|
|
examples_basic_SOURCES = examples/basic.c
|
|
examples_basic_CFLAGS = $(STROPHE_FLAGS)
|
|
examples_basic_LDADD = $(STROPHE_LIBS)
|
|
examples_bot_SOURCES = examples/bot.c
|
|
examples_bot_CFLAGS = $(STROPHE_FLAGS)
|
|
examples_bot_LDADD = $(STROPHE_LIBS)
|
|
|
|
|
|
## Tests
|
|
TESTS = tests/check_parser
|
|
check_PROGRAMS = tests/check_parser
|
|
tests_check_parser_SOURCES = tests/check_parser.c tests/test.h
|
|
tests_check_parser_CFLAGS = @check_CFLAGS@ $(PARSER_CFLAGS) $(STROPHE_FLAGS) \
|
|
-I$(top_srcdir)/src
|
|
tests_check_parser_LDADD = @check_LIBS@ $(STROPHE_LIBS)
|