####################################################
# makefile for "mergetest.cc" supporting routines
#
####################################################

# this is the compiler we will use
CC=CC

# these are the compiler flags 
CFLAGS1=-g -fguiding_decls
CFLAGS2=-g
# note on -fguiding_decls - dont' ask


# OBJ is defined as all the .o files we will need 
OBJ=mergetest.o Device.o

# this is a message to the user of this makefile
# since it's been made to depend on mergetest only
#  When we say 'make' with
# no arguments it will check the first target ONLY

MACRO=Doing All
all: mergetest
	echo ${MACRO}

# tells us how to create 'mergetest'
mergetest: ${OBJ}
	${CC} ${CFLAGS2} -o mergetest ${OBJ}

######################################
# DEPENDENCIES:
#
# Here's where we list all the .o files and name
# which files were needed to create them
# If any of the files that X.o depends on have
# a newer modification date than X.o, MAKE knows 
# to recompile those and then recompile X.cc

# what files are used in the creation of 'mergetest.o?
#
mergetest.o:Device.o Device.h mergetest.cc
	${CC} ${CFLAGS2} -c mergetest.cc -o mergetest.o

# what files are used in the creation of 'Device.o?
#
Device.o: Device.cc mergetest.h
	${CC} ${CFLAGS2} -c Device.cc -o Device.o

# removing the '.o' files will force a complete re-compile
clean:
	rm -f core *.o
