I have a C program which I am NOT allowed to edit that looks like this:
#include <stdio.h>
#ifndef YEAR
#define YEAR "2013"
#endif
int main(){
printf("Hello world from " YEAR "\n");
return 0;
}
I need to create a makefile to compile this program and change the YEAR to 2014, so that the output will be "Hello world from 2014" without editing the C program. How can I do this?