aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-09-02 13:01:51 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-09-02 13:01:51 +0200
commit422bfc5abd942cd78ed4cd8a592c290e46f1ab1f (patch)
tree42f321e48a5e8ede381c9afd7493afd60877605d
parent319a1b6ece6c7c88459a5aac900e4cdf2001d57a (diff)
Support USER_LIBS for project Makefiles.
* source'able activate script uses runtime PATH variable instead of a hardcoded one Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--Makefile.deps2
-rw-r--r--Makefile.inc4
-rw-r--r--ddk-template-cplusplus-EASTL.cpp1
3 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.deps b/Makefile.deps
index e479b36..34cb146 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -65,7 +65,7 @@ ifeq ($(CC),$(LOCAL_MINGW64_CC))
@echo '#!/usr/bin/env bash' >$(ACTIVATE_SH)
@echo >>$(ACTIVATE_SH)
@echo 'MYDIR="$$(realpath $$(dirname $${BASH_SOURCE[0]}))"' >>$(ACTIVATE_SH)
- @echo 'export PATH="$${MYDIR}/w64-mingw32-sysroot/x86_64/bin:$${MYDIR}/bin:${PATH}"' >>$(ACTIVATE_SH)
+ @echo 'export PATH="$${MYDIR}/w64-mingw32-sysroot/x86_64/bin:$${MYDIR}/bin:$${PATH}"' >>$(ACTIVATE_SH)
@chmod +x $(ACTIVATE_SH)
endif
diff --git a/Makefile.inc b/Makefile.inc
index a059ab5..ac4fb8a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -62,6 +62,7 @@ DRIVER_LDFLAGS := -shared \
-nostartfiles -nodefaultlibs -nostdlib
DRIVER_LIBS := -lntoskrnl -lhal
USER_LDFLAGS := -Wl,--dynamicbase -Wl,--nxcompat -Wl,--gc-sections
+USER_LIBS :=
DRIVER_ADDITIONAL_DEPS := $(DPP_ROOT)/CRT/DriverThread.cpp $(DPP_ROOT)/CRT/DriverThread.hpp
DRIVER_ADDITIONAL_OBJS := $(DPP_ROOT)/CRT/DriverThread$(NAME_SUFFIX).opp
@@ -173,7 +174,8 @@ define LINK_CPP_USER_TARGET
-o '$(2)' \
$(1) \
$(USER_CRT) \
- $(EASTL_STATIC_LIB)
+ $(EASTL_STATIC_LIB) \
+ $(USER_LIBS)
@echo 'LD $(2)'
endef
diff --git a/ddk-template-cplusplus-EASTL.cpp b/ddk-template-cplusplus-EASTL.cpp
index 18123bf..b57815d 100644
--- a/ddk-template-cplusplus-EASTL.cpp
+++ b/ddk-template-cplusplus-EASTL.cpp
@@ -46,6 +46,7 @@ void stl_test()
eastl::string s;
s = "This a string";
+ s.append(" ");
s.append("any");
DbgPrint("%s\n", s.c_str());