]> git.droids-corp.org - dpdk.git/blobdiff - examples/ip_fragmentation/Makefile
net: replace IPv4/v6 constants with uppercase name
[dpdk.git] / examples / ip_fragmentation / Makefile
index 9e89e744c6f19bdd82e924787b203297bf009f6a..56726d68837302807bb17e6ad1b28b7a543b7fa1 100644 (file)
@@ -36,7 +36,7 @@ build:
 .PHONY: clean
 clean:
        rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
 .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
 
 
 else
 
@@ -44,8 +44,8 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
 $(error "Please define RTE_SDK environment variable")
 endif
 
-# Default target, can be overridden by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-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
 
 
 include $(RTE_SDK)/mk/rte.vars.mk