#
# comments start with a # sign
#
# each item in the make file consists of
# three things:  a product, its ingredients and how to make it
#

CC = gcc -g -Wall

aac: aac.o aacbuffer.o myLib.o
	$(CC) aac.o aacbuffer.o myLib.o -o aac

aac.o: aac.c aac.h
	$(CC) -c aac.c

aacbuffer.o: aacbuffer.c aac.h
	$(CC) -c aacbuffer.c
        
myLib.o: myLib.c
	$(CC) -c myLib.c

dumputmp: dumputmp.o utmplib.o
	$(CC) dumputmp.o utmplib.o -o dumputmp

dumputmp.o: dumputmp.c
	$(CC) -c dumputmp.c
 
utmplib.o: utmplib.c
	$(CC) -c utmplib.c

sample.o: sample.c sample.h
	$(CC) -c sample.c

run:
	./aac sample.wtmp


#
#
# This is a makefile.  A makefile contains rules that tell
# how to build a program, often from separate source files
#
# This sample makefile shows how to build dumputmp from
# the two source files dumputmp.c and utmplib.c
#
# You must modify this file so it contains rules to make
# your solution to the project
# (note: the indented lines MUST start with a single tab
#
#
#dumputmp: dumputmp.o utmplib.o
#	cc dumputmp.o utmplib.o -o dumputmp
#
#see: dumputmp sample.wtmp
#	./dumputmp sample.wtmp | more
#
#dumputmp.o: dumputmp.c
#	$(CC) -c dumputmp.c
#
#utmplib.o: utmplib.c
#	$(CC) -c utmplib.c
#
#clean:
#	rm -f *.o core dumputmp
#
