Adding smc.mk and fixing main.c