Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Computer_architecture_project2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lang0909
Computer_architecture_project2
Commits
70d37fef
Commit
70d37fef
authored
5 years ago
by
lang0909
Browse files
Options
Downloads
Patches
Plain Diff
Add Makefile
parent
b10292f7
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2188
canceled
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+46
-0
46 additions, 0 deletions
Makefile
with
46 additions
and
0 deletions
Makefile
0 → 100644
+
46
−
0
View file @
70d37fef
sce212sim
:
sce212sim.c util.c parse.c run.c
gcc
-g
-O2
$^
-o
$@
.PHONY
:
clean test help
clean
:
rm
-rf
*
~ sce212sim
help
:
@
echo
"The following options are provided with Make
\n\t
-make:
\t\t
build simulator
\n\t
-make clean:
\t
clean the build
\n\t
-make test:
\t
test your simulator"
test
:
sce212sim test_1 test_2 test_3 test_4 test_5 test_fact test_leaf
test_1
:
@
echo
"Testing example01"
;
\
./sce212sim
-m
0x10000000:0x10000010
-n
50 sample_input/example01.o | diff
-Naur
sample_output/example01 -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_2
:
@
echo
"Testing example02"
;
\
./sce212sim
-n
50 sample_input/example02.o | diff
-Naur
sample_output/example02 -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_3
:
@
echo
"Testing example03"
;
\
./sce212sim
-n
100 sample_input/example03.o | diff
-Naur
sample_output/example03 -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_4
:
@
echo
"Testing example04"
;
\
./sce212sim
-n
100 sample_input/example04.o | diff
-Naur
sample_output/example04 -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_5
:
@
echo
"Testing example05"
;
\
./sce212sim
-n
100 sample_input/example05.o | diff
-Naur
sample_output/example05 -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_fact
:
@
echo
"Testing fact"
;
\
./sce212sim
-n
100 sample_input/fact.o | diff
-Naur
sample_output/fact -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
test_leaf
:
@
echo
"Testing leaf_example"
;
\
./sce212sim
-n
100 sample_input/leaf_example.o | diff
-Naur
sample_output/leaf_example -
;
\
if
[
$$
?
-eq
0
]
;
then
echo
"
\t
Test seems correct
\n
"
;
else
echo
"
\t
Results not identical, check the diff output
\n
"
;
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment