
CC = gcc
OPTIMIZE = -fomit-frame-pointer -O2
CFLAGS = -Wall $(OPTIMIZE)
LFLAGS = -N -s
CFLAGS = -O2 -fomit-frame-pointer

UTILPROGS = restorefont convfont restoretextmode restorepalette dumpreg \
	fix132x43
OBJECTS = restorefont.o convfont.o restoretextmode.o restorepalette.o \
	dumpreg.o fix132x43.o


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

.o:
	$(CC) $(CFLAGS) $(LFLAGS) -o $* $*.o -lvga $(LIBS)
	chmod a+rs,go-w $*


all		:	$(UTILPROGS)


clean		:
	rm -f $(UTILPROGS)


dep:
	rm -f .depend
	make .depend

.depend:
	gcc -MM $(patsubst %.o,%.c,$(OBJECTS)) >.depend

include .depend
