Autotoolify

This commit is contained in:
Kim Woelders
2018-06-28 11:02:10 +02:00
parent 6337ac09eb
commit ac76071e0e
6 changed files with 93 additions and 37 deletions
+26
View File
@@ -0,0 +1,26 @@
# autoreconf
/aclocal.m4
/autom4te.cache/
/compile
/config.h.in
/config.h.in~
/configure
/depcomp
/install-sh
/missing
Makefile.in
# configure
/config.h
/config.log
/config.status
/stamp-h1
.deps
Makefile
# build
*.o
/ttynvt
/ttynvt-*.tar.gz
/ttynvt-*.tar.xz
-20
View File
@@ -1,20 +0,0 @@
CC=gcc
CFLAGS=-Wall -Wextra -Werror -Wno-unused-parameter -O3
OBJS = ttynvt.o telnet_basic.o telnet_rfc2217.o
LIBS = -lpthread -lfuse
.PHONY: clean
all: ttynvt
-include $(OBJS:%.o=%.d)
%.o: %.c ./Makefile
$(CC) -MMD -c -o $@ $< $(CFLAGS)
ttynvt: $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
clean:
rm -f *.o *.d ttynvt
+20
View File
@@ -0,0 +1,20 @@
# Build ttynvt
#
MAINTAINERCLEANFILES = \
aclocal.m4 autom4te.cache compile config.h.in config.h.in~ configure \
depcomp install-sh missing \
Makefile.in
CFLAGS_OPT = -O3
CFLAGS_WARN = -Wall -Wextra -Werror -Wno-unused-parameter
bin_PROGRAMS = ttynvt
ttynvt_SOURCES = \
ttynvt.c \
telnet_basic.c telnet_rfc2217.c telnet.h telnet_param.h
ttynvt_CPPFLAGS = -I$(top_builddir) $(FUSE_CFLAGS) $(CFLAGS_OPT) $(CFLAGS_WARN)
ttynvt_LDADD = $(FUSE_LIBS)
+42
View File
@@ -0,0 +1,42 @@
m4_define([pkg_version], [0.9])
m4_define([pkg_revision], [002])
m4_define([pkg_version], m4_ifdef([pkg_revision], [pkg_version.pkg_revision], [pkg_version]))
AC_INIT([ttynvt],[pkg_version],[frj@thrane.eu])
AM_INIT_AUTOMAKE([foreign dist-xz])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(FUSE, fuse)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE Version $VERSION configured"
echo "------------------------------------------------------------------------"
echo
+5 -10
View File
@@ -2,12 +2,10 @@
* Copyright (c) 2018 Lars Thrane A/S
* SPDX-License-Identifier: GPL-2.0
*/
#include "config.h"
#define _FILE_OFFSET_BITS 64
#define _POSIX_C_SOURCE 200809L
#define _GNU_SOURCE
#include <fuse/cuse_lowlevel.h>
#include <fuse/fuse_opt.h>
#include <cuse_lowlevel.h>
#include <fuse_opt.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -31,7 +29,6 @@
#include <time.h>
#include "telnet.h"
#include "ver.h"
#define RX_BUF_SIZE 1024
#define MAX_HOST_NAME 64
@@ -862,10 +859,8 @@ int main(int argc, char *argv[])
perror("Failed to open log file");
return 1;
}
ttynvt_log("ttynvt ver:%u:%02u started, dev:%s\n",
TTYNVT_VER_MAJOR,
TTYNVT_VER_MINOR,
param.dev_name);
ttynvt_log("ttynvt ver:%s started, dev:%s\n",
PACKAGE_VERSION, param.dev_name);
}
else
lfd = -1;
-7
View File
@@ -1,7 +0,0 @@
#ifndef TTYNVT_VER_H
#define TTYNVT_VER_H
#define TTYNVT_VER_MAJOR 0
#define TTYNVT_VER_MINOR 9
#endif