diff --git a/core/defs.mk b/core/defs.mk index a470b7c..359f6cb 100644 --- a/core/defs.mk +++ b/core/defs.mk @@ -514,11 +514,12 @@ define transform-h-to-gch @echo "Precompile: $(PRIVATE_MODULE) <== $(call path-from-top,$<)" $(call check-pwd-is-top-dir) $(Q)$(CCACHE) $(TARGET_CXX) \ + -o $@ \ $(TARGET_GLOBAL_C_INCLUDES) \ $(PRIVATE_C_INCLUDES) \ $(TARGET_GLOBAL_CFLAGS) $(TARGET_GLOBAL_CPPFLAGS) $(CXX_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) $(PRIVATE_CPPFLAGS) \ - $(TARGET_PCH_FLAGS) -MMD -MP -o $@ \ + $(TARGET_PCH_FLAGS) -MMD -MP \ $(call path-from-top,$<) endef @@ -531,12 +532,13 @@ define transform-cpp-to-o @echo "$(DISPLAY_ARM_MODE)C++: $(PRIVATE_MODULE) <== $(call path-from-top,$<)" $(call check-pwd-is-top-dir) $(Q)$(CCACHE) $(TARGET_CXX) \ + -o $@ \ $(TARGET_GLOBAL_C_INCLUDES) \ $(PRIVATE_C_INCLUDES) \ $(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \ $(TARGET_GLOBAL_CFLAGS) $(TARGET_GLOBAL_CPPFLAGS) $(CXX_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) $(PRIVATE_CPPFLAGS) \ - -c -MMD -MP -g -o $@ \ + -c -MMD -MP -g \ $(call path-from-top,$<) endef @@ -549,12 +551,13 @@ define transform-c-to-o $(call check-pwd-is-top-dir) @mkdir -p $(dir $@) $(Q)$(CCACHE) $(TARGET_CC) \ + -o $@ \ $(TARGET_GLOBAL_C_INCLUDES) \ $(PRIVATE_C_INCLUDES) \ $(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \ $(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) \ - -c -MMD -MP -g -o $@ \ + -c -MMD -MP -g \ $(call path-from-top,$<) endef @@ -567,12 +570,13 @@ define transform-s-to-o $(call check-pwd-is-top-dir) @mkdir -p $(dir $@) $(Q)$(CCACHE) $(TARGET_CC) \ + -o $@ \ $(TARGET_GLOBAL_C_INCLUDES) \ $(PRIVATE_C_INCLUDES) \ $(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \ $(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) \ - -c -MMD -MP -g -o $@ \ + -c -MMD -MP -g \ $(call path-from-top,$<) endef @@ -600,6 +604,7 @@ define transform-o-to-shared-lib @echo "SharedLib: $(PRIVATE_MODULE) ==> $(call path-from-top,$@)" $(call check-pwd-is-top-dir) $(Q)$(TARGET_CXX) \ + -o $@ \ $(TARGET_GLOBAL_LDFLAGS_SHARED) \ -Wl,-Map -Wl,$(basename $@).map \ -shared \ @@ -613,7 +618,6 @@ $(Q)$(TARGET_CXX) \ -Wl,--as-needed \ $(PRIVATE_ALL_STATIC_LIBRARIES) \ $(PRIVATE_ALL_SHARED_LIBRARIES) \ - -o $@ \ $(PRIVATE_LDLIBS) \ $(TARGET_GLOBAL_LDLIBS_SHARED) endef @@ -628,6 +632,7 @@ define transform-o-to-executable $(call check-pwd-is-top-dir) @# TODO : Set LD ... $(Q)$(TARGET_CXX) \ + -o $@ \ $(TARGET_GLOBAL_LDFLAGS) \ -Wl,-Map -Wl,$(basename $@).map \ -Wl,-rpath-link=$(TARGET_OUT_STAGING)/lib \ @@ -640,7 +645,6 @@ $(Q)$(TARGET_CXX) \ -Wl,--as-needed \ $(PRIVATE_ALL_STATIC_LIBRARIES) \ $(PRIVATE_ALL_SHARED_LIBRARIES) \ - -o $@ \ $(PRIVATE_LDLIBS) \ $(TARGET_GLOBAL_LDLIBS) endef diff --git a/core/main.mk b/core/main.mk index 0275e79..60ae984 100644 --- a/core/main.mk +++ b/core/main.mk @@ -23,8 +23,12 @@ all: # Overridable settings V := 0 W := 0 +# debug mode of the software DEBUG := 0 +# compilation done with Clang system instead of gcc CLANG := 0 +# for openGL : enable the open GL ES 2 or the Shader system for normal system +SHADER := 0 # Quiet command if V is 0 ifeq ("$(V)","0") @@ -80,10 +84,14 @@ ifeq ("$(DEBUG)","1") else BUILD_DIRECTORY_MODE := release endif - -TARGET_OUT_BUILD ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/obj -TARGET_OUT_STAGING ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/staging -TARGET_OUT_FINAL ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/final +ifeq ("$(SHADER)","1") + BUILD_DIRECTORY_SHADER := ogl2 +else + BUILD_DIRECTORY_SHADER := ogl1 +endif +TARGET_OUT_BUILD ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/$(BUILD_DIRECTORY_SHADER)/obj +TARGET_OUT_STAGING ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/$(BUILD_DIRECTORY_SHADER)/staging +TARGET_OUT_FINAL ?= $(shell pwd)/out/$(TARGET_OS)/$(BUILD_DIRECTORY_MODE)/$(BUILD_DIRECTORY_SHADER)/final # Makefile with the list of all makefiles available and include them SCAN_TARGET := scan