浏览代码

Makefile: detect path to core src folder

- it's different for modules and utils, after the files relocation
Daniel-Constantin Mierla 8 年之前
父节点
当前提交
d2c82c2f81
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/Makefile.defs

+ 6 - 1
src/Makefile.defs

@@ -32,7 +32,12 @@ ifeq (,$(main_makefile))
 # if not called from the main makefile (module, lib or ut):
 # include config.mak, but if not present or incomplete (makefile_defs!=1)
 # don't export the vars)
-COREPATH?= ../../src/
+DEFCOREPATH = ../../src
+ifneq ("$(wildcard $(DEFCOREPATH))","")
+COREPATH?= ../../src
+else
+COREPATH?= ../..
+endif
 include $(COREPATH)/config.mak
 ifeq ($(quiet),verbose)
 $(info config.mak included)