diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b4942b..96a5f98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,8 +63,8 @@ jobs: cd ${{ github.workspace }}/pcireg wmake make -f Makefile.uefi ARCH=x86_64 - make -f Makefile.gcc clean all CC=i686-w64-mingw32-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static LDAPPEND=-lcfgmgr32 CP437_CONV=y DEST=pciregw - make -f Makefile.gcc clean all CC=x86_64-w64-mingw32-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static LDAPPEND=-lcfgmgr32 CP437_CONV=y DEST=pciregw64 + make -f Makefile.win32 clean all X64=n + make -f Makefile.win32 clean all X64=y make -f Makefile.gcc clean all CC=i686-linux-gnu-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static - name: Build `usblgoff` run: | diff --git a/pcireg/Makefile.gcc b/pcireg/Makefile.gcc index 4576cbb..ba9205b 100644 --- a/pcireg/Makefile.gcc +++ b/pcireg/Makefile.gcc @@ -17,6 +17,6 @@ export OBJS = pcireg.o lh5_extract.o clib_pci.o clib_std.o clib_sys.o clib_term.o export DEST = pcireg -override LDFLAGS += -lpci $(LDAPPEND) +override LDFLAGS += -lpci include ../clib/gcc.mk diff --git a/pcireg/Makefile.win32 b/pcireg/Makefile.win32 new file mode 100644 index 0000000..d08432f --- /dev/null +++ b/pcireg/Makefile.win32 @@ -0,0 +1,29 @@ +# +# 86Box A hypervisor and IBM PC system emulator that specializes in +# running old operating systems and software designed for IBM +# PC systems and compatibles from 1981 through fairly recent +# system designs based on the PCI bus. +# +# This file is part of the 86Box Probing Tools distribution. +# +# Makefile for compiling C-based tools with MinGW gcc. +# +# +# +# Authors: RichardG, +# +# Copyright 2024 RichardG. +# + +ifeq "$(X64)" "y" +override CC = x86_64-w64-mingw32-gcc +override DEST = pciregw64.exe +else +override CC = i686-w64-mingw32-gcc +override DEST = pciregw.exe +endif +export CP437_CONV ?= y +override LDFLAGS += -static +override LDAPPEND += -lcfgmgr32 + +include Makefile.gcc diff --git a/pcireg/README.md b/pcireg/README.md index 2cb78bb..93f2cb2 100644 --- a/pcireg/README.md +++ b/pcireg/README.md @@ -53,7 +53,7 @@ Building make CROSS_COMPILE=i686-w64-mingw32- HOST=i586-windows ZLIB=no DNS=no SHARED=no IDSDIR="" sudo make install-lib PREFIX=/usr/i686-w64-mingw32 cd .. - make -f Makefile.gcc CC=i686-w64-mingw32-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static LDAPPEND=-lcfgmgr32 CP437_CONV=y DEST=pciregw + make -f Makefile.win32 X64=n ``` * 64-bit: ``` @@ -62,7 +62,7 @@ Building make CROSS_COMPILE=x86_64-w64-mingw32- HOST=x86_64-windows ZLIB=no DNS=no SHARED=no IDSDIR="" sudo make install-lib PREFIX=/usr/x86_64-w64-mingw32 cd .. - make -f Makefile.gcc CC=x86_64-w64-mingw32-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static LDAPPEND=-lcfgmgr32 CP437_CONV=y DEST=pciregw64 + make -f Makefile.win32 X64=y ``` ### Linux target