Re-add "Adding smc.mk and fixing main.c" to correct branch