# Makefile
###################################################
# Vars
###################################################

# default:
pf=cyg
exe=.exe

#ifdef(platform)
#ifeq($platform,unix)
  pf=thisdoesnotwork
  exe=
#else
  pf=thatdoesnotwork
#endif
#endif

p=thello
p=tgcd

# need for unix pthread library:
unixlib= -lpthread

in1=25 5
in2=12 2
in3=300 102
in4=998250 15323
in5=998251 15323
in6=1998251 915323

###################################################
# Targets
###################################################

p ${p}:
	echo platform $(pf)
	gcc ${unixlib} -o ${p} ${p}.c

pc ${pc}:
	gcc -c ${pc}.c -o ${pc}

r run: ${p}
	${p}$(exe) ${in1} ${in2}

test:
	${p}$(exe) 2 3 15 9 123456 7890 123 456789 98765 4321 987654 3210 

t time: ${p}
	time$(exe) ${p} ${in1} ${in2} ${in3} ${in4} ${in5} ${in6}

###################################################
# Housekeeping
###################################################

tar:
	-@tar cvf h3sol.tar \
		Makefile *.c

###################################################
# END
###################################################
