Browse Source

Makefile: detect path to core src folder

- it's different for modules and utils, after the files relocation
Daniel-Constantin Mierla 8 years ago
parent
commit
d2c82c2f81
1 changed files with 6 additions and 1 deletions
  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)