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
15f0cec1
Commit
15f0cec1
authored
Oct 30, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MakeFile ,
parent
d67b3210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
MakeFile
MakeFile
+37
-0
No files found.
MakeFile
0 → 100644
View file @
15f0cec1
# Compiler and flags
CC
=
g++
CFLAGS
=
-fopenmp
-O2
PROF_FLAGS
=
-pg
# Targets
TARGET_INTEGRAL
=
integral
TARGET_MANDELBROT
=
mandelbrot
# Default target (builds both programs)
all
:
$(TARGET_INTEGRAL) $(TARGET_MANDELBROT)
# Conditional build target
build
:
$(CC)
$(CFLAGS)
-o
$
(
$(Pr)
)
$(Pr)
.c
# Conditional run target
run
:
./
$
(
$(Pr)
)
# 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
# Build each program individually
$(TARGET_INTEGRAL)
:
integral.c
$(CC)
$(CFLAGS)
-o
$(TARGET_INTEGRAL)
integral.c
$(TARGET_MANDELBROT)
:
mandelbrot.cpp
$(CC)
$(CFLAGS)
-o
$(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