PACKAGE = monitor-edid VERSION = 1.10 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 TARGETS = monitor-get-edid-using-vbe cvt CFLAGS = -O -Wall -g OBJS = monitor-get-edid-using-vbe.c vbe.o libint10.a libx86emu.a ifeq (i386,$(ARCH)) OBJS += lrmi.o endif all: $(TARGETS) cvt: LDFLAGS += -lm monitor-get-edid-using-vbe: $(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