diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-23 17:33:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-23 17:33:43 +0000 |
commit | c491f8e99349e4022fac0dec6536ab4b43396507 (patch) | |
tree | dfc2f6bba4d40995ef4e0c152a533ad12ff47d1e /Makefile | |
parent | 3b6ec4ddecee5811e38d757f15a56edfbce79b4a (diff) | |
download | monitor-edid-c491f8e99349e4022fac0dec6536ab4b43396507.tar monitor-edid-c491f8e99349e4022fac0dec6536ab4b43396507.tar.gz monitor-edid-c491f8e99349e4022fac0dec6536ab4b43396507.tar.bz2 monitor-edid-c491f8e99349e4022fac0dec6536ab4b43396507.tar.xz monitor-edid-c491f8e99349e4022fac0dec6536ab4b43396507.zip |
*** empty log message ***
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8e97468 --- /dev/null +++ b/Makefile @@ -0,0 +1,84 @@ +PACKAGE = monitor-edid +VERSION = 1.0 +FILES = $(shell ls | grep -v CVS | grep -vF .tar) + +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 +ifeq (ppc,$(ARCH)) +HAS_OPEN_FIRMWARE = y +endif +ifeq (ppc64,$(ARCH)) +HAS_OPEN_FIRMWARE = y +endif + +HAS_VBE = y +HAS_OPEN_FIRMWARE = y + +TARGETS = monitor-get-edid + +CFLAGS = -O -Wall # -g -DDEBUG +OBJS = monitor-get-edid.c + +ifeq (y,$(HAS_VBE)) +OBJS += vbe.o libint10.a libx86emu.a +else +ifeq (y,$(HAS_OPEN_FIRMWARE)) +OBJS += open_firmware.o minifind.o +else +$(error "can't access EDID since neither VBE nor open firmware supported") +endif +endif + + +all: $(TARGETS) + +monitor-get-edid: $(OBJS) + +libx86emu.a: x86emu/*.c + $(MAKE) -C x86emu + +libint10.a: int10/*.c + $(MAKE) -C int10 + +clean: + $(MAKE) -C int10 clean + $(MAKE) -C x86emu clean + $(RM) $(TARGETS) *.a *.o *~ + rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2 + + +# rules to build a test rpm + +localsrpm: localdist + rpm -ts $(PACKAGE)-$(VERSION).tar.bz2 + +localrpm: localdist buildrpm + +localdist: cleandist dir localcopy tar + +cleandist: clean + +dir: + mkdir $(PACKAGE)-$(VERSION) + +localcopy: + tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION) + +tar: + tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION) + bzip2 -9vf $(PACKAGE)-$(VERSION).tar + rm -rf $(PACKAGE)-$(VERSION) + +buildrpm: + rpm -ta $(PACKAGE)-$(VERSION).tar.bz2 |