aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-09-09 17:50:28 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-09-09 18:24:21 +0200
commit51521cb642358770e94b8f9b4f40dd3b4c827cad (patch)
tree4795b8bffcdf2b628d9c9be15a4ebb1150f9f760
parent3be8cccbdbb548a4538d23470aa20e65b33e7815 (diff)
Repository clean up, renamed ddk-template* to dpp-example*.
* Improved/Added root and examples Makefile * Adapted CIs Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--.circleci/config.yml4
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--.gitignore2
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--Makefile69
-rw-r--r--README.md2
-rw-r--r--examples/Makefile59
-rwxr-xr-xexamples/dpp-example-cplusplus-EASTL.bat (renamed from ddk-template-cplusplus-EASTL.bat)4
-rw-r--r--examples/dpp-example-cplusplus-EASTL.cpp (renamed from ddk-template-cplusplus-EASTL.cpp)0
-rwxr-xr-xexamples/dpp-example-cplusplus.bat (renamed from ddk-template-cplusplus.bat)4
-rw-r--r--examples/dpp-example-cplusplus.cpp (renamed from ddk-template-cplusplus.cpp)0
-rwxr-xr-xexamples/dpp-example.bat (renamed from ddk-template.bat)4
-rw-r--r--examples/dpp-example.c (renamed from ddk-template.c)0
13 files changed, 90 insertions, 70 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b7285ce..e26ea1a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -24,10 +24,10 @@ jobs:
DDK_INCLUDE_DIR=/usr/x86_64-w64-mingw32/include/ddk
- run: |
env DEBIAN_FRONTEND=noninteractive \
- make install \
+ make examples-install \
WERROR=1 Q= \
CC=/usr/bin/x86_64-w64-mingw32-gcc \
CXX=/usr/bin/x86_64-w64-mingw32-g++ \
RC=/usr/bin/x86_64-w64-mingw32-windres \
DDK_INCLUDE_DIR=/usr/x86_64-w64-mingw32/include/ddk \
- DESTDIR=_install/
+ DESTDIR=$(realpath _install)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1501df5..5edbcd4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -39,7 +39,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install autoconf automake cmake libtool pkg-config gettext flex bison
- sudo apt-get install ${{ matrix.compiler }} lcov
+ sudo apt-get install ${{ matrix.compiler }} lcov osslsigncode
- name: Print Help
run: |
make help
@@ -48,7 +48,11 @@ jobs:
make deps
- name: Build Examples
run: |
- make all
+ make examples
+ - name: Install Examples
+ run: |
+ make examples-install DESTDIR=$(realpath _install)
+ ls -alh _install
- name: Cleanup
run: |
make deps-clean
diff --git a/.gitignore b/.gitignore
index 40f8e1c..a7d7710 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,7 @@
/codesign-*
/EASTL-build/
/EASTL-native-build/
-/w64-mingw32-sysroot/
+/mingw-w64-sysroot/
/*.o
/*.opp
/CRT/*.o
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 18a362d..f960f88 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -56,8 +56,8 @@ build:
- pwd
- mkdir -p ./mingw-w64-build && touch ./mingw-w64-build/mingw-w64-build
- touch -m ./mingw-w64-sysroot/x86_64/bin/x86_64-w64-mingw32-gcc
- - make -j1 all WERROR=1 Q=
- - make -j1 install WERROR=1 Q= DESTDIR=_install
+ - make -j1 examples WERROR=1 Q=
+ - make -j1 examples-install WERROR=1 Q= DESTDIR=$(realpath _install)
- ls -alh _install
artifacts:
expire_in: 1 week
diff --git a/Makefile b/Makefile
index 14da815..5e283bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,65 +1,22 @@
-1_DRIVER_NAME = ddk-template
-1_OBJECTS = $(1_DRIVER_NAME).o
-1_TARGET = $(1_DRIVER_NAME).sys
-
-2_DRIVER_NAME = ddk-template-cplusplus
-2_OBJECTS = $(2_DRIVER_NAME).opp
-2_TARGET = $(2_DRIVER_NAME).sys
-
-3_DRIVER_NAME = ddk-template-cplusplus-EASTL
-3_OBJECTS = $(3_DRIVER_NAME).opp
-3_TARGET = $(3_DRIVER_NAME).sys
-
-DPP_ROOT = .
-INSTALL = install
-
-ifndef BUILD_NATIVE
-
-all: $(1_TARGET) $(2_TARGET) $(3_TARGET)
-
-include $(DPP_ROOT)/Makefile.inc
-
-%.o: %.c
- $(call BUILD_C_OBJECT,$<,$@)
-
-%.opp: %.cpp
- $(call BUILD_CPP_OBJECT,$<,$@)
-
-# simple C driver
-$(1_TARGET): $(1_OBJECTS)
- $(call LINK_C_KERNEL_TARGET,$(1_OBJECTS),$@)
-
-# C++ driver w/ MT
-$(2_TARGET): $(2_OBJECTS)
- $(call LINK_CPP_KERNEL_TARGET,$(2_OBJECTS),$@)
-
-# C++ driver w/ EASTL
-$(3_TARGET): $(3_OBJECTS)
- $(call LINK_CPP_KERNEL_TARGET,$(3_OBJECTS),$@)
-
-install: all
- $(call INSTALL_EXEC_SIGN,$(1_TARGET))
- $(call INSTALL_EXEC_SIGN,$(2_TARGET))
- $(call INSTALL_EXEC_SIGN,$(3_TARGET))
- $(INSTALL) $(1_DRIVER_NAME).bat $(DESTDIR)
- $(INSTALL) $(2_DRIVER_NAME).bat $(DESTDIR)
- $(INSTALL) $(3_DRIVER_NAME).bat $(DESTDIR)
-
-endif
-
-clean:
- rm -f $(1_OBJECTS) $(1_TARGET) $(1_TARGET).map
- rm -f $(2_OBJECTS) $(2_TARGET) $(2_TARGET).map
- rm -f $(3_OBJECTS) $(3_TARGET) $(3_TARGET).map
-
#
# Targets for building dependencies e.g. mingw-gcc/g++, STL, etc.
#
+DPP_ROOT = .
+
ifndef JOBS
JOBS := 4
endif
+examples:
+ $(MAKE) -C examples DPP_ROOT=$(realpath $(DPP_ROOT)) all
+
+examples-clean:
+ $(MAKE) -C examples DPP_ROOT=$(realpath $(DPP_ROOT)) clean
+
+examples-install:
+ $(MAKE) -C examples DPP_ROOT=$(realpath $(DPP_ROOT)) install
+
deps:
$(MAKE) -C $(DPP_ROOT) -f Makefile.deps WERROR=1 JOBS=$(JOBS) Q=$(Q)
$(MAKE) -C $(DPP_ROOT) -f Makefile.deps BUILD_NATIVE=1 WERROR=1 JOBS=$(JOBS) Q=$(Q)
@@ -73,5 +30,5 @@ deps-clean:
help:
$(MAKE) -C $(DPP_ROOT) -f Makefile.deps help
-.PHONY: all install distclean clean
-.DEFAULT_GOAL := all
+.PHONY: examples deps deps-distclean deps-clean help
+.DEFAULT_GOAL := deps
diff --git a/README.md b/README.md
index 76d90e4..5ffb386 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
[![Build](https://github.com/utoni/mingw-w64-dpp/actions/workflows/build.yml/badge.svg "Github Actions")](https://github.com/utoni/mingw-w64-dpp/actions/workflows/build.yml)
-[![Gitlab-CI](https://gitlab.com/utoni/mingw-w64-dpp/badges/main/pipeline.svg "Gitlab-CI: main branch")](https://gitlab.com/utoni/mingw-w64-dpp/-/pipelines)
+[![Gitlab-CI](https://gitlab.com/utoni/mingw-w64-ddk-template/badges/main/pipeline.svg "Gitlab-CI: main branch")](https://gitlab.com/utoni/mingw-w64-ddk-template/-/pipelines)
[![Circle-CI](https://circleci.com/gh/utoni/mingw-w64-dpp.svg?style=shield "Circle-CI")](https://app.circleci.com/pipelines/github/utoni/mingw-w64-dpp)
# Mingw64 Driver Plus Plus
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..d260b22
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,59 @@
+ifndef DPP_ROOT
+$(error DPP_ROOT is undefined, use `make DPP_ROOT=$(realpath ..)`)
+endif
+
+include $(DPP_ROOT)/Makefile.inc
+
+1_DRIVER_NAME = dpp-example
+1_OBJECTS = $(1_DRIVER_NAME).o
+1_TARGET = $(1_DRIVER_NAME).sys
+
+2_DRIVER_NAME = dpp-example-cplusplus
+2_OBJECTS = $(2_DRIVER_NAME).opp
+2_TARGET = $(2_DRIVER_NAME).sys
+
+3_DRIVER_NAME = dpp-example-cplusplus-EASTL
+3_OBJECTS = $(3_DRIVER_NAME).opp
+3_TARGET = $(3_DRIVER_NAME).sys
+
+ifdef BUILD_NATIVE
+$(error There is nothing the build as native executable here..)
+endif
+
+all: $(1_TARGET) $(2_TARGET) $(3_TARGET)
+
+include $(DPP_ROOT)/Makefile.inc
+
+%.o: %.c
+ $(call BUILD_C_OBJECT,$<,$@)
+
+%.opp: %.cpp
+ $(call BUILD_CPP_OBJECT,$<,$@)
+
+# simple C driver
+$(1_TARGET): $(1_OBJECTS)
+ $(call LINK_C_KERNEL_TARGET,$(1_OBJECTS),$@)
+
+# C++ driver w/ MT
+$(2_TARGET): $(2_OBJECTS)
+ $(call LINK_CPP_KERNEL_TARGET,$(2_OBJECTS),$@)
+
+# C++ driver w/ EASTL
+$(3_TARGET): $(3_OBJECTS)
+ $(call LINK_CPP_KERNEL_TARGET,$(3_OBJECTS),$@)
+
+install: all
+ $(call INSTALL_EXEC_SIGN,$(1_TARGET))
+ $(call INSTALL_EXEC_SIGN,$(2_TARGET))
+ $(call INSTALL_EXEC_SIGN,$(3_TARGET))
+ $(INSTALL) $(1_DRIVER_NAME).bat $(DESTDIR)
+ $(INSTALL) $(2_DRIVER_NAME).bat $(DESTDIR)
+ $(INSTALL) $(3_DRIVER_NAME).bat $(DESTDIR)
+
+clean:
+ rm -f $(1_OBJECTS) $(1_TARGET) $(1_TARGET).map
+ rm -f $(2_OBJECTS) $(2_TARGET) $(2_TARGET).map
+ rm -f $(3_OBJECTS) $(3_TARGET) $(3_TARGET).map
+
+.PHONY: all install clean
+.DEFAULT_GOAL := all
diff --git a/ddk-template-cplusplus-EASTL.bat b/examples/dpp-example-cplusplus-EASTL.bat
index 58d8c5f..9793eee 100755
--- a/ddk-template-cplusplus-EASTL.bat
+++ b/examples/dpp-example-cplusplus-EASTL.bat
@@ -1,6 +1,6 @@
@echo off
-set SERVICE_NAME=DDK-Template-CPlusPlus-EASTL
-set DRIVER="%~dp0\ddk-template-cplusplus-EASTL.sys"
+set SERVICE_NAME=DPP-Example-CPlusPlus-EASTL
+set DRIVER="%~dp0\dpp-example-cplusplus-EASTL.sys"
net session >nul 2>&1
if NOT %ERRORLEVEL% EQU 0 (
diff --git a/ddk-template-cplusplus-EASTL.cpp b/examples/dpp-example-cplusplus-EASTL.cpp
index b57815d..b57815d 100644
--- a/ddk-template-cplusplus-EASTL.cpp
+++ b/examples/dpp-example-cplusplus-EASTL.cpp
diff --git a/ddk-template-cplusplus.bat b/examples/dpp-example-cplusplus.bat
index 4ea1ec3..d19d3bf 100755
--- a/ddk-template-cplusplus.bat
+++ b/examples/dpp-example-cplusplus.bat
@@ -1,6 +1,6 @@
@echo off
-set SERVICE_NAME=DDK-Template-CPlusPlus
-set DRIVER="%~dp0\ddk-template-cplusplus.sys"
+set SERVICE_NAME=DPP-Example-CPlusPlus
+set DRIVER="%~dp0\dpp-example-cplusplus.sys"
net session >nul 2>&1
if NOT %ERRORLEVEL% EQU 0 (
diff --git a/ddk-template-cplusplus.cpp b/examples/dpp-example-cplusplus.cpp
index c1d9b29..c1d9b29 100644
--- a/ddk-template-cplusplus.cpp
+++ b/examples/dpp-example-cplusplus.cpp
diff --git a/ddk-template.bat b/examples/dpp-example.bat
index f26461c..cada015 100755
--- a/ddk-template.bat
+++ b/examples/dpp-example.bat
@@ -1,6 +1,6 @@
@echo off
-set SERVICE_NAME=DDK-Template
-set DRIVER="%~dp0\ddk-template.sys"
+set SERVICE_NAME=DPP-Example
+set DRIVER="%~dp0\dpp-example.sys"
net session >nul 2>&1
if NOT %ERRORLEVEL% EQU 0 (
diff --git a/ddk-template.c b/examples/dpp-example.c
index 8a14af9..8a14af9 100644
--- a/ddk-template.c
+++ b/examples/dpp-example.c