CC	= gcc

# 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.

# Statically linking of a specific library can be done by linking
# to a lib*.a library file instead a lib*.s* library file.
# To link ncurses statically (if your system links by default
# dynamically) comment the LFLAGS line and add the 'libncurses.a' file
# (often found as /usr/lib/libncurses.a) to the OBJS1 list.

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

all:wcd.exe

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

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

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


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

