OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [actel_m1a3pl_dev_kit/] [software/] [spacewar/] [makefile] - Blame information for rev 212

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 80 olivier.gi
# makfile configuration
2
NAME            = spacewar
3
OBJECTS         = bzsin.o  cline.o  compar.o  explode.o  hardware.o  main.o  point.o  reset.o  rocket1.o  rocket2.o  score.o  update.o
4
 
5 212 olivier.gi
# Compiler performance option (-Os / -O2 / -O3)
6
PORT_CFLAGS     = -O2
7 80 olivier.gi
 
8 212 olivier.gi
# Choose GCC toolchain prefix ('msp430' for MSPGCC / 'msp430-elf' for GCC RedHat/TI)
9
ifndef MSPGCC_PFX
10
MSPGCC_PFX      = msp430-elf
11
endif
12 80 olivier.gi
 
13 212 olivier.gi
# disable some warnings specific to the Dhrystone code
14
WARNINGS        =  -Wall
15 80 olivier.gi
 
16 212 olivier.gi
# Select flags depending on selected toolchain
17
ifeq ($(MSPGCC_PFX),msp430-elf)
18
INCDIR          = -I /cad/ti/gcc/include
19
CFLAGS          = -D PFX_MSP430_ELF $(INCDIR) $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=msp430 -mhwmult=none
20
else
21
CFLAGS          = -D PFX_MSP430               $(PORT_CFLAGS) ${WARNINGS} -g -mcpu=430    -mmpy=none     -mivcnt=16
22
endif
23 80 olivier.gi
 
24 212 olivier.gi
# Toolchain executables
25
CC              = ${MSPGCC_PFX}-gcc
26
OBJCOPY         = ${MSPGCC_PFX}-objcopy
27
OBJDUMP         = ${MSPGCC_PFX}-objdump
28
OBJSIZE         = ${MSPGCC_PFX}-size
29
 
30
.PHONY: all FORCE clean download dist
31
 
32 80 olivier.gi
#all should be the first target. it's built when make is runwithout args
33 212 olivier.gi
all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst ${NAME}.size
34 80 olivier.gi
 
35
#serial download
36
download: download-uart
37
 
38
#additional rules for files
39
${NAME}.elf: ${OBJECTS}
40 212 olivier.gi
        ${CC} ${CFLAGS} -T linker.${MSPGCC_PFX}.x -o $@ ${OBJECTS}
41 80 olivier.gi
 
42
${NAME}.a43: ${NAME}.elf
43 212 olivier.gi
        ${OBJCOPY} -O ihex $^ $@
44 80 olivier.gi
 
45
${NAME}.lst: ${NAME}.elf
46 212 olivier.gi
        ${OBJDUMP} -dSt $^ >$@
47 80 olivier.gi
 
48 212 olivier.gi
${NAME}.size: ${NAME}.elf
49
        ${OBJSIZE}  $^ >$@
50 80 olivier.gi
 
51
download-uart: all
52
        openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 115200 ${NAME}.elf
53
 
54
clean:
55 212 olivier.gi
        rm -f ${NAME} ${NAME}.a43 ${NAME}.lst ${NAME}.elf ${NAME}.size *.o
56 80 olivier.gi
 
57
#backup archive
58
dist:
59
        tar czf dist.tgz *.c *.h *.txt makefile
60
 
61
#dummy target as dependecy if something has to be build everytime
62
FORCE:
63
 
64
#project dependencies
65
bzsin.o:    bzsin.c
66
cline.o:    cline.c    spacewar.h
67
compar.o:   compar.c   spacewar.h
68
explode.o:  explode.c
69
hardware.o: hardware.c spacewar.h
70
main.o:     main.c     spacewar.h
71
point.o:    point.c    spacewar.h
72
reset.o:    reset.c    spacewar.h
73
rocket1.o:  rocket1.c  spacewar.h
74
rocket2.o:  rocket2.c  spacewar.h
75
score.o:    score.c    spacewar.h
76
update.o:   update.c   spacewar.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.