From: Sven Eckelmann <sven@narfation.org>
To: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
"Janne.Paatero@ruag.com" <Janne.Paatero@ruag.com>
Cc: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCHv1] alfred: Add support for passing location information over alfred.
Date: Wed, 02 Oct 2013 18:34:15 +0200 [thread overview]
Message-ID: <2038458.nCDZnQrXiI@sven-desktop> (raw)
In-Reply-To: <20131002131915.GB24077@pandem0nium>
[-- Attachment #1.1: Type: text/plain, Size: 544 bytes --]
On Wednesday 02 October 2013 06:19:15 Simon Wunderlich wrote:
> > +# alfred build
> > +BINARY_NAME = alfred-gpsd
> > +OBJ = alfred-gpsd.o
> > +
> > +# alfred flags and options
> > +CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
> > +LDLIBS += -lgps
>
> I have no idea if we need some special handling for this to let it work
> for crosscompiling, OpenWRT etc?
Please use pkg-config for things like this. An example Makefile is attached.
@Simon: Please fix your e-mail adress inside the README file.
Kind regards,
Sven
[-- Attachment #1.2: Makefile --]
[-- Type: text/x-makefile, Size: 2596 bytes --]
#!/usr/bin/make -f
# -*- makefile -*-
#
# Copyright (C) 2013 B.A.T.M.A.N. contributors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA
#
# alfred build
BINARY_NAME = alfred-gpsd
OBJ = alfred-gpsd.o
# alfred flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
# disable verbose output
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
Q_CC = @echo ' ' CC $@;
Q_LD = @echo ' ' LD $@;
export Q_CC
export Q_LD
endif
endif
ifeq ($(origin PKG_CONFIG), undefined)
PKG_CONFIG = pkg-config
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
$(error $(PKG_CONFIG) not found)
endif
endif
ifeq ($(origin LIBGPS_CFLAGS) $(origin LIBGPS_LDLIBS), undefined undefined)
LIBGPS_NAME ?= libgps
ifeq ($(shell $(PKG_CONFIG) --modversion $(LIBGPS_NAME) 2>/dev/null),)
$(error No $(LIBGPS_NAME) development libraries found!)
endif
LIBGPS_CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBGPS_NAME))
LIBGPS_LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBGPS_NAME))
endif
CFLAGS += $(LIBGPS_CFLAGS)
LDLIBS += $(LIBGPS_LDLIBS)
# standard build tools
CC ?= gcc
RM ?= rm -f
INSTALL ?= install
MKDIR ?= mkdir -p
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)
# standard install paths
PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
# try to generate revision
REVISION= $(shell if [ -d ../.git ]; then \
echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \
fi)
ifneq ($(REVISION),)
CPPFLAGS += -DSOURCE_VERSION=\"$(REVISION)\"
endif
# default target
all: $(BINARY_NAME)
# standard build rules
.SUFFIXES: .o .c
.c.o:
$(COMPILE.c) -o $@ $<
$(BINARY_NAME): $(OBJ)
$(LINK.o) $^ $(LDLIBS) -o $@
clean:
$(RM) $(BINARY_NAME) $(OBJ) $(DEP)
install: $(BINARY_NAME)
$(MKDIR) $(DESTDIR)$(SBINDIR)
$(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
# load dependencies
DEP = $(OBJ:.o=.d)
-include $(DEP)
.PHONY: all clean install
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-10-02 16:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 20:23 [B.A.T.M.A.N.] [PATCHv1] GPS distribution via Alfred Andrew Lunn
2013-10-01 20:23 ` [B.A.T.M.A.N.] [PATCHv1] alfred: Add support for passing location information over alfred Andrew Lunn
2013-10-02 7:25 ` Thijs van Veen
2013-10-02 8:28 ` Andrew Lunn
2013-10-02 13:19 ` Simon Wunderlich
2013-10-02 16:34 ` Sven Eckelmann [this message]
2013-10-02 16:47 ` Andrew Lunn
2013-10-03 14:21 ` Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2038458.nCDZnQrXiI@sven-desktop \
--to=sven@narfation.org \
--cc=Janne.Paatero@ruag.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=simon.wunderlich@s2003.tu-chemnitz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox