diff options
-rw-r--r-- | tools/ddcprobe/Makefile | 7 | ||||
-rw-r--r-- | tools/ddcprobe/ddcxinfos.c | 4 | ||||
-rw-r--r-- | tools/ddcprobe/vbe.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/tools/ddcprobe/Makefile b/tools/ddcprobe/Makefile index 73f601c7e..2026916f7 100644 --- a/tools/ddcprobe/Makefile +++ b/tools/ddcprobe/Makefile @@ -8,6 +8,9 @@ endif ifeq (x86_64,$(ARCH)) HAS_VBE = y endif +ifeq (ia64,$(ARCH)) +HAS_VBE = y +endif CC = gcc CFLAGS = -O -Wall # -g -DDEBUG @@ -17,6 +20,7 @@ ifeq (y,$(HAS_VBE)) LDFLAGS += -L. -lint10 -lx86emu OBJS = ddcxinfos.o vesamode.o vbe.o LIBS = libint10.a libx86emu.a +DEFS += -DHAVE_VBE endif ifeq (ppc,$(ARCH)) OBJS = ddcxinfos.o of.o minifind.o vbe.o vesamode.o @@ -24,6 +28,7 @@ endif ifeq (,$(OBJS)) OBJS = not_handled.o endif +CPPFLAGS= $(DEFS) TARGETS = ddcxinfos all: $(TARGETS) @@ -38,7 +43,7 @@ libint10.a: libx86emu.a $(MAKE) -C int10 %.o: %.c - $(CC) $(CFLAGS) $(INCS) -c $< -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $< -o $@ clean: $(MAKE) -C int10 clean diff --git a/tools/ddcprobe/ddcxinfos.c b/tools/ddcprobe/ddcxinfos.c index 7807ebf16..ebfa32df9 100644 --- a/tools/ddcprobe/ddcxinfos.c +++ b/tools/ddcprobe/ddcxinfos.c @@ -10,7 +10,7 @@ #include "vbe.h" #include "vesamode.h" -#if defined(__i386__) || defined(__x86_64__) +#ifdef HAVE_VBE #include "int10/vbios.h" #else #define InitInt10(PCI_CONFIG) 0 @@ -54,7 +54,7 @@ int main(void) printf("%dKB of video ram\n", vbe_info->memory_size / 1024); /* List supported standard modes */ -#if defined(__i386__) || defined(__x86_64__) +#ifdef HAVE_VBE for (j = 0; j < vbe_info->modes; j++) for (i = 0; known_vesa_modes[i].x; i++) if (known_vesa_modes[i].number == vbe_info->mode_list[j]) diff --git a/tools/ddcprobe/vbe.c b/tools/ddcprobe/vbe.c index 8d16f7472..b710c79bb 100644 --- a/tools/ddcprobe/vbe.c +++ b/tools/ddcprobe/vbe.c @@ -14,7 +14,7 @@ #include <unistd.h> #include "vesamode.h" #include "vbe.h" -#if defined(__i386__) || defined(__x86_64__) +#ifdef HAVE_VBE #include "int10/vbios.h" #endif @@ -32,7 +32,7 @@ #define cpuemu 0 #endif -#if defined(__i386__) || defined(__x86_64__) +#ifdef HAVE_VBE /* * Create a 'canonical' version, i.e. no spaces at start and end. * |