# example headstart Makefile (gnu style) for vrouter project
# Shawn Ostermann - Ohio University
# Version 2.0 - Thu Apr  9, 2009


#
# Here are all of the source files
SOURCES=vdump.cc print.cc filter.cc
#
# alternately, you can say it's EVERYTHING in the current directory like:
# SOURCES=${wildcard *.cc}

#
# let's assume that ALL of the ".h" files in the current directory are necessary
# Alternately, you can list them, as in:
# HEADERS=one.h two.h three.h
HEADERS=${wildcard *.h}



############################################################
##
##  In theory, you don't have to change anything below this point
##
############################################################

#
# where to find the library and include file
ASGN_DIR=/home/osterman/archives/cs544.archive/assignments/vdump

#
# look for vrouter.h include file here
INCLUDES=-I${ASGN_DIR}

#
# look for the vrouter library here
LDFLAGS=-L${ASGN_DIR} -L/usr/local/lib

#
# you'll need these libraries
# (for solaris, need to add -lsocket
LDLIBS= -lvrouter -lsocket -lnsl -lpcap
LDLIBS= -lvrouter -lnsl -lpcap

#
# these are the standard compiler options
CC=g++
CPPFLAGS=-Wall -Werror -O2 -g ${INCLUDES}

#
# prime and friends are mad about something in g++
CPPFLAGS+=-Wno-deprecated

#
# by default, just make the program 
all: vdump


#
# The OBJECT files (".c" files) are figured out automatically from $SOURCES
OBJECTS=${SOURCES:.cc=.o}

#
# for simplicity, let's just pretend that all of the object files depend on ALL of the
# header files.  That's overly conservative, but can prevent errors
# We also make them depend on this makefile, so if you edit it, it recompiles everything
${OBJECTS}: ${HEADERS} GNUmakefile

#
# gnu make can figure out the rest, once we tell it which OBJECT files it needs
vdump: ${OBJECTS}

#
# just a little spring cleaning
clean:
	rm -f *.o core vdump


