Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
openMP-HW
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hasan.bahjat
openMP-HW
Commits
9d2b6c97
You need to sign in or sign up before continuing.
Commit
9d2b6c97
authored
Oct 30, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MAKEFILE , Fix building issue
parent
15f0cec1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
MakeFile
MakeFile
+11
-7
No files found.
MakeFile
View file @
9d2b6c97
# Compiler and flags
CC
=
g
++
CC
=
g
cc
CFLAGS
=
-fopenmp
-O2
PROF_FLAGS
=
-pg
# Source file
SRC
=
$(Pr)
# Targets
TARGET_INTEGRAL
=
integral
TARGET_MANDELBROT
=
mandelbrot
...
...
@@ -12,18 +15,18 @@ all: $(TARGET_INTEGRAL) $(TARGET_MANDELBROT)
# Conditional build target
build
:
$(CC)
$(CFLAGS)
-o
$
(
$(Pr)
)
$(Pr)
.c
$(CC)
$(CFLAGS)
-o
$(
SRC
)
$(Pr)
.c
# Conditional run target
run
:
./
$
(
$(Pr)
)
./
$(
SRC
)
# Profile the specified program
profile
:
$(CC)
$(CFLAGS)
$(PROF_FLAGS)
-o
$
(
$(Pr)
)
$(Pr
)
.c
./
$
(
$(Pr)
)
gprof
$
(
$(Pr)
)
gmon.out
>
$(Pr)
_profile.txt
cat
$(Pr)
_profile.txt
$(CC)
$(CFLAGS)
$(PROF_FLAGS)
-o
$(Pr)
$(SRC
)
.c
./
$(
SRC
)
gprof
$(
SRC)
.exe
gmon.out
>
$(Pr)
_profile.txt
type
$(Pr)
_profile.txt
# Build each program individually
$(TARGET_INTEGRAL)
:
integral.c
...
...
@@ -35,3 +38,4 @@ $(TARGET_MANDELBROT): mandelbrot.cpp
# Clean command
clean
:
rm
-f
$(TARGET_INTEGRAL)
$(TARGET_MANDELBROT)
gmon.out integral_profile.txt mandelbrot_profile.txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment