Last active
August 26, 2016 13:46
-
-
Save androm3da/9b5575fb288045775c178a4fb2483438 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
int foo(int x); | |
int main(int argc, char *argv[]) | |
{ | |
return foo(argc) + foo(argc); | |
} |
This file contains hidden or 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
int foo(int x) | |
{ | |
return x+x; | |
} |
This file contains hidden or 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
all: foo | |
foo: foo.o bar.o | |
.PHONY: clean all | |
clean: | |
$(RM) foo foo.o bar.o |
This file contains hidden or 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
$ make && ./foo ; echo $? | |
cc -c -o foo.o foo.c | |
cc -c -o bar.o bar.c | |
cc foo.o bar.o -o foo | |
4 | |
$ make clean | |
rm -f foo foo.o bar.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment