AR	=ar
AS	=as
CPP	=cc
# VIDEO7 flag should be used on weird non-standard, old cards like my Video7
# ie. if your card doesn't display the right things, or does not return to text
# mode properly, try setting VIDEO7, do 'make clean' then 'make' and test again
CFLAGS	=-DVIDEO7

.c.o:
	$(CPP) $(CFLAGS) -c -o $*.o $<

.s.o:
	$(AS) $<

all:	libvga.a vgatest

libvga.a: vga.o ioperm.o mmap.o port_in.o port_out.o
	$(AR) rcs libvga.a vga.o ioperm.o mmap.o port_in.o port_out.o
	cp libvga.a /usr/lib
	cp vga.h /usr/include

vgatest: libvga.a vgatest.o 
	$(CPP) $(CFLAGS) -o vgatest vgatest.o -lvga

clean:
	rm -f *.o libvga.a vgatest

vga.o: vga.c vga.h emulib.h
vgatest.o: vgatest.c vga.h emulib.h
