From 60c92d40ae48e911b735ce7c5e6414a9199c8f1c Mon Sep 17 00:00:00 2001 From: Andrew Brooks Date: Thu, 25 Jan 2018 20:41:55 -0600 Subject: [PATCH] Added autotools --- barcode_service/Makefile | 13 ------------- barcode_service/Makefile.am | 5 +++++ barcode_service/configure.ac | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 13 deletions(-) delete mode 100644 barcode_service/Makefile create mode 100644 barcode_service/Makefile.am create mode 100644 barcode_service/configure.ac diff --git a/barcode_service/Makefile b/barcode_service/Makefile deleted file mode 100644 index c9adc2d..0000000 --- a/barcode_service/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -CC=gcc -CFLAGS=-O2 -Wall -Wextra -LDFLAGS=-lzmq -lczmq -EXE_NAME=barcode_service - -all: $(EXE_NAME) - -$(EXE_NAME): barcode_service.c - $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ - -clean: - rm -f *.o - rm -f $(EXE_NAME) diff --git a/barcode_service/Makefile.am b/barcode_service/Makefile.am new file mode 100644 index 0000000..2c193ae --- /dev/null +++ b/barcode_service/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS = barcode_service + +barcode_service_SOURCES = \ + barcode_service.h \ + barcode_service.c diff --git a/barcode_service/configure.ac b/barcode_service/configure.ac new file mode 100644 index 0000000..d299cd0 --- /dev/null +++ b/barcode_service/configure.ac @@ -0,0 +1,27 @@ +AC_PREREQ([2.69]) +AC_INIT([barcode_service], [0.0.1], [andrewgrantbrooks@gmail.com]) +AC_CONFIG_SRCDIR([barcode_service.c]) +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE([subdir-objects foreign -Wall -Wextra -Wpedantic]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. +AC_CHECK_LIB([czmq], [zsock_new]) +AC_CHECK_LIB([zmq], [zmq_ctx_new]) + +# Checks for header files. +AC_CHECK_HEADERS([stdlib.h string.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_CHECK_HEADER_STDBOOL + +# Checks for library functions. +AC_FUNC_MALLOC + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT