From d8534d2ab33036610cd3d4ffe9118da42d2b3bf5 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Thu, 13 Jan 2022 11:33:12 -0500 Subject: [PATCH] initial commit: version 1.0.0 Signed-off-by: Trevor Woerner --- .gitignore | 8 ++++++++ Makefile.am | 8 ++++++++ cfg/Makefile.am | 6 ++++++ configure.ac | 34 ++++++++++++++++++++++++++++++++++ src/Makefile.am | 10 ++++++++++ src/main.c | 13 +++++++++++++ 6 files changed, 79 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile.am create mode 100644 cfg/Makefile.am create mode 100644 configure.ac create mode 100644 src/Makefile.am create mode 100644 src/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac04df1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +**/*.in +aclocal.m4 +autom4te.cache +configure +cfg/compile +cfg/depcomp +cfg/install-sh +cfg/missing diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..41f9fc9 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,8 @@ +## Copyright (C) 2022 Trevor Woerner + +######################## +## top-level Makefile.am +######################## +SUBDIRS = @SUBDIRS@ +EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README +DIST_SUBDIRS = cfg @SUBDIRS@ diff --git a/cfg/Makefile.am b/cfg/Makefile.am new file mode 100644 index 0000000..78d4fd3 --- /dev/null +++ b/cfg/Makefile.am @@ -0,0 +1,6 @@ +## Copyright (C) 2022 Trevor Woerner + +######################## +# cfg/Makefile.am +######################## +SUBDIRS = diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..d41734b --- /dev/null +++ b/configure.ac @@ -0,0 +1,34 @@ +dnl Copyright (C) 2022 Trevor Woerner + +dnl AC_PREREQ(2.57) +AC_INIT([Hello Version], 1.0.0, twoerner@gmail.com, hello-version) +AC_CONFIG_SRCDIR(src/main.c) +AC_CONFIG_AUX_DIR(cfg) +AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) +AM_CONFIG_HEADER(cfg/config.h) + +SUBDIRS="src" + +dnl ********************************** +dnl checks for programs +dnl ********************************** +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL + +dnl ********************************** +dnl checks for header files +dnl ********************************** +AC_HEADER_STDC + +dnl ********************************** +dnl other stuff +dnl ********************************** +AC_SUBST(SUBDIRS) + +dnl ********************************** +dnl output +dnl ********************************** +AC_OUTPUT(Makefile +cfg/Makefile +src/Makefile) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..42023d9 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,10 @@ +## Copyright (C) 2022 Trevor Woerner + +######################## +## src/Makefile.am +######################## +SUBDIRS = +AM_CFLAGS = -Wall -Werror -Wextra -Wconversion -Wreturn-type -Wstrict-prototypes + +bin_PROGRAMS = hello-version +hello_version_SOURCES = main.c diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..78d4bd4 --- /dev/null +++ b/src/main.c @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2022 Trevor Woerner + */ + +#include +#include "config.h" + +int +main (void) +{ + printf("hello, version %s\n", VERSION); + return 0; +}