TARGET = pie
OBJS = pie.obj pietable.obj key.obj main.obj


BIN = $(TARGET).bin
FX = $(TARGET).fx
CF = $(TARGET).cf

CFLAGS = -O
LFLAGS =

.SUFFIXES: .fx .bin .obj .a86 .c

.c.obj:
	doscmd lcc86 -c $(CFLAGS) $<

$(FX) : $(BIN) $(CF)
	doscmd mkfent16 $(CF)

$(BIN) : $(OBJS)
	doscmd lcc86 -o $(BIN) $(LFLAGS) $(OBJS)

clean:
	rm -rf *.bin *.obj *.fx

pietable.c : pietable.euc
	nkf -s pietable.euc > pietable.c

pie_p.h : pie.h
main.c : pie.h
pie.c : pie_p.h pie.h
pietable.c : pie_p.h
