.EXPORT_ALL_VARIABLES:

TARGET ?= lattice_rpctlv

# Flags
# ------------------------------------------------------------------------------
$(TARGET)_CFLAGS  = -DSUPPORT_SNMP=1 $(LATTICE_EXTERNAL_CFLAGS)
$(TARGET)_CFLAGS += $(if $(CONFIG_BR2_PACKAGE_BTRACE),-DBTRACE_INCLUDED)
ifneq (,$(filter arm64 aarch64,$(ARCH)))
$(TARGET)_CFLAGS  += -DARM64
endif
$(TARGET)_LDFLAGS = $(if $(CONFIG_BR2_PACKAGE_BTRACE),-lbtrace)
$(TARGET)_LDLIBS  =

-include $(STAGING_DIR)/usr/include/lattice.inc

# Commands
# ------------------------------------------------------------------------------
all: clean prepare config build stage release install

untar: untar_

patch: patch_

prepare: untar patch

config: config_

build: build_

stage: stage_

release: release_

install: install_
	ln -sf /var/localtime	$(INSTALL_DIR)//etc/localtime

clean: clean_

distclean: distclean_

# Common Makefiles
# ------------------------------------------------------------------------------
COMMON_MAKEFILES_DIR ?= ./makefiles
include $(COMMON_MAKEFILES_DIR)/make.lib
