# Makefile Variation # Anna Savarin # HW #2 # Computer Sys.Organization II # Professor Yap # Fall 2006 # # To compile gcd.c, type "make PLATFORM={unix, cyg}". # To execute, type "make time PLATFORM={unix, cyg}". # Specify the platform at the command line to ensure # proper functioning. ################################################### # VARIABLES p=gcd ifndef PLATFORM PLATFORM=cyg PLATFORM=unix endif ifeq (${PLATFORM},unix) exec=a.out else ifeq (${PLATFORM},cyg) exec=a.exe endif endif ################################################### # TARGETS gcc: gcc ${p}.c time: ./${exec} 674 6374 12 1 45 36 ./${exec} 78 98 25346 536 ./${exec} 12 34 56 78 90 12 43 65 tar: # No command here since Makefile inside folder that needs # to be compressed