Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Tiny AES C
Commits
3a28fc9a
Unverified
Commit
3a28fc9a
authored
Sep 24, 2018
by
kokke
Committed by
GitHub
Sep 24, 2018
Browse files
new target for building static library: make lib
parent
f56dbc05
Changes
1
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
3a28fc9a
...
...
@@ -3,6 +3,8 @@
#OBJCOPY = avr-objcopy
CC
=
gcc
LD
=
gcc
AR
=
ar
ARFLAGS
=
rcs
CFLAGS
=
-Wall
-Os
-c
LDFLAGS
=
-Wall
-Os
-Wl
,-Map,test.map
ifdef
AES192
...
...
@@ -12,7 +14,7 @@ ifdef AES256
CFLAGS
+=
-DAES256
=
1
endif
OBJCOPYFLA
F
S
=
-j
.text
-O
ihex
OBJCOPYFLA
G
S
=
-j
.text
-O
ihex
OBJCOPY
=
objcopy
# include path to AVR library
...
...
@@ -27,7 +29,7 @@ default: test.elf
test.hex
:
test.elf
echo
copy object-code to new image and format
in
hex
$(OBJCOPY)
${OBJCOPYFLA
F
S}
$<
$@
$(OBJCOPY)
${OBJCOPYFLA
G
S}
$<
$@
test.o
:
test.c aes.h aes.o
echo
[
CC]
$@
$(CFLAGS)
...
...
@@ -41,9 +43,14 @@ test.elf : aes.o test.o
echo
[
LD]
$@
$(LD)
$(LDFLAGS)
-o
$@
$^
aes.a
:
aes.o
echo
[
AR]
$@
$(AR)
$(ARFLAGS)
$@
$^
lib
:
aes.a
clean
:
rm
-f
*
.OBJ
*
.LST
*
.o
*
.gch
*
.out
*
.hex
*
.map
rm
-f
*
.OBJ
*
.LST
*
.o
*
.gch
*
.out
*
.hex
*
.map
*
.elf
*
.a
test
:
make clean
&&
make
&&
./test.elf
...
...
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