-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add trivial makefile to build c programs
- Loading branch information
Johannes Martinsson
committed
Sep 22, 2014
1 parent
6a4550a
commit 81def09
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CFLAGS=-std=c99 | ||
|
||
all: stderr stdout bigger graph i numnorm numsum randarg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
|
||
int main(int argc, char **argv) { | ||
for (int i = 1; i < argc; i++) { | ||
fprintf(stderr, "%s", argv[i]); | ||
|
||
if (i + 1 < argc) { | ||
fprintf(stderr, " "); | ||
} | ||
} | ||
fprintf(stderr, "\n"); | ||
return 0; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
|
||
int main(int argc, char **argv) { | ||
for (int i = 1; i < argc; i++) { | ||
fprintf(stdout, "%s", argv[i]); | ||
|
||
if (i + 1 < argc) { | ||
fprintf(stdout, " "); | ||
} | ||
} | ||
fprintf(stdout, "\n"); | ||
return 0; | ||
} |