NAME = monitor-edid VERSION = 1.15 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 DESTDIR= bindir=/usr/bin sbindir=/usr/sbin TARGETS = monitor-get-edid-using-vbe cvt CPPFLAGS = -I. 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 install: install -d $(DESTDIR)$(bindir) install -d $(DESTDIR)$(sbindir) install monitor-edid monitor-get-edid-using-vbe monitor-probe monitor-probe-using-X $(DESTDIR)$(sbindir) install monitor-parse-edid $(DESTDIR)$(bindir) install cvt $(DESTDIR)$(bindir)/vesa-cvt ln -s monitor-edid $(DESTDIR)$(sbindir)/monitor-get-edid clean: $(MAKE) -C int10 clean $(MAKE) -C x86emu clean $(RM) $(TARGETS) *.a *.o *~ rm -rf $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.bz2 %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ dis: rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar* svn export -q -rBASE . $(NAME)-$(VERSION) find $(NAME)-$(VERSION) -name .cvsignore |xargs rm -rf tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION) bzip2 -9f ../$(NAME)-$(VERSION).tar rm -rf $(NAME)-$(VERSION)