.EXPORT_ALL_VARIABLES:

TARGET ?= iperf_mod_openbfc

# Extra environment settings
# ------------------------------------------------------------------------------
export CONFIG_BCM_IPERF=m

# Extra flags
# ------------------------------------------------------------------------------

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

untar: untar_

patch: patch_

prepare:
	if [ -d ../internal ]; then \
	    cp ../internal/* mod/.; \
	else \
	    if [ -d $(RELEASE_DIR) ]; then \
		cp -L $(RELEASE_DIR)/bspeed_accel.o_$(ARCH)_shipped mod/bspeed_accel.o; \
		cp -L $(RELEASE_DIR)/bspeed_ooo.o_$(ARCH)_shipped mod/bspeed_ooo.o; \
	    fi; \
	fi

config: config_

build: build_

stage: stage_

install: install_

release: release_
	cp -L mod/bspeed_accel.o $(RELEASE_DIR)/bspeed_accel.o_$(ARCH)_shipped
	cp -L mod/bspeed_ooo.o $(RELEASE_DIR)/bspeed_ooo.o_$(ARCH)_shipped

clean: clean_

distclean: distclean_

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