mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-04-02 15:27:49 +08:00
use an intermediate protobuf library for the included protobuf sources
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -50,6 +50,7 @@ src/ocpasswd-args.h
|
||||
src/ocpasswd-args.c
|
||||
src/libcmd-ocpasswd.a
|
||||
src/libcmd-ocserv.a
|
||||
src/protobuf/libprotobuf.a
|
||||
src/ipc.pb-c.c
|
||||
src/ipc.pb-c.h
|
||||
src/ctl.pb-c.c
|
||||
|
||||
@@ -479,6 +479,7 @@ AC_CONFIG_FILES([
|
||||
src/occtl/Makefile
|
||||
src/ocpasswd/Makefile
|
||||
src/pcl/Makefile
|
||||
src/protobuf/Makefile
|
||||
doc/Makefile
|
||||
gl/Makefile
|
||||
tests/docker-ocserv/Makefile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUBDIRS = occtl ocpasswd
|
||||
SUBDIRS =
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/../gl/ -I$(builddir)/../gl/ \
|
||||
-I$(srcdir)/ -I$(builddir)/../ -I$(srcdir)/../ $(LIBOPTS_CFLAGS) \
|
||||
@@ -47,11 +47,6 @@ ocserv-args.c: $(srcdir)/ocserv-args.def $(builddir)/version.inc
|
||||
$(AUTOGEN) $<
|
||||
ocserv-args.h: ocserv-args.c
|
||||
|
||||
PROTOBUF_SOURCES =
|
||||
if LOCAL_PROTOBUF_C
|
||||
PROTOBUF_SOURCES += protobuf/protobuf-c/protobuf-c.h protobuf/protobuf-c/protobuf-c.c
|
||||
endif
|
||||
|
||||
# Files common to ocserv and occtl.
|
||||
COMMON_SOURCES=common.c common.h system.c system.h
|
||||
|
||||
@@ -79,7 +74,7 @@ ocserv_SOURCES = main.c main-auth.c worker-vpn.c worker-auth.c tlslib.c \
|
||||
proc-search.c proc-search.h http-heads.h ip-util.c ip-util.h \
|
||||
main-ban.c main-ban.h common-config.h base64-helper.c base64-helper.h \
|
||||
str.c str.h gettime.h $(CCAN_SOURCES) $(HTTP_PARSER_SOURCES) \
|
||||
$(PROTOBUF_SOURCES) sec-mod-acct.h setproctitle.c setproctitle.h
|
||||
sec-mod-acct.h setproctitle.c setproctitle.h
|
||||
|
||||
if ENABLE_COMPRESSION
|
||||
ocserv_SOURCES += lzs.c lzs.h
|
||||
@@ -107,6 +102,13 @@ SUBDIRS += pcl
|
||||
AM_CPPFLAGS += -I$(srcdir)/pcl/
|
||||
endif
|
||||
|
||||
if LOCAL_PROTOBUF_C
|
||||
SUBDIRS += protobuf
|
||||
ocserv_LDADD += protobuf/libprotobuf.a
|
||||
endif
|
||||
|
||||
SUBDIRS += occtl ocpasswd
|
||||
|
||||
ocserv_SOURCES += main-ctl-unix.c
|
||||
|
||||
ipc.pb-c.c: ipc.proto
|
||||
|
||||
@@ -10,8 +10,12 @@ 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) \
|
||||
print.c json.c json.h $(PROTOBUF_SOURCES)
|
||||
print.c json.c json.h
|
||||
occtl_LDADD = ../../gl/libgnu.a $(LIBREADLINE_LIBS) \
|
||||
$(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS)
|
||||
|
||||
if LOCAL_PROTOBUF_C
|
||||
occtl_LDADD += ../protobuf/libprotobuf.a
|
||||
endif
|
||||
|
||||
occtl_SOURCES += unix.c
|
||||
|
||||
6
src/protobuf/Makefile.am
Normal file
6
src/protobuf/Makefile.am
Normal file
@@ -0,0 +1,6 @@
|
||||
AM_CPPFLAGS = -I$(srcdir)/../gl/ -I$(builddir)/../gl/ \
|
||||
-I$(srcdir)/ -I$(builddir)/../../
|
||||
|
||||
noinst_LIBRARIES = libprotobuf.a
|
||||
libprotobuf_a_SOURCES = protobuf-c/protobuf-c.c protobuf-c/protobuf-c.h
|
||||
|
||||
Reference in New Issue
Block a user