Blob Blame Raw
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Tue, 19 Jan 2016 18:19:26 +0300
Subject: [PATCH] Fix include paths

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

diff --git a/icons/Makefile b/icons/Makefile
index 201b9508..e30d6a37 100644
--- a/icons/Makefile
+++ b/icons/Makefile
@@ -37,8 +37,8 @@ PS_ICONS=$(patsubst %,bluecube/%,$(notdir $(GEN_PS_ICONS)))
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_FLAGS += -pa ../../wings/ebin
-ERL_COMPILE_FLAGS += -I ../.. -Werror +debug_info
+ERL_FLAGS += -pa $(shell pwd)/../../wings*/ebin
+ERL_COMPILE_FLAGS += -Werror +debug_info -pa $(shell pwd)/../../wings*/ebin
 
 # ----------------------------------------------------
 # Targets
diff --git a/plugins_src/Makefile b/plugins_src/Makefile
index 6399ff0e..5fad213f 100644
--- a/plugins_src/Makefile
+++ b/plugins_src/Makefile
@@ -34,7 +34,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info -pa $(WINGS_INTL) -I $(WINGS_TOP)
+ERL_COMPILE_FLAGS += -Werror $(TYPE_FLAGS) +debug_info -pa $(WINGS_INTL) -pa $(shell pwd)/../../wings*/ebin -I $(WINGS_INTL)
 
 # ----------------------------------------------------
 # Targets
diff --git a/plugins_src/autouv/Makefile b/plugins_src/autouv/Makefile
index 7f88987a..9df1c6bf 100644
--- a/plugins_src/autouv/Makefile
+++ b/plugins_src/autouv/Makefile
@@ -43,7 +43,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror -pa $(WINGS_INTL) -I $(WINGS_TOP) $(TYPE_FLAGS) +debug_info
+ERL_COMPILE_FLAGS += -Werror -pa $(WINGS_INTL) -pa $(shell pwd)/../../../wings*/ebin $(TYPE_FLAGS) +debug_info
 
 # ----------------------------------------------------
 # Targets
diff --git a/plugins_src/commands/Makefile b/plugins_src/commands/Makefile
index c2a4357f..10aa09ba 100644
--- a/plugins_src/commands/Makefile
+++ b/plugins_src/commands/Makefile
@@ -68,7 +68,8 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -pa $(WINGS_INTL) -Werror -I $(WINGS_TOP) $(TYPE_FLAGS) +debug_info
+ERL_COMPILE_FLAGS += -Werror -I $(WINGS_E3D) $(TYPE_FLAGS) \
+  +debug_info -pa $(WINGS_INTL) -pa $(shell pwd)/../../../wings*/ebin -I $(WINGS_INTL)
 
 # ----------------------------------------------------
 # Targets
diff --git a/plugins_src/import_export/Makefile b/plugins_src/import_export/Makefile
index 64651df0..efb07b6c 100644
--- a/plugins_src/import_export/Makefile
+++ b/plugins_src/import_export/Makefile
@@ -53,8 +53,9 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror -pa $(WINGS_INTL) \
-  -I $(WINGS_TOP) $(TYPE_FLAGS) +debug_info
+ERL_COMPILE_FLAGS += -Werror \
+  -pa $(WINGS_INTL) -pa $(shell pwd)/../../../wings*/ebin -I $(WINGS_INTL) \
+  -I $(WINGS_E3D) $(TYPE_FLAGS) +debug_info
 
 # ----------------------------------------------------
 # Targets
diff --git a/plugins_src/primitives/Makefile b/plugins_src/primitives/Makefile
index 7afd56f5..123c1c29 100644
--- a/plugins_src/primitives/Makefile
+++ b/plugins_src/primitives/Makefile
@@ -44,7 +44,8 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.beam)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror -I $(WINGS_TOP) $(TYPE_FLAGS) -pa $(WINGS_INTL) +debug_info
+ERL_COMPILE_FLAGS += -Werror -I $(WINGS_E3D) \
+  $(TYPE_FLAGS) -pa $(WINGS_INTL) -pa $(shell pwd)/../../../wings*/ebin -I $(WINGS_INTL) +debug_info
 
 # ----------------------------------------------------
 # Targets
diff --git a/src/Makefile b/src/Makefile
index 06502a6b..2e16abaf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -142,8 +142,8 @@ APP_TARGET = $(EBIN)/$(APP_FILE)
 # ----------------------------------------------------
 # FLAGS
 # ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror -I ../.. -I../_deps $(TYPE_FLAGS) \
-'-Dwings_version="$(WINGS_VSN)"' -pa $(WINGS_INTL)
+ERL_COMPILE_FLAGS += -Werror -I ../e3d $(TYPE_FLAGS) \
+'-Dwings_version="$(WINGS_VSN)"' -pa $(WINGS_INTL) -pa $(shell pwd)/../../wings*/ebin $(USE_WX)
 
 # ----------------------------------------------------
 # Targets