Makefile

URL: https://mirkwood.cs.edinboro.edu/~bennett/class/cmsc3240/fall2026/notes/ch1/code/Makefile
 
OBJS: intMult intDiv intAdd arrayAdd arrayDiv arrayMult arrayRandAdd floatDiv floatAdd floatMult
 
all: ${OBJS}

perf: ${OBJS}
	perf stat -e cycles,instructions intAdd
	perf stat -e cycles,instructions intMult
	perf stat -e cycles,instructions intDiv
	perf stat -e cycles,instructions arrayAdd
	perf stat -e cycles,instructions arrayMult
	perf stat -e cycles,instructions arrayDiv
	perf stat -e cycles,instructions arrayRandAdd
	perf stat -e cycles,instructions floatAdd 
	perf stat -e cycles,instructions floatMult 
	perf stat -e cycles,instructions floatDiv 

intAdd: limits.h
intMult: limits.h
intDiv: limits.h
float: limits.h
arrayAdd: limits.h
arrayRandAdd: limits.h
arrayMult: limits.h
arrayDiv: limits.h
floatAdd: limits.h
floatMult: limits.h
floatDiv: limits.h

clean:
	rm -f ${OBJS}