-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 763 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Marcelo Barros de Almeida
# 15/09/2002
# --------------- MACROS -------------------------------
# Directories
PROGRAM = brtos
INCLUDE =
# set up compiler and options
CXX = msp430-gcc
OBJDUMP = msp430-objdump
OBJCOPY = msp430-objcopy
CXXFLAGS = -mmcu=msp430x149 -O2
# include files
# source files to compile
SRC = brtos.c app.c
# All OBJ files will have the same base name but with
# extension .o
OBJ = $(addsuffix .obj, $(basename $(SRC)))
# --------------- TARGETS ---------------------------------
all: $(OBJ)
$(CXX) $(CXXFLAGS) -o $(PROGRAM).elf $(OBJ)
$(OBJDUMP) -tDShpGt $(PROGRAM).elf > $(PROGRAM).map
$(OBJCOPY) -O ihex $(PROGRAM).elf $(PROGRAM).dhex
%.obj: %.c
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
del *.obj *.map *.?hex *.elf