Commit a836a004 authored by Felix Hamann's avatar Felix Hamann

c client boilerplate

parent ce4bb0d5
This diff is collapsed.
This diff is collapsed.
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = -g -Werror -Wall -Wextra -pedantic -std=gnu99
samwise_LDFLAGS = \
-lzmq \
-lczmq
#
# BINARIES
#
bin_PROGRAMS = samwise
#
# samd
#
samwise_SOURCES = \
include/samwise.h \
src/samwise.c
#!/bin/sh -e
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
autoreconf --force --install --verbose "$srcdir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT(samwise, 0.0.1, github.com/dreadworks/samwise/issues)
AC_CONFIG_SRCDIR([include/samwise.h])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([m4])
AM_PROG_CC_C_O
AC_PROG_INSTALL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lczmq':
AC_CHECK_LIB([czmq], [main])
# FIXME: Replace `main' with a function in `-lzmq':
AC_CHECK_LIB([zmq], [main])
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_FUNC_MALLOC
# Checks for library functions.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
/* =========================================================================
samwise - reliable message publishing
This Source Code Form is subject to the terms of the MIT
License. If a copy of the MIT License was not distributed with
this file, You can obtain one at http://opensource.org/licenses/MIT
=========================================================================
*/
/**
@brief Samwise API interface
Offers all public functions necessary to store and forward
messages.
*/
#ifndef __SAMWISE_H__
#define __SAMWISE_H__
typedef struct samwise_t samwise_t;
samwise_t *
samwise_new ();
void
samwise_destroy (
samwise_t **self);
#endif
/* =========================================================================
samwise - best effort store and forward message publishing
This Source Code Form is subject to the terms of the MIT
License. If a copy of the MIT License was not distributed with
this file, You can obtain one at http://opensource.org/licenses/MIT
=========================================================================
*/
/**
@brief samwise c client
@file samwise.c
*/
#include "../include/samwise.h"
#include <czmq.h>
struct samwise_t {
int TMP;
};
samwise_t *
samwise_new ()
{
samwise_t *self = malloc (sizeof (samwise_t));
assert (self);
self->TMP = 0;
return self;
}
void
samwise_destroy (
samwise_t **self)
{
assert (*self);
free (*self);
*self = NULL;
}
int
main (void)
{
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment