1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/oonf_api/Makefile

48 lines
1.1 KiB
Makefile
Raw Normal View History

2014-02-05 20:37:47 +01:00
PKG_NAME=oonf_api
2016-01-06 16:21:36 +01:00
PKG_URL=http://olsr.org/git/oonf.git
2014-02-05 20:37:47 +01:00
PKG_VERSION=v0.3.0
2015-11-16 09:43:12 +01:00
PKG_DIR=$(CURDIR)/$(PKG_NAME)
2014-02-05 20:37:47 +01:00
ifneq ($(RIOTBOARD),)
include $(RIOTBOARD)/$(BOARD)/Makefile.include
endif
ifneq ($(RIOTBASE),)
INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/sys/net/include \
2015-08-11 20:02:10 +02:00
-I$(RIOTBASE)/sys/posix/include
2014-02-05 20:37:47 +01:00
endif
MODULE:=$(shell basename $(CURDIR))
.PHONY: all clean patch reset
all: patch
2015-11-16 09:43:12 +01:00
"$(MAKE)" -C $(PKG_DIR)
"$(MAKE)" $(BINDIR)$(MODULE).a
2014-02-05 20:37:47 +01:00
2015-11-16 09:43:12 +01:00
patch: $(PKG_DIR)/Makefile
2014-02-05 20:37:47 +01:00
2015-11-16 09:43:12 +01:00
$(PKG_DIR)/Makefile: $(PKG_DIR)/.git/config
cd "$(PKG_DIR)" && git am --ignore-whitespace "$(CURDIR)"/*.patch
2014-02-05 20:37:47 +01:00
2015-11-16 09:43:12 +01:00
$(PKG_DIR)/.git/config:
test -d "$(PKG_DIR)" || git clone "$(PKG_URL)" "$(PKG_DIR)"; \
cd "$(PKG_DIR)" && git checkout -f "$(PKG_VERSION)"
2014-02-05 20:37:47 +01:00
clean::
2015-11-16 09:43:12 +01:00
@echo "Cleaning up oonf_api package..."
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
2014-02-05 20:37:47 +01:00
git clean -x -f && \
2015-11-16 09:43:12 +01:00
git am --abort && \
git reset --hard "$(PKG_VERSION)" && \
$(MAKE) patch || true
2014-02-05 20:37:47 +01:00
distclean::
2015-11-16 09:43:12 +01:00
rm -rf $(PKG_DIR)
2014-02-05 20:37:47 +01:00
$(BINDIR)$(MODULE).a: $(BINDIR)oonf_*.a
mkdir -p $(BINDIR)$(MODULE); cd $(BINDIR)$(MODULE); for var in $?; do ar -x $$var; done; ar -r -c -s $(BINDIR)$(MODULE).a *.o
2015-11-16 09:43:12 +01:00
Makefile.include:
@true