CC	= cc

# if ncurses is not on a default place edit the two following
# lines and uncomment them. Then run make.

#NCFLAG = -I/home/waterlan/include  # Place where (n)curses.h resides.
#NLFLAG = -L/home/waterlan/lib      # Place where libncurses.* resides.

CFLAGS  = -O -Aa -Ic3po $(NCFLAG)
LFLAGS  = $(NLFLAG) -lncurses
DEFS    = -DUNIX -DWCD_USECURSES -Dhpux -DSYSV -D_HPUX_SOURCE
OBJS1	= wcd.o match.o stack.o nameset.o intset.o Error.o Text.o WcdStack.o dirnode.o display.o dosdir.o wfixpath.o colors.o graphics.o wcddir.o

all:wcd.exe

wcd.exe: $(OBJS1)
	$(CC) $(OBJS1) $(LFLAGS) -o $@



#.c.o:
#	$(CC) $(CFLAGS) $(DEFS) -c $<

nameset.o : c3po/nameset.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/nameset.c -o $@

intset.o : c3po/intset.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/intset.c -o $@

Error.o : c3po/Error.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/Error.c -o $@

Text.o : c3po/Text.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/Text.c -o $@

WcdStack.o : c3po/WcdStack.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/WcdStack.c -o $@

dirnode.o : c3po/dirnode.c
	$(CC) $(CFLAGS) $(DEFS) -c c3po/dirnode.c -o $@


wcd.o : wcd.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

match.o : match.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

stack.o : stack.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

display.o : display.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

dosdir.o : dosdir.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

wfixpath.o : wfixpath.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

colors.o : colors.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

graphics.o : graphics.c
	$(CC) $(CFLAGS) $(DEFS) -c $<

wcddir.o : wcddir.c
	$(CC) $(CFLAGS) $(DEFS) -c $<


clean:
	/bin/rm *.o *.bck *.bak *.exe

