# Generated automatically from Makefile.in by configure.
# $Id: Makefile,v 1.1.1.1 2000/03/10 16:32:19 engin Exp $

GOAL		= libCore.a

SRCDIRS		= gnu		\
		  sched		\
		  sys		\
		  util          \
		    
SUBDIRS		= $(SRCDIRS)


PCAP_OBJ	= network/Pcap.o
EXTRA_NET_OBJ	= 
NETOBJECTS	= network/Network.o network/Mtrace.o network/Ping.o \
		  network/TProbe.o network/Prefix.o network/ICMProbe.o \
		  $(EXTRA_NET_OBJ)
EXTRA_OBJ	= 
OBJECTS 	= gnu/ACG.o gnu/GetOpt.o gnu/MLCG.o gnu/RNG.o gnu/Random.o gnu/RndInt.o \
		  gnu/Uniform.o gnu/hash.o gnu/error.o gnu/regex.o gnu/malloc.o \
		  sched/Timer.o sched/Job.o sched/Dispatcher.o \
		  sys/Address.o sys/File.o sys/FileSet.o \
		  sys/Listener.o sys/Pipe.o sys/Time.o sys/Signal.o \
		  util/Trail.o util/rusage.o util/Buffer.o util/strupr.o util/atoll.o \
		  util/strtol.o util/strchr.o util/strlwr.o util/strerror.o \
		  $(EXTRA_OBJ)

#-------------------------------------------------------------------
# Paths
srcdir	    	= .
top_srcdir  	= .
prefix      	= /usr/local
exec_prefix 	= ${prefix}
bindir      	= ${exec_prefix}/bin
mandir      	= ${prefix}/man
man1dir     	= $(mandir)/man1
man8dir     	= $(mandir)/man8

# Programs

SHELL           = /bin/sh
RANLIB          = ranlib
CC              = gcc
CXX             = c++
LD              = c++

# Other variables
DEFINES  	= -DHAVE_CONFIG_H
CFLAGS   	= -g -O2
CPPFLAGS 	= 
LDFLAGS  	= 
CXXFLAGS 	= -g -O2
LIBS   		=  -lz -lm  -lsocket -lnsl -ldl
DIST_COMMON	= Makefile.in
DISTFILES	= $(DIST_COMMON)

default: all

# Implicit Rules
.y.o:

.c.o:
	@echo Compiling: `basename $<`
	@$(CC)  -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $<

.cc.o:
	@echo Compiling: `basename $<`
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $<

.SUFFIXES: .cc

# Making the distribution
distdir:
	@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
	  test -f $(distdir)/$$file \
	  || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
	  || cp -p $(srcdir)/$$file $(distdir)/$$file; \
	done
	@for subdir in $(SUBDIRS); do		\
	  test -d $(distdir)/$$subdir		\
	  || mkdir $(distdir)/$$subdir		\
	  || exit 1;				\
	  chmod 777 $(distdir)/$$subdir;	\
	  (cd $$subdir && $(MAKE) distdir=../$(distdir)/$$subdir distdir) \
	    || exit 1; \
	done

# Other explicit Rules
all: dosrcs
	@echo "Creating library archive: $(GOAL)"
	@ar ru $(GOAL) $(OBJECTS)
	@$(RANLIB) $(GOAL)

dosrcs:
	@echo "CFLAGS=" $(CFLAGS)
	@echo "CXXFLAGS=" $(CXXFLAGS)
	@for subdir in $(SRCDIRS); do            	\
	        (cd $$subdir && $(MAKE) $(MFLAGS) all)  \
	         || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"


clean:
	@for subdir in $(SUBDIRS); do            	 \
	        (cd $$subdir && $(MAKE) $(MFLAGS) clean); \
	done
	rm -f core *.o *~ $(GOAL)

mostlyclean:
	@for subdir in $(SUBDIRS); do            	 	\
	        (cd $$subdir && $(MAKE) $(MFLAGS) mostlyclean);	\
	done
	rm -f core *.o *~

depend:
	@for subdir in $(SUBDIRS); do            	 	\
	        (cd $$subdir && $(MAKE) $(MFLAGS) depend); 	\
	done

tags:
	find `pwd` -regex '.*\.[chyl][ch]?$$' | xargs etags -t

list:
	find `pwd` -name \*.hh -or -name \*.cc -or -name \*.c -or -name \*.h -or -name \*.y 
