From f370b3841fbec8911ce5800ab1924f89fbbfa477 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 21 Aug 2024 13:03:00 +0200 Subject: Compile `EfiDSEFix` with Mingw64 Signed-off-by: Toni Uhlig --- Application/EfiDSEFix/Makefile.mingw | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Application/EfiDSEFix/Makefile.mingw (limited to 'Application/EfiDSEFix/Makefile.mingw') diff --git a/Application/EfiDSEFix/Makefile.mingw b/Application/EfiDSEFix/Makefile.mingw new file mode 100644 index 0000000..ae6f8d3 --- /dev/null +++ b/Application/EfiDSEFix/Makefile.mingw @@ -0,0 +1,31 @@ +CC = x86_64-w64-mingw32-gcc +CXX = x86_64-w64-mingw32-g++ +CFLAGS = -m64 -fPIC -mconsole -municode +TARGETS := src/main.o src/pe.o src/sysinfo.o src/EfiDSEFix.o src/hde/hde64.o +IMPLIBS := -lntdll + +all: EfiDSEFix.exe + +clean: + rm -f EfiDSEFix.exe $(TARGETS) + +EfiDSEFix.exe: $(TARGETS) + $(CXX) $(CFLAGS) $(TARGETS) $(IMPLIBS) -o $@ + +src/main.o: src/main.cpp + $(CXX) $(CFLAGS) -c src/main.cpp -o $@ + +src/pe.o: src/pe.cpp + $(CXX) $(CFLAGS) -c src/pe.cpp -o $@ + +src/sysinfo.o: src/sysinfo.cpp + $(CXX) $(CFLAGS) -c src/sysinfo.cpp -o $@ + +src/EfiDSEFix.o: src/ntdll.h src/EfiCompat.h src/EfiDSEFix.h src/EfiDSEFix.cpp + $(CXX) $(CFLAGS) \ + -I ../../../MdePkg/Include \ + -I ../../Include \ + -c src/EfiDSEFix.cpp -o $@ + +src/hde/hde64.o: src/hde/hde64.h src/hde/table64.h src/hde/hde64.c + $(CC) $(CFLAGS) -c src/hde/hde64.c -o $@ -- cgit v1.2.3