mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-06 17:52:54 +03:00
Added target install recipe to Makefile
This commit is contained in:
1 parent
6e293342f6
commit
db3794b855
1 file changed
+17
-7
+17
-7
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2010--2013 Olaf Bergmann <bergmann@tzi.org>
|
||||
#
|
||||
# This file is part of the CoAP library libcoap. Please see
|
||||
# README for terms of use.
|
||||
# README for terms of use.
|
||||
|
||||
# the library's version
|
||||
VERSION:=@PACKAGE_VERSION@
|
||||
@@ -18,6 +18,9 @@ ETAGS = @ETAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
top_builddir = @top_builddir@
|
||||
package = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
|
||||
prefix = @prefix@
|
||||
includerootdir = $(DESTDIR)$(prefix)/include
|
||||
librootdir = $(DESTDIR)$(prefix)/lib
|
||||
|
||||
# files and flags
|
||||
SOURCES:= pdu.c net.c debug.c encode.c uri.c coap_list.c resource.c hashkey.c \
|
||||
@@ -66,7 +69,7 @@ endif
|
||||
|
||||
all: $(LIB) $(LIBSO) dirs
|
||||
|
||||
check:
|
||||
check:
|
||||
echo DISTDIR: $(DISTDIR)
|
||||
echo top_builddir: $(top_builddir)
|
||||
$(MAKE) -C examples check
|
||||
@@ -77,7 +80,7 @@ dirs: $(SUBDIRS)
|
||||
done
|
||||
|
||||
$(LIB): $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
$(LIBSO): $(OBJECTS)
|
||||
@@ -89,7 +92,7 @@ clean:
|
||||
$(MAKE) -C $$dir clean ; \
|
||||
done
|
||||
|
||||
doc:
|
||||
doc:
|
||||
$(MAKE) -C doc
|
||||
|
||||
distclean: clean
|
||||
@@ -104,9 +107,16 @@ dist: $(FILES) $(SUBDIRS)
|
||||
done
|
||||
tar czf $(package).tar.gz $(DISTDIR)
|
||||
|
||||
TAGS:
|
||||
$(ETAGS) -o $@.new $(SOURCES)
|
||||
$(ETAGS) -a -o $@.new $(HEADERS)
|
||||
install:
|
||||
mkdir -p $(includerootdir)/coap
|
||||
mkdir -p $(librootdir)
|
||||
cp -r $(HEADERS) $(includerootdir)/coap/
|
||||
cp $(LIB) $(librootdir)/
|
||||
cp $(LIBSO) $(librootdir)/
|
||||
|
||||
TAGS:
|
||||
$(ETAGS) -o $@.new $(SOURCES)
|
||||
$(ETAGS) -a -o $@.new $(HEADERS)
|
||||
mv $@.new $@
|
||||
|
||||
.gitignore:
|
||||
|
||||
Reference in new issue
Block a user