CC=gcc
CCOPT=-g2 -Wformat -Wswitch -Wreturn-type -O3 -finline-functions -fstrength-reduce -fthread-jumps -fcse-follow-jumps  -fcse-skip-blocks -frerun-cse-after-loop -fschedule-insns2 -fpeephole -fcaller-saves
#CCOPT=-g2  -O1
LLOPT=-lmcheck
guinea : guinea_pig.c background.c grv.c file.d memory.o switches.d rndm.d histogram.o physconst.h spline.h hit.c
	$(CC) -pipe -O3 -o guinea guinea_pig.c histogram.o memory.o -lm
guinea2 : guinea_pig.c background.c grv.c file.d memory.o switches.d rndm.d histogram.o physconst.h spline.h hit.c
	$(CC) $(CCOPT) $(LLOPT) -g2 -o guinea2 guinea_pig.c histogram.o memory.o -lm
memory.o : memory.c memory.h
	$(CC) $(CCOPT) -O3 -c memory.c
histogram.o : histogram.c memory.h
	$(CC) $(CCOPT) -c -O3 histogram.c
gpv : view.c histogram.o histogram.h memory.o memory.h file.d
	$(CC) $(CCOPT) -o gpv view.c histogram.o memory.o -lm
scatter : convert.c hist.d rndm.d memory.d
	$(CC) $(CCOPT) -pipe -O3 -o scatter  convert.c -lm

