Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
f7088f3d
Commit
f7088f3d
authored
May 22, 2013
by
Benoit Rat
Committed by
Grzegorz Daniluk
Jul 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt: Improve Makefile
parent
273250b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Makefile
rt/Makefile
+6
-4
No files found.
rt/Makefile
View file @
f7088f3d
...
...
@@ -5,7 +5,7 @@ LIBSOFTPLL_DIR = ../userspace/ptp-noposix/softpll
OBJS
=
main.o dev/uart.o dev/timer.o lib/mprintf.o dev/ad9516.o ipc/minipc-mem-server.o ipc/rt_ipc.o
$(LIBSOFTPLL_DIR)
/softpll_ng.o
CFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
-Idev
LDFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
-nostdlib
-T
target/lm32/ram.ld
LDFLAGS_PLATFORM
=
-mmultiply-enabled
-mbarrel-shift-enabled
-nostdlib
-T
target/lm32/ram.ld
OBJS_PLATFORM
=
target/lm32/crt0.o target/lm32/irq.o
CC
=
$(CROSS_COMPILE)
gcc
...
...
@@ -15,7 +15,7 @@ CFLAGS= $(CFLAGS_PLATFORM) -ffunction-sections -fdata-sections -O3 -Iinclude -in
LDFLAGS
=
$(LDFLAGS_PLATFORM)
-Wl
,--gc-sections
-O3
-Iinclude
-ffreestanding
SIZE
=
$(CROSS_COMPILE)
size
OBJS
+=
$(OBJS_PLATFORM)
REVISION
=
$(
shell
git
rev-parse HEAD
)
REVISION
=
$(
shell
git
describe
--always
--dirty
=
+ |
sed
's/wr-switch-sw-//'
)
OUTPUT
=
rt_cpu
...
...
@@ -24,15 +24,17 @@ all: $(OBJS)
echo
"const char *build_revision =
\"
$(REVISION)
\"
;"
>
revision.c
echo
"const char *build_date = __DATE__
\"
\"
__TIME__;"
>>
revision.c
$(CC)
$(CFLAGS)
-c
revision.c
${
CC
}
-o
$(OUTPUT)
.elf
$(OBJS)
revision.o
$(LDFLAGS)
${
CC
}
-o
$(OUTPUT)
.elf
$(OBJS)
revision.o
$(LDFLAGS)
${
OBJCOPY
}
-O
binary
$(OUTPUT)
.elf
$(OUTPUT)
.bin
cp
$(OUTPUT)
.bin ../binaries
clean
:
rm
-f
$(OBJS)
$(OUTPUT)
.elf
$(OUTPUT)
.bin
$(OUTPUT)
.ram
scp
:
all
scp rt_cpu.bin root@pcbe12132:/tftpboot/rootfs/wr/lib/firmware
install
:
all
cp
$(OUTPUT)
.bin ../binaries
%.o
:
%.c
${
CC
}
$(CFLAGS)
$(LIB_DIR)
-c
$^
-o
$@
...
...
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