mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
ccan: build as an included library
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -74,3 +74,4 @@ tests/ipv6-prefix
|
||||
src/http-heads.h
|
||||
tests/kkdcp-parsing
|
||||
tests/json-escape
|
||||
src/ccan/libccan.a
|
||||
|
||||
@@ -478,6 +478,7 @@ AC_CONFIG_FILES([
|
||||
src/Makefile
|
||||
src/occtl/Makefile
|
||||
src/ocpasswd/Makefile
|
||||
src/ccan/Makefile
|
||||
src/pcl/Makefile
|
||||
src/protobuf/Makefile
|
||||
doc/Makefile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUBDIRS =
|
||||
SUBDIRS = ccan
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/../gl/ -I$(builddir)/../gl/ \
|
||||
-I$(srcdir)/ -I$(builddir)/../ -I$(srcdir)/../ $(LIBOPTS_CFLAGS) \
|
||||
@@ -15,8 +15,7 @@ BUILT_SOURCES = ocserv-args.c ocserv-args.h ipc.pb-c.c ipc.pb-c.h \
|
||||
|
||||
include common.mk
|
||||
|
||||
EXTRA_DIST = ccan/licenses/BSD-MIT version.inc.in \
|
||||
ccan/licenses/CC0 ccan/licenses/LGPL-2.1 version.inc \
|
||||
EXTRA_DIST = version.inc.in version.inc \
|
||||
ipc.proto ctl.proto http-heads.gperf common.mk
|
||||
|
||||
if LOCAL_HTTP_PARSER
|
||||
@@ -29,17 +28,6 @@ endif
|
||||
|
||||
sbin_PROGRAMS = ocserv
|
||||
|
||||
CCAN_SOURCES = ccan/build_assert/build_assert.h ccan/check_type/check_type.h \
|
||||
ccan/container_of/container_of.h ccan/hash/hash.c ccan/hash/hash.h \
|
||||
ccan/htable/htable.c ccan/htable/htable.h ccan/htable/htable_type.h \
|
||||
ccan/list/list.c ccan/list/list.h
|
||||
|
||||
if LOCAL_TALLOC
|
||||
CCAN_SOURCES += ccan/talloc/talloc.c ccan/talloc/talloc.h ccan/compiler/compiler.h \
|
||||
ccan/typesafe_cb/typesafe_cb.h
|
||||
endif
|
||||
|
||||
|
||||
noinst_LIBRARIES = libcmd-ocserv.a
|
||||
libcmd_ocserv_a_SOURCES = ocserv-args.def ocserv-args.c ocserv-args.h
|
||||
|
||||
@@ -86,7 +74,7 @@ endif
|
||||
|
||||
ocserv_SOURCES += ipc.pb-c.h ipc.pb-c.c ctl.pb-c.c ctl.pb-c.h
|
||||
|
||||
ocserv_LDADD = ../gl/libgnu.a $(NEEDED_LIBOPTS) libcmd-ocserv.a
|
||||
ocserv_LDADD = ../gl/libgnu.a $(NEEDED_LIBOPTS) libcmd-ocserv.a ccan/libccan.a
|
||||
ocserv_LDADD += $(LIBGNUTLS_LIBS) $(PAM_LIBS) $(LIBUTIL) \
|
||||
$(LIBSECCOMP) $(LIBWRAP) $(LIBCRYPT) $(NEEDED_HTTP_PARSER_LIBS) \
|
||||
$(LIBPROTOBUF_C_LIBS) $(LIBSYSTEMD) $(LIBTALLOC_LIBS) \
|
||||
|
||||
14
src/ccan/Makefile.am
Normal file
14
src/ccan/Makefile.am
Normal file
@@ -0,0 +1,14 @@
|
||||
AM_CPPFLAGS = -I$(srcdir)/ -I$(builddir)/../ -I$(srcdir)/../
|
||||
|
||||
EXTRA_DIST = licenses/BSD-MIT licenses/CC0 licenses/LGPL-2.1
|
||||
|
||||
noinst_LIBRARIES = libccan.a
|
||||
libccan_a_SOURCES = build_assert/build_assert.h check_type/check_type.h \
|
||||
container_of/container_of.h hash/hash.c hash/hash.h \
|
||||
htable/htable.c htable/htable.h htable/htable_type.h \
|
||||
list/list.c list/list.h
|
||||
|
||||
if LOCAL_TALLOC
|
||||
libccan_a_SOURCES += talloc/talloc.c talloc/talloc.h compiler/compiler.h \
|
||||
typesafe_cb/typesafe_cb.h
|
||||
endif
|
||||
@@ -2,6 +2,10 @@ AM_CPPFLAGS = -I$(srcdir)/../../gl/ -I$(builddir)/../../gl/ \
|
||||
-I$(srcdir)/ -I$(srcdir)/../ -I$(builddir)/../../ -I$(builddir)/../ \
|
||||
$(LIBNL3_CFLAGS) $(LIBPROTOBUF_C_CFLAGS) $(LIBTALLOC_CFLAGS)
|
||||
|
||||
if LOCAL_TALLOC
|
||||
AM_CPPFLAGS += -I$(srcdir)/../ccan/talloc
|
||||
endif
|
||||
|
||||
EXTRA_DIST = args.def
|
||||
|
||||
bin_PROGRAMS = occtl
|
||||
@@ -9,10 +13,10 @@ bin_PROGRAMS = occtl
|
||||
COMMON_SOURCES=../common.c ../common.h
|
||||
|
||||
occtl_SOURCES = occtl.c pager.c occtl.h time.c cache.c ip-cache.c \
|
||||
nl.c ctl.h ../ctl.pb-c.c ../ctl.pb-c.h $(CCAN_SOURCES) $(COMMON_SOURCES) \
|
||||
nl.c ctl.h ../ctl.pb-c.c ../ctl.pb-c.h $(COMMON_SOURCES) \
|
||||
print.c json.c json.h
|
||||
occtl_LDADD = ../../gl/libgnu.a $(LIBREADLINE_LIBS) \
|
||||
$(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS)
|
||||
$(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS) ../ccan/libccan.a
|
||||
|
||||
if LOCAL_PROTOBUF_C
|
||||
occtl_LDADD += ../protobuf/libprotobuf.a
|
||||
|
||||
Reference in New Issue
Block a user