summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-09-19 14:08:08 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-09-19 14:08:08 +0200
commit8552add4829b97c6584786c8c08d7ce671f9315e (patch)
tree64c54a49b747a400bc157dcacc0b2bcc489ffd9c
parenta7cae76c5ef40f52a1dd6895373e8c93dffaadf0 (diff)
Added source'able toolchain script.
* The script adds x86_64-w64-mingw32/bin and x86_64-w64-mingw32/x86_64-w64-mingw32/bin to PATH Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--Makefile.deps6
-rw-r--r--README.md7
2 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.deps b/Makefile.deps
index ca3d22d..0dabe15 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -1,4 +1,5 @@
DPP_ROOT = .
+ACTIVATE_SH = ./x86_64-w64-mingw32/activate.sh
include Makefile.inc
all: deps
@@ -39,6 +40,11 @@ ifeq ($(CC),$(LOCAL_MINGW64_CC))
@echo "----------------------------------------------------------------------------------------"
@echo
env -i ./mingw-w64-build/mingw-w64-build x86_64
+ @echo '#!/usr/bin/env bash' >$(ACTIVATE_SH)
+ @echo >>$(ACTIVATE_SH)
+ @echo 'MYDIR="$$(realpath $$(dirname $${BASH_SOURCE[0]}))"' >>$(ACTIVATE_SH)
+ @echo 'export PATH="$${MYDIR}/x86_64-w64-mingw32/bin:$${MYDIR}/bin:${PATH}"' >>$(ACTIVATE_SH)
+ @chmod +x $(ACTIVATE_SH)
endif
deps-build: \
diff --git a/README.md b/README.md
index c476afb..fd0fa62 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,13 @@ install: $(DRIVER_TARGET)
$(call INSTALL_EXEC_SIGN,$(DRIVER_TARGET))
```
+You can also add the toolchain to your path and use it for other projects w/o any Makefile blueprint:
+
+```
+make
+source path/to/bin/mingw-w64-ddk-template/x86_64-w64-mingw32-gcc/bin/activate.sh
+```
+
## The CRT and CRT++
This project uses a very very rudimentary CRT for C and C++ projects.