CXX = $(CC)
CFLAGS = $(DEFS) -DDIALOG_CHAR=char -I../../include -I. #-Wall
CXXFLAGS = $(CFLAGS)
LDFLAGS = $(DEFS) -L../../lib -L.
ifdef DEFS
LIBES=-laa -lnd_g -lpanel -lncurses -lbasis_g
else
LIBES=-laa -lnd -lpanel -lncurses -lbasis
endif
SUBDIRS=read-edid

all: modeline
	for x in $(SUBDIRS); do \
	    $(MAKE) -C $$x all; \
	done

clean:
	rm -f modeline
	for x in $(SUBDIRS); do \
	    $(MAKE) -C $$x clean; \
	done

install: modeline
	install -d $(DESTDIR)/usr/lib/admin
	install -c -m 111 -o bin -g bin modeline $(DESTDIR)/usr/lib/admin
	for x in $(SUBDIRS); do \
	    $(MAKE) -C $$x install; \
	done


modeline:  modeline_vfr.c
	$(CC) $(CFLAGS) -o modeline modeline_vfr.c
