pcireg: Move extensive Win32 flag sequence to a dedicated makefile

This commit is contained in:
RichardG867
2024-10-26 11:19:15 -03:00
parent 29b7b6e262
commit aba2c775bf
4 changed files with 34 additions and 5 deletions

View File

@@ -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: |

View File

@@ -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

29
pcireg/Makefile.win32 Normal file
View File

@@ -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, <richardg867@gmail.com>
#
# 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

View File

@@ -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