improved install target

This commit is contained in:
Olaf Bergmann committed 2014-02-05 18:04:31 +01:00
1 parent db3794b855
commit ef41ce5d02
2 files changed
+10 -6

No files matched your search

+8 -5
View File
@@ -1,6 +1,6 @@
# Makefile for libcoap
#
# Copyright (C) 2010--2013 Olaf Bergmann <bergmann@tzi.org>
# Copyright (C) 2010--2014 Olaf Bergmann <bergmann@tzi.org>
#
# This file is part of the CoAP library libcoap. Please see
# README for terms of use.
@@ -108,11 +108,14 @@ dist: $(FILES) $(SUBDIRS)
tar czf $(package).tar.gz $(DISTDIR)
install:
mkdir -p $(includerootdir)/coap
mkdir -p $(librootdir)
cp -r $(HEADERS) $(includerootdir)/coap/
test -d $(includerootdir)/libcoap || mkdir -p $(includerootdir)/libcoap
test -d $(librootdir) || mkdir -p $(librootdir)
cp -r $(HEADERS) $(includerootdir)/libcoap/
cp $(LIB) $(librootdir)/
cp $(LIBSO) $(librootdir)/
ifdef BUILD_SO
cp $(LIBSO) $(librootdir)/$(LIBSO).@LIBSO_VERSION@
test -h $(librootdir)/$(LIBSO) || ln -s $(librootdir)/$(LIBSO).@LIBSO_VERSION@ $(librootdir)/$(LIBSO)
endif
TAGS:
$(ETAGS) -o $@.new $(SOURCES)
+2 -1
View File
@@ -67,7 +67,7 @@ AC_ARG_WITH(tests,
AC_ARG_WITH(shared,
[AS_HELP_STRING([--with-shared],[build shared library])],
[BUILD_SO="BUILD_SO=1"],
[BUILD_SO="BUILD_SO=1" LIBSO_VERSION=AC_PACKAGE_VERSION],
[])
# disambiguate between autoconf generated setups and contiki / lwip setups
@@ -87,6 +87,7 @@ AC_CHECK_FUNCS([memset select socket strcasecmp strrchr getaddrinfo strnlen])
AC_SUBST(TESTS)
AC_SUBST(BUILD_SO)
AC_SUBST(LIBSO_VERSION)
AC_CONFIG_HEADERS([config.h])