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
698375cf
Commit
698375cf
authored
May 29, 2014
by
kokke
Browse files
Create Makefile
parent
351447e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
0 → 100644
View file @
698375cf
#CC = avr-gcc
#CFLAGS = -Wall -mmcu=atmega16 -Os -Wl,-Map,test.map
#OBJCOPY = avr-objcopy
CC
=
gcc
CFLAGS
=
-Wall
-Os
-Wl
,-Map,test.map
OBJCOPY
=
objcopy
# include path to AVR library
INCLUDE_PATH
=
/usr/lib/avr/include
# splint static check
SPLINT
=
splint test.c aes.c
-I
$(INCLUDE_PATH)
+charindex
-unrecog
.SILENT
:
.PHONY
:
lint clean
rom.hex
:
test.out
# copy object-code to new image and format in hex
$(OBJCOPY)
-j
.text
-O
ihex test.out rom.hex
test.o
:
test.c
# compiling test.c
$(CC)
$(CFLAGS)
-c
test.c
-o
test.o
aes.o
:
aes.h aes.c
# compiling aes.c
$(CC)
$(CFLAGS)
-c
aes.c
-o
aes.o
test.out
:
aes.o test.o
# linking object code to binary
$(CC)
$(CFLAGS)
aes.o test.o
-o
test.out
small
:
test.out
$(OBJCOPY)
-j
.text
-O
ihex test.out rom.hex
clean
:
rm
-f
*
.OBJ
*
.LST
*
.o
*
.gch
*
.out
*
.hex
*
.map
lint
:
$(
call
SPLINT
)
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