eal: hide internal hotplug function
[dpdk.git] / examples / l3fwd-power / Makefile
index 4c76838..2b749d5 100644 (file)
@@ -37,7 +37,7 @@ build:
 .PHONY: clean
 clean:
        rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-       rmdir --ignore-fail-on-non-empty build
+       test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
@@ -45,8 +45,8 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
-# Default target, can be overridden by command line or environment
-RTE_TARGET ?= x86_64-native-linux-gcc
+# Default target, detect a build directory, by looking for a path with a .config
+RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config)))))
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
@@ -59,6 +59,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lm
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603