occtl and ocpasswd were moved into separate directories

This commit is contained in:
Nikos Mavrogiannopoulos
2015-10-28 14:46:09 +01:00
committed by Nikos Mavrogiannopoulos
parent 4dd2fdf7b6
commit 4ae1c3e2ff
18 changed files with 70 additions and 46 deletions

View File

@@ -470,6 +470,8 @@ AC_CONFIG_FILES([
Makefile
src/version.inc
src/Makefile
src/occtl/Makefile
src/ocpasswd/Makefile
src/pcl/Makefile
doc/Makefile
gl/Makefile

View File

@@ -10,12 +10,12 @@ ocserv.8: ../src/ocserv-args.def
@AUTOGEN@ -L../src -DMAN_SECTION=8 -Tagman-cmd.tpl "$<".tmp && \
rm -f "$<".tmp
occtl.8: ../src/occtl-args.def
occtl.8: ../src/occtl/args.def
-$(SED) 's/@subheading \(.*\)/@*\n@var{\1}\n@*/' $< > "$<".tmp && \
@AUTOGEN@ -L../src -DMAN_SECTION=8 -Tagman-cmd.tpl "$<".tmp && \
rm -f "$<".tmp
ocpasswd.8: ../src/ocpasswd-args.def
ocpasswd.8: ../src/ocpasswd/args.def
-$(SED) 's/@subheading \(.*\)/@*\n@var{\1}\n@*/' $< > "$<".tmp && \
@AUTOGEN@ -L../src -DMAN_SECTION=8 -Tagman-cmd.tpl "$<".tmp && \
rm -f "$<".tmp

View File

@@ -1,19 +1,24 @@
SUBDIRS =
SUBDIRS = occtl ocpasswd
AM_CPPFLAGS = -I$(srcdir)/../gl/ -I$(builddir)/../gl/ \
-I$(srcdir)/ -I$(builddir)/../ -I$(srcdir)/../ $(LIBOPTS_CFLAGS) \
$(LIBGNUTLS_CFLAGS) \
$(LIBPROTOBUF_C_CFLAGS) $(LIBLZ4_CFLAGS) \
$(LIBNL3_CFLAGS) $(LIBREADLINE_CFLAGS) \
$(LIBREADLINE_CFLAGS) \
$(LIBTALLOC_CFLAGS) $(LIBDBUS_CFLAGS) $(LIBOATH_CFLAGS) \
$(LIBKRB5_CFLAGS) $(LIBTASN1_CFLAGS) $(RADCLI_CFLAGS)
BUILT_SOURCES = ocpasswd-args.c ocpasswd-args.h \
ocserv-args.c ocserv-args.h ipc.pb-c.c ipc.pb-c.h \
BUILT_SOURCES = ocserv-args.c ocserv-args.h ipc.pb-c.c ipc.pb-c.h \
ctl.pb-c.c ctl.pb-c.h http-heads.h kkdcp_asn1_tab.c
#AM_CPPFLAGS += -DDEBUG_LEAKS
include common.mk
EXTRA_DIST = ccan/licenses/BSD-MIT version.inc.in \
ccan/licenses/CC0 ccan/licenses/LGPL-2.1 version.inc \
ipc.proto ctl.proto http-heads.gperf common.mk
if LOCAL_HTTP_PARSER
AM_CPPFLAGS += -I$(srcdir)/http-parser/
HTTP_PARSER_SOURCES = http-parser/http_parser.c http-parser/http_parser.h
@@ -22,18 +27,6 @@ else
NEEDED_HTTP_PARSER_LIBS = $(HTTP_PARSER_LIBS)
endif
if NEED_LIBOPTS
NEEDED_LIBOPTS = ../libopts/libopts.a
else
NEEDED_LIBOPTS = $(LIBOPTS_LDADD)
endif
EXTRA_DIST = ccan/licenses/BSD-MIT version.inc.in \
ccan/licenses/CC0 ccan/licenses/LGPL-2.1 version.inc \
occtl-args.def ipc.proto ctl.proto http-heads.gperf
bin_PROGRAMS = ocpasswd occtl
sbin_PROGRAMS = ocserv
CCAN_SOURCES = ccan/build_assert/build_assert.h ccan/check_type/check_type.h \
@@ -114,26 +107,7 @@ SUBDIRS += pcl
AM_CPPFLAGS += -I$(srcdir)/pcl/
endif
noinst_LIBRARIES += libcmd-ocpasswd.a
libcmd_ocpasswd_a_SOURCES = ocpasswd-args.def ocpasswd-args.c ocpasswd-args.h
ocpasswd_SOURCES = ocpasswd.c
ocpasswd_LDADD = ../gl/libgnu.a $(NEEDED_LIBOPTS) libcmd-ocpasswd.a
ocpasswd_LDADD += $(LIBGNUTLS_LIBS) $(LIBCRYPT)
ocpasswd-args.c: $(srcdir)/ocpasswd-args.def $(builddir)/version.inc
$(AUTOGEN) $<
ocpasswd-args.h: ocpasswd-args.c
occtl_SOURCES = occtl.c occtl-pager.c occtl.h occtl-time.c occtl-cache.c occtl-ip-cache.c \
occtl-nl.c ctl.h ctl.pb-c.c ctl.pb-c.h $(CCAN_SOURCES) $(COMMON_SOURCES) \
occtl-print.c common-json.c common-json.h $(PROTOBUF_SOURCES)
occtl_LDADD = ../gl/libgnu.a $(LIBREADLINE_LIBS) \
$(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS)
ocserv_SOURCES += main-ctl-unix.c
occtl_SOURCES += occtl-unix.c
ipc.pb-c.c: ipc.proto
protoc-c --c_out=. --proto_path=$(srcdir) $<

7
src/common.mk Normal file
View File

@@ -0,0 +1,7 @@
if NEED_LIBOPTS
NEEDED_LIBOPTS = ../libopts/libopts.a
else
NEEDED_LIBOPTS = $(LIBOPTS_LDADD)
endif

18
src/occtl/Makefile.am Normal file
View File

@@ -0,0 +1,18 @@
AM_CPPFLAGS = -I$(srcdir)/../../gl/ -I$(builddir)/../../gl/ \
-I$(srcdir)/ -I$(srcdir)/../ -I$(builddir)/../../ \
$(LIBNL3_CFLAGS) $(LIBPROTOBUF_C_CFLAGS) \
$(LIBTALLOC_CFLAGS)
EXTRA_DIST = args.def
bin_PROGRAMS = occtl
COMMON_SOURCES=../common.c ../common.h ../system.c ../system.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 ../common-json.c ../common-json.h $(PROTOBUF_SOURCES)
occtl_LDADD = ../../gl/libgnu.a $(LIBREADLINE_LIBS) \
$(LIBNL3_LIBS) $(LIBPROTOBUF_C_LIBS) $(LIBTALLOC_LIBS)
occtl_SOURCES += unix.c

View File

@@ -23,7 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <occtl.h>
#include <occtl/occtl.h>
#include <c-strcase.h>
#include <minmax.h>

View File

@@ -23,7 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <occtl.h>
#include <occtl/occtl.h>
#include <c-strcase.h>
#include <minmax.h>
#include <common.h>

View File

@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <occtl.h>
#include <occtl/occtl.h>
#if defined(HAVE_LIBNL) && defined(__linux__)

View File

@@ -26,7 +26,7 @@
#include <time.h>
#include <signal.h>
#include <c-ctype.h>
#include <occtl.h>
#include <occtl/occtl.h>
#include <c-strcase.h>
static int handle_reset_cmd(CONN_TYPE * conn, const char *arg, cmd_params_st *params);

View File

@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <occtl.h>
#include <occtl/occtl.h>
static const char* get_pager(void)
{

View File

@@ -27,7 +27,7 @@
#include <errno.h>
#include <signal.h>
#include <c-ctype.h>
#include <occtl.h>
#include <occtl/occtl.h>
#include <common.h>
#include <common-json.h>
#include <c-strcase.h>

View File

@@ -27,7 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <occtl.h>
#include <occtl/occtl.h>
#define _(x) x

View File

@@ -29,7 +29,7 @@
#include <c-ctype.h>
#include <ctl.h>
#include <ctl.pb-c.h>
#include <occtl.h>
#include <occtl/occtl.h>
#include <common.h>
#include <c-strcase.h>
#include <arpa/inet.h>

23
src/ocpasswd/Makefile.am Normal file
View File

@@ -0,0 +1,23 @@
AM_CPPFLAGS = -I$(srcdir)/../../gl/ -I$(builddir)/../../gl/ \
-I$(srcdir)/ -I$(srcdir)/../ -I$(builddir)/../../ \
$(LIBTALLOC_CFLAGS) $(LIBOPTS_CFLAGS)
include ../common.mk
EXTRA_DIST = args.def
BUILT_SOURCES = args.c args.h
bin_PROGRAMS = ocpasswd
noinst_LIBRARIES = libcmd-ocpasswd.a
libcmd_ocpasswd_a_SOURCES = args.def args.c args.h
ocpasswd_SOURCES = ocpasswd.c
ocpasswd_LDADD = ../../gl/libgnu.a $(NEEDED_LIBOPTS) libcmd-ocpasswd.a
ocpasswd_LDADD += $(LIBGNUTLS_LIBS) $(LIBCRYPT)
args.c: $(srcdir)/args.def $(builddir)/../version.inc
$(AUTOGEN) $<
args.h: args.c

View File

@@ -12,7 +12,7 @@ short-usage = "Usage: ocpasswd -c [passwd] [options] username\nocpasswd --help
explain = "";
reorder-args;
argument = "[username]";
#include version.inc
#include ../version.inc
detail = "This program is openconnect password (ocpasswd) utility. It allows the generation
and handling of a 'plain' password file used by ocserv.";