###############################################
# makefile3 (Macros)
###############################################

###############################################
# Macros
###############################################

CC = gcc
# CC = gccmeminfo

CFLAGS = -Wall -ansi -pedantic
# CFLAGS = -Wall -ansi -pedantic -g
# CFLAGS = -Wall -ansi -pedantic -DNDEBUG
# CFLAGS = -Wall -ansi -pedantic -DNDEBUG -O3

###############################################
# Build rules for non-file targets
###############################################

all: testintmath

clobber: clean
	rm -f *~ \#*\# core

clean:
	rm -f testintmath *.o

###############################################
# Build rules for file targets
###############################################

testintmath: testintmath.o intmath.o
	$(CC) -o testintmath testintmath.o intmath.o

testintmath.o: testintmath.c intmath.h
	$(CC) $(CFLAGS) -c -o testintmath.o testintmath.c

intmath.o: intmath.c intmath.h
	$(CC) $(CFLAGS) -c -o intmath.o intmath.c