NAME = monitor-edid VERSION = 3.3 FILES = $(shell ls | grep -v CVS | grep -vF .tar) SVNPATH = svn+ssh://svn.mageia.org/svn/soft/monitor-edid 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 = ifdef HAS_VBE TARGETS += monitor-get-edid-using-vbe endif CPPFLAGS = -I. CFLAGS = -O -Wall -g OBJS = monitor-get-edid-using-vbe.c vbe.o monitor-get-edid-using-vbe: LDFLAGS += -lx86 all: $(TARGETS) monitor-get-edid-using-vbe: $(OBJS) install: $(TARGETS) install -d $(DESTDIR)$(bindir) install -d $(DESTDIR)$(sbindir) install monitor-edid monitor-probe monitor-probe-using-X $(DESTDIR)$(sbindir) ifdef HAS_VBE install monitor-get-edid-using-vbe $(DESTDIR)$(sbindir) endif install monitor-parse-edid $(DESTDIR)$(bindir) ln -sf monitor-edid $(DESTDIR)$(sbindir)/monitor-get-edid clean: $(RM) $(TARGETS) *.a *.o *~ rm -rf $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ dist: dis dis: clean @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz > $(NAME)-$(VERSION).tar.xz; $(info $(NAME)-$(VERSION).tar.xz is ready) tag: git tag $(VERSION)