diff options
author | root <root@no.no.james.local> | 2015-09-01 15:24:46 +0100 |
---|---|---|
committer | root <root@no.no.james.local> | 2015-09-01 15:24:46 +0100 |
commit | 77c2794c562cb524c4f34bd9afa635e0bfb584c5 (patch) | |
tree | 3a7837e5fd8d7d61b479367bccdbe08cda988093 | |
parent | db0ac71a71b4f4621a1128b1b663aa5081a2de10 (diff) | |
download | nrfdfu-77c2794c562cb524c4f34bd9afa635e0bfb584c5.tar.gz nrfdfu-77c2794c562cb524c4f34bd9afa635e0bfb584c5.tar.bz2 nrfdfu-77c2794c562cb524c4f34bd9afa635e0bfb584c5.zip |
automake
-rw-r--r-- | Makefile.am | 33 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | dfu.c | 2 | ||||
-rw-r--r-- | project.h | 2 |
4 files changed, 28 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am index c4f168d..c7fe645 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,23 +7,11 @@ # # # -man1_MANS=nrfdfu.man - -INCLUDES= ${BLUEZ_CFLAGS} ${JSON_C_CFLAGS} ${LIBZIP_CFLAGS} - -noinst_HEADERS= prototypes.h ${CHDRS} ${BLUEZ_HDRS} +AUTOMAKE_OPTIONS = subdir-objects +man1_MANS=nrfdfu.man bin_PROGRAMS = nrfdfu -nrfdfu_SOURCES = ${SRCS} -nrfdfu_LDADD = ${BLUEZ_LIBS} ${JSON_C_LIBS} ${LIBZIP_LIBS} - -tidy: ${CSRCS} ${CHDRS} - indent -i2 -ts0 ${CSRCS} ${CHDRS} - /bin/rm -f *~ - -AM_CFLAGS=-g -Wall - CSRCS= \ nrfdfu.c \ @@ -38,7 +26,7 @@ CHDRS= \ ble.h \ dfu.h \ manifest.h \ - project.h \ + project.h BLUEZ_SRCS= \ bluez/att.c \ @@ -67,6 +55,21 @@ BLUEZ_HDRS= \ bluez/util.h \ bluez/uuid.h + +AM_CPPFLAGS = ${BLUEZ_CFLAGS} ${JSON_C_CFLAGS} ${LIBZIP_CFLAGS} + +noinst_HEADERS= prototypes.h ${CHDRS} ${BLUEZ_HDRS} + + +nrfdfu_SOURCES = ${CSRCS} ${BLUEZ_SRCS} +nrfdfu_LDADD = ${BLUEZ_LIBS} ${JSON_C_LIBS} ${LIBZIP_LIBS} + +tidy: ${CSRCS} ${CHDRS} + indent -i2 -ts0 ${CSRCS} ${CHDRS} + /bin/rm -f *~ + +AM_CFLAGS=-g -Wall + protos: echo > prototypes.h ${CPROTO} ${CPPFLAGS} -e -v ${CSRCS} > prototypes.new diff --git a/configure.ac b/configure.ac index 18c4800..9bb8e31 100644 --- a/configure.ac +++ b/configure.ac @@ -7,15 +7,14 @@ dnl All rights reserved. dnl dnl AC_PREREQ(2.13) -AC_INIT(nrfdfu.c) +AC_INIT(nrfdfu,1.00) +AC_CONFIG_SRCDIR(nrfdfu.c) +AM_INIT_AUTOMAKE AC_PROG_CC AC_SYS_LARGEFILE -VERSION=1.00 -PACKAGE=nrfdfu -AM_INIT_AUTOMAKE($PACKAGE,$VERSION) AM_CONFIG_HEADER(config.h) @@ -32,5 +31,9 @@ dnl AC_CHECK_FUNCS() dnl CFLAGS=-g +PKG_CHECK_MODULES(LIBZIP,libzip) +PKG_CHECK_MODULES(JSON_C,json-c) +PKG_CHECK_MODULES(BLUEZ,bluez) + AC_OUTPUT([Makefile]) @@ -8,7 +8,7 @@ send_data_quickly (BLE * b, uint8_t * d, size_t sz, int pkts) size_t mtu = 16; size_t off = 0; size_t tx, rx; - int sent; + int sent=0; ble_notify_pkts_start (b); @@ -1,3 +1,5 @@ +#include "config.h" + #include <stdio.h> #include <stdlib.h> #include <unistd.h> |