From 715ee3c0f9524df8f6e49ca495692ea6d7af7e27 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 3 May 2023 20:43:31 -0300 Subject: [PATCH] ac97: Port to Linux --- .gitignore | 2 ++ ac97/Makefile.gcc | 22 ++++++++++++++++++++++ ac97/ac97.c | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ac97/Makefile.gcc diff --git a/.gitignore b/.gitignore index 3bb94c4..00f0327 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,6 @@ pci?????.bin *.exe *.com *.efi +pcireg/pcireg +ac97/ac97 PCIIDS.BIN diff --git a/ac97/Makefile.gcc b/ac97/Makefile.gcc new file mode 100644 index 0000000..0d0ea69 --- /dev/null +++ b/ac97/Makefile.gcc @@ -0,0 +1,22 @@ +# +# 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 gcc. +# +# +# +# Authors: RichardG, +# +# Copyright 2023 RichardG. +# + +export OBJS = ac97.o clib_pci.o clib_sys.o clib_term.o +export DEST = ac97 +export CFLAGS = -lpci + +include ../clib/gcc.mk diff --git a/ac97/ac97.c b/ac97/ac97.c index da664df..6c237e0 100644 --- a/ac97/ac97.c +++ b/ac97/ac97.c @@ -519,7 +519,7 @@ main(int argc, char **argv) return 1; /* Set silent mode. */ - if ((argc >= 1) && !strcmp(argv[1], "-s")) + if ((argc > 1) && !strcmp(argv[1], "-s")) silent = 1; /* Scan PCI bus 0. */