# Copyright (C) 1996 Shigeyuki Nakagawa

KLIC	= klic
KFLAGS	=
LIBS	=
OBJS	= main.o internal.o ttycom.o dduio.o ttyio.o socket.o 
TGOBJS	= test.o

TARGET	= ddu
CONSOLE = dduconsole
TMAIN	= tmain

.SUFFIXES :
.SUFFIXES : .kl1 .o

.kl1.o:
	$(KLIC) $(KFLAGS) -c $<

$(TARGET): $(OBJS) $(TGOBJS)
	$(KLIC) -o $@ $(OBJS) $(TGOBJS) $(LIBS)

$(TMAIN): $(TGOBJS) tmain.o
	$(KLIC) -o $@ tmain.o $(TGOBJS) $(LIBS)

$(CONSOLE): console.o
	gcc -o $@ console.o

console.o: console/console.c
	gcc -c -O2 -fomit-frame-pointer console/console.c

all: $(TARGET) $(CONSOLE) $(TMAIN)

clean:
	rm -f $(TARGET) $(CONSOLE) $(TMAIN) *.o *.c *.ext *.db *.h
