812690fe7b
When building on Arc, Microblaze, Riscv32, Riscv64, package olsr needs to be compiled with -fPIC, so append -fPIC to CFLAGS when invoking make by default, since it seems to be mandatory in general and it's harmless for other architectures. Fixes: http://autobuild.buildroot.net/results/9d6/9d6d69133789aba16daeb6dc53721597e6be9806/ http://autobuild.buildroot.net/results/b85/b85d27b3a4bab5d68460401ff49e624177d55afa/ http://autobuild.buildroot.net/results/0d3/0d3489b14f4f4f0d4837d00209b5c1ee8d6f6a98/ http://autobuild.buildroot.net/results/d9a/d9a143c8e9a175741acfafd17b63544d04744ac9/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
54 lines
1.7 KiB
Makefile
54 lines
1.7 KiB
Makefile
################################################################################
|
|
#
|
|
# olsr
|
|
#
|
|
################################################################################
|
|
|
|
OLSR_VERSION = 0.9.8
|
|
OLSR_SITE = $(call github,OLSR,olsrd,v$(OLSR_VERSION))
|
|
OLSR_PLUGINS = arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo \
|
|
mdns nameservice netjson poprouting p2pd pgraph secure txtinfo watchdog
|
|
# Doesn't really need quagga but not very useful without it
|
|
OLSR_PLUGINS += $(if $(BR2_PACKAGE_QUAGGA),quagga)
|
|
OLSR_LICENSE = BSD-3-Clause, LGPL-2.1+
|
|
OLSR_LICENSE_FILES = license.txt lib/pud/nmealib/LICENSE
|
|
OLSR_DEPENDENCIES = host-flex host-bison
|
|
|
|
OLSR_CFLAGS = $(TARGET_CFLAGS)
|
|
|
|
# it needs -fPIC to link on lot of architectures
|
|
OLSR_CFLAGS += -fPIC
|
|
|
|
define OLSR_BUILD_CMDS
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) \
|
|
CFLAGS="$(OLSR_CFLAGS)" -C $(@D) olsrd
|
|
$(foreach p,$(OLSR_PLUGINS), \
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) \
|
|
CFLAGS="$(OLSR_CFLAGS)" -C $(@D)/lib/$(p)
|
|
)
|
|
endef
|
|
|
|
define OLSR_INSTALL_TARGET_CMDS
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
|
|
prefix="/usr" install_bin
|
|
$(foreach p,$(OLSR_PLUGINS), \
|
|
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib/$(p) \
|
|
LDCONFIG=/bin/true DESTDIR=$(TARGET_DIR) \
|
|
prefix="/usr" install
|
|
)
|
|
$(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq \
|
|
$(TARGET_DIR)/etc/olsrd/olsrd.conf
|
|
endef
|
|
|
|
define OLSR_INSTALL_INIT_SYSV
|
|
$(INSTALL) -D -m 0755 package/olsr/S50olsr \
|
|
$(TARGET_DIR)/etc/init.d/S50olsr
|
|
endef
|
|
|
|
define OLSR_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 644 package/olsr/olsr.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/olsr.service
|
|
endef
|
|
|
|
$(eval $(generic-package))
|