Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
APO semestral work
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Horych, Tomáš
APO semestral work
Commits
16dcab05
Commit
16dcab05
authored
4 years ago
by
Horych, Tomáš
Browse files
Options
Downloads
Patches
Plain Diff
first try
parents
Branches
1_stage
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+74
-0
74 additions, 0 deletions
Makefile
with
74 additions
and
0 deletions
Makefile
0 → 100644
+
74
−
0
View file @
16dcab05
ARCH
=
mips-elf
SOURCES
=
snake.c utils.c lcd_txt.c font_rom8x16.c
TARGET_EXE
=
snake
CC
=
$(
ARCH
)
-gcc
CXX
=
$(
ARCH
)
-g
++
AS
=
$(
ARCH
)
-as
LD
=
$(
ARCH
)
-gcc
OBJCOPY
=
$(
ARCH
)
-objcopy
ARCHFLAGS
+=
-fno-lto
CFLAGS
+=
-ggdb
-O3
-Wall
CXXFLAGS
+=
-ggdb
-O3
-Wall
AFLAGS
+=
-ggdb
LDFLAGS
+=
-ggdb
LDFLAGS
+=
-nostartfiles
LDFLAGS
+=
-static
CFLAGS
+=
$(
ARCHFLAGS
)
CXXFLAGS
+=
$(
ARCHFLAGS
)
AFLAGS
+=
$(
ARCHFLAGS
)
LDFLAGS
+=
$(
ARCHFLAGS
)
OBJECTS
+=
$(
filter %.o,
$(
SOURCES:%.S
=
%.o
))
OBJECTS
+=
$(
filter %.o,
$(
SOURCES:%.c
=
%.o
))
OBJECTS
+=
$(
filter %.o,
$(
SOURCES:%.cpp
=
%.o
))
all
:
default
.PHONY
:
default clean dep all
%.o
:
%.S
$(
CC
)
-D__ASSEMBLY__
$(
AFLAGS
)
-c
$<
-o
$@
%.o
:
%.c
$(
CC
)
$(
CFLAGS
)
$(
CPPFLAGS
)
-c
$<
-o
$@
%.o
:
%.cpp
$(
CXX
)
$(
CXXFLAGS
)
$(
CPPFLAGS
)
-c
$<
%.s
:
%.c
$(
CC
)
$(
CFLAGS
)
$(
CPPFLAGS
)
-S
$<
-o
$@
default
:
$(TARGET_EXE)
$(TARGET_EXE)
:
$(OBJECTS)
$(
CC
)
$(
LDFLAGS
)
$^
-o
$@
dep
:
depend
depend
:
$(SOURCES) $(glob *.h)
echo
'# autogenerated dependencies'
>
depend
ifneq
($(filter %.S,$(SOURCES)),)
$(
CC
)
-D__ASSEMBLY__
$(
AFLAGS
)
-w
-E
-M
$(
filter %.S,
$(
SOURCES
))
\
>>
depend
endif
ifneq
($(filter %.c,$(SOURCES)),)
$(
CC
)
$(
CFLAGS
)
$(
CPPFLAGS
)
-w
-E
-M
$(
filter %.c,
$(
SOURCES
))
\
>>
depend
endif
ifneq
($(filter %.cpp,$(SOURCES)),)
$(
CXX
)
$(
CXXFLAGS
)
$(
CPPFLAGS
)
-w
-E
-M
$(
filter %.cpp,
$(
SOURCES
))
\
>>
depend
endif
clean
:
rm
-f
*
.o
*
.a
$(
OBJECTS
)
$(
TARGET_EXE
)
depend
#mips-elf-objdump --source -M no-aliases,reg-names=numeric qtmips_binrep
-include
depend
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
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