From 399b932481303c09ebed1cfaaa88538ffa4746ba Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Sat, 10 Oct 2009 17:38:33 -0400 Subject: [PATCH] At least pretend to split more ICH2 bits out into a config.mk. A real build system is in order here, but I so don't want to deal with it. --- grubload/Makefile | 3 ++- ich2/config.mk | 4 ++++ ich2/smram-hardware.h | 1 + include/smram.h | 2 +- netwatch/Makefile | 15 +++++++-------- 5 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 ich2/config.mk create mode 120000 ich2/smram-hardware.h diff --git a/grubload/Makefile b/grubload/Makefile index 8b89e59..7e9a93e 100644 --- a/grubload/Makefile +++ b/grubload/Makefile @@ -1,6 +1,7 @@ -include ../config.mk +-include ../ich2/config.mk -OBJS=main.o mbentry.o realmode.o loader.o ../pci/pci-raw.o ../lib/minilib.o ../lib/console.o ../ich2/smram-ich2.o ../ich2/smi.o output.o ../lib/sprintf.o ../lib/doprnt.o ../pci/pci.o +OBJS=main.o mbentry.o realmode.o loader.o ../pci/pci-raw.o ../lib/minilib.o ../lib/console.o $(CHIP_OBJS) output.o ../lib/sprintf.o ../lib/doprnt.o ../pci/pci.o CC=$(CROSS)gcc CFLAGS=-nostdlib -I../include -I../include/raw -I. -D__RAW__ -fno-builtin -nostdinc -Wall -Werror -pedantic -std=gnu99 diff --git a/ich2/config.mk b/ich2/config.mk new file mode 100644 index 0000000..5164324 --- /dev/null +++ b/ich2/config.mk @@ -0,0 +1,4 @@ +CFLAGS += -DNETWATCH_ICH2 -I../ich2 +CHIP_OBJS += ../ich2/ich2-timer.o \ + ../ich2/smi.o \ + ../ich2/smram-ich2.o diff --git a/ich2/smram-hardware.h b/ich2/smram-hardware.h new file mode 120000 index 0000000..ef1740f --- /dev/null +++ b/ich2/smram-hardware.h @@ -0,0 +1 @@ +smram-ich2.h \ No newline at end of file diff --git a/include/smram.h b/include/smram.h index 5509d09..8e04b1e 100644 --- a/include/smram.h +++ b/include/smram.h @@ -1,7 +1,7 @@ #ifndef __SMRAM_H #define __SMRAM_H -#include "../ich2/smram-ich2.h" +#include "smram-hardware.h" extern int smram_locked(); extern smram_state_t smram_save_state(); diff --git a/netwatch/Makefile b/netwatch/Makefile index eb3da87..11a837b 100644 --- a/netwatch/Makefile +++ b/netwatch/Makefile @@ -1,11 +1,12 @@ -include ../config.mk +-include ../ich2/config.mk CC=$(CROSS)gcc -CFLAGS=-I../include -I../include/raw \ - -I../lwip/src/include -I../lwip/src/include/ipv4 \ - -nostdlib -nostdinc -fno-builtin -D__RAW__ \ - -Wall -Werror -std=gnu99 -Wstrict-aliasing=2 \ - -O1 -fno-merge-constants -fno-strict-aliasing +CFLAGS+=-I../include -I../include/raw \ + -I../lwip/src/include -I../lwip/src/include/ipv4 \ + -nostdlib -nostdinc -fno-builtin -D__RAW__ \ + -Wall -Werror -std=gnu99 -Wstrict-aliasing=2 \ + -O1 -fno-merge-constants -fno-strict-aliasing STUBOBJS=entry.o pagingstub-asm.o pagingstub.o @@ -36,9 +37,7 @@ LWIP_OBJS = \ ../lwip/src/netif/ethernetif.o -OBJS = ../ich2/smi.o \ - ../ich2/smram-ich2.o \ - ../ich2/ich2-timer.o \ +OBJS = $(CHIP_OBJS) \ ../pci/pci.o \ ../pci/pci-raw.o \ ../pci/pci-bother.o \ -- 2.43.0