# If you dont want the XPM code compiled in then hash out the following XPM
# line. If you do want to check it out then you must have the Xpm and X11
# libraries installed - but this doesnt mean you need to be running X.
XPM=true

# If you have fonts like medeival-16 and roman-16 in your consolefonts
# directory you can unhash this line for the fontdemo program. This doesnt't
# affect the library routines in libvgamisc.a
STANDARD_FONTS=-DSTANDARD_FONTS

CC=gcc

ifdef XPM
CFLAGS=-O2 -g $(STANDARD_FONTS) -DXPM -I/usr/X386/include
CFLAGS=-O2 $(STANDARD_FONTS) -DXPM -I/usr/X386/include
LDFLAGS=-g -L/usr/src/svgalib/src
LDFLAGS=-s #-Wl,-qmagic
LDLIBS=-lvga -DXPM -L/usr/X386/lib -lXpm -lX11
else
CFLAGS=-O2 $(STANDARD_FONTS)
CFLAGS=-O2 -g $(STANDARD_FONTS)
LDFLAGS=-s #-Wl,-qmagic
LDFLAGS=-g -L/usr/src/svgalib/src
LDLIBS=-lvga
endif

LIBVGAOBJS=fontutils.o miscutils.o vgaget.o loadim.o

all: libvgamisc.a fontdemo

fontdemo: fontdemo.o libvgamisc.a

libvgamisc.a: libvgamisc.a($(LIBVGAOBJS))
	ar rcv $@ $^
	ranlib $@

clean:
	rm -f *.o *~ fontdemo libvgamisc.a

vgaget.o: vgaget.c vgaget.h
fontutils.o: fontutils.c fontutils.h
miscutils.o: miscutils.c miscutils.h
loadim.o: loadim.c
