# $Id: Makefile,v 1.9 2001/08/10 22:23:17 mpashniak Exp $
# Copyright 2001 Sun Microsystems, Inc.  All rights reserved.

include ../dynamic.mk

MEMDEBUG = -DUSE_LIBDEBUG=1 -DUSE_MEMDEBUG=1
LIBS += -lcommon -ldebug -lcrypt 
DIRLIB = ed.a

SRCS = \
	src/handler_exec.c \
	src/handler_perl.c \
	src/handler_test.c \
	src/cce_ed.c
OBJS = $(patsubst %.c,%.o,$(SRCS))

all: $(DIRLIB)

$(DIRLIB): $(OBJS)
	$(AR) rcs $@ $^

debug:
	$(MAKE) all DEBUG="$(CCE_DEBUG) -DDEBUG_ED"

depend: .depend
.depend: $(SRCS)
	$(CC) -M $(CFLAGS) $(SRCS) $(TESTSRCS) > .depend

test:
	$(MAKE) -C test

clean:
	$(RM) -f $(DIRLIB) $(OBJS) .depend
	$(MAKE) -C test clean

# dependency info
ifeq (.depend,$(wildcard .depend))
include .depend
endif
