Skip to content

Commit

Permalink
[math] minor update for math lib building
Browse files Browse the repository at this point in the history
use PAPARAZZI_HOME and install to /usr/local by default
  • Loading branch information
flixr committed Oct 29, 2013
1 parent 314d4f6 commit 48e9072
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions sw/airborne/math/Makefile
Expand Up @@ -8,14 +8,15 @@ CC= gcc
CFLAGS= -fpic
INCLUDES= -I$(PAPARAZZI_SRC)/sw/include -I$(PAPARAZZI_SRC)/sw/airborne

# build in ../../../var/build/math
ifndef BUILDDIR
BUILDDIR=../../../var/build/math
ifeq ($(PAPARAZZI_HOME),)
PAPARAZZI_HOME=$(PAPARAZZI_SRC)
endif

ifndef PREFIX
PREFIX=/usr
endif
# build in $(PAPARAZZI_HOME)/var/build/math
BUILDDIR ?= $(PAPARAZZI_HOME)/var/build/math

PREFIX ?= /usr/local

LIB_INSTALLDIR=${PREFIX}/lib
INCLUDE_INSTALLDIR=${PREFIX}/include/pprz
PKGCONFIG_INSTALLDIR=${PREFIX}/lib/pkgconfig
Expand Down Expand Up @@ -48,3 +49,4 @@ $(BUILDDIR)/%.o: %.c
clean:
$(Q)rm -f $(BUILDDIR)/*.o $(BUILDDIR)/$(LIBNAME).so

.PHONY: all clean shared_lib install_shared_lib
8 changes: 4 additions & 4 deletions sw/airborne/math/README
Expand Up @@ -11,11 +11,11 @@ HOWTO install a shared library to use in other projects
2. Install library: in this folder, type
make install_shared_lib

the default install dir is /usr
the default install dir is /usr/local
and will install files in
/usr/lib
/usr/lib/pkgconfig
/usr/include/pprz
/usr/local/lib
/usr/local/lib/pkgconfig
/usr/local/include/pprz

to change the install dir: PREFIX=<your_install_dir> make install_shared_lib

Expand Down

0 comments on commit 48e9072

Please sign in to comment.