Skip to content

Commit

Permalink
Build in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Nov 25, 2024
1 parent 607b8f6 commit 37575ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ all: default

default:
$(MAKE) -C uSockets
$(CC) build.c -o build
$(CC) -fopenmp build.c -o build
3 changes: 2 additions & 1 deletion build.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ int main(int argc, char **argv) {
}

if (!strcmp(argv[1], "examples")) {
#pragma omp parallel for
for (int i = 0; i < sizeof(EXAMPLE_FILES) / sizeof(char *); i++) {
if (run("%s %s examples/%s.cpp %s -o %s%s", CXX, CXXFLAGS, EXAMPLE_FILES[i], LDFLAGS, EXAMPLE_FILES[i], EXEC_SUFFIX)) {
return -1;
exit(-1);
}
}
} else if (!strcmp(argv[1], "capi")) {
Expand Down

0 comments on commit 37575ba

Please sign in to comment.