summaryrefslogtreecommitdiffstats
path: root/tools/ddcprobe/Makefile
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
committerMystery Man <unknown@mandriva.org>2005-10-20 14:05:54 +0000
commit9b6a0d83d135fad376b4eadcb2bd7bd8c8a07aa5 (patch)
treef3ef7ada2ce82dafb6d41cc087b0cc7fdfc40a46 /tools/ddcprobe/Makefile
parent3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff)
downloaddrakx-backup-do-not-use-10_34_11_100mdk.tar
drakx-backup-do-not-use-10_34_11_100mdk.tar.gz
drakx-backup-do-not-use-10_34_11_100mdk.tar.bz2
drakx-backup-do-not-use-10_34_11_100mdk.tar.xz
drakx-backup-do-not-use-10_34_11_100mdk.zip
This commit was manufactured by cvs2svn to create tagV10_34_11_100mdk
'V10_34_11_100mdk'.
Diffstat (limited to 'tools/ddcprobe/Makefile')
-rw-r--r--tools/ddcprobe/Makefile63
1 files changed, 44 insertions, 19 deletions
diff --git a/tools/ddcprobe/Makefile b/tools/ddcprobe/Makefile
index bcbf1464d..321c5f4e9 100644
--- a/tools/ddcprobe/Makefile
+++ b/tools/ddcprobe/Makefile
@@ -1,29 +1,54 @@
-CFLAGS=-Wall -O # -g -DDEBUG
-LDFLAGS = -lm
-TARGETS=ddcxinfos
-
-ARCH := $(patsubst i%86,i386,$(shell uname -m))
-ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(patsubst i%86,i386,$(shell uname -m))
+ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(patsubst amd64,x86_64,$(ARCH))
ifeq (i386,$(ARCH))
+HAS_VBE = y
+endif
+ifeq (x86_64,$(ARCH))
+HAS_VBE = y
+endif
+ifeq (ia64,$(ARCH))
+HAS_VBE = y
+endif
-ddcxinfos: lrmi.o vesamode.o vbe.o ddcxinfos.o
+CC = gcc
+CFLAGS = -O -Wall # -g -DDEBUG
+INCS = -I.
+LDFLAGS = -lm
+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
+endif
+ifeq (ppc64,$(ARCH))
+OBJS = ddcxinfos.o of.o minifind.o vbe.o vesamode.o
+endif
+ifeq (,$(OBJS))
+OBJS = not_handled.o
+endif
+CPPFLAGS= $(DEFS)
+TARGETS = ddcxinfos
-libvbe.a: lrmi.o vesamode.o vbe.o
- $(AR) cru $@ $^
+all: $(TARGETS)
-#install: $(DESTDIR)/usr/include/vbe.h $(DESTDIR)/usr/lib/libvbe.a
+ddcxinfos: $(OBJS) $(LIBS)
+ $(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
-$(DESTDIR)/usr/include/vbe.h:
- install -m 644 vbe.h $(DESTDIR)/usr/include/vbe.h
+libx86emu.a: x86emu/*.c
+ $(MAKE) -C x86emu
-$(DESTDIR)/usr/lib/libvbe.a:
- install -m 644 libvbe.a $(DESTDIR)/usr/lib/libvbe.a
+libint10.a: libx86emu.a int10/*.c
+ $(MAKE) -C int10
-else
-ddcxinfos: not_handled.c
- gcc -o $@ $<
-endif
+%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $< -o $@
clean:
- $(RM) $(TARGETS) *.o core
+ $(MAKE) -C int10 clean
+ $(MAKE) -C x86emu clean
+ $(RM) $(TARGETS) $(LIBS) *.o core