Created
October 11, 2011 18:45
-
-
Save jubstuff/1278998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* compile_directives.c | |
* | |
* Define a DEBUG macro that put the program in Development environment | |
* | |
* Use: | |
* gcc -Wall -DDEV_ENV compile_directives.c -o compile_directives.out | |
* | |
* Author: giustinob[a t]gmail.com | |
* | |
**/ | |
#include <stdio.h> | |
#ifdef DEV_ENV | |
#define DEBUG 1 | |
#else | |
#define DEBUG 0 | |
#endif | |
int main() | |
{ | |
if(DEBUG) | |
{ | |
printf("Development environment\n"); | |
} | |
else | |
{ | |
printf("Production environment\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment