##// END OF EJS Templates
added rules.mk for generic Makefile and makefile example for LCD demo files
Alexis -
r23:d0444fda4b79 default
parent child
Show More
@@ -0,0 +1,42
1 #------------------------------------------------------------------------------
2 #-- This file is a part of the LPP VHDL IP LIBRARY
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
4 #--
5 #-- This program is free software; you can redistribute it and/or modify
6 #-- it under the terms of the GNU General Public License as published by
7 #-- the Free Software Foundation; either version 3 of the License, or
8 #-- (at your option) any later version.
9 #--
10 #-- This program is distributed in the hope that it will be useful,
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #-- GNU General Public License for more details.
14 #--
15 #-- You should have received a copy of the GNU General Public License
16 #-- along with this program; if not, write to the Free Software
17 #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #------------------------------------------------------------------------------
19
20 include ../../../rules.mk
21 LIBDIR = ../../../lib/
22 INCPATH = ../../../includes/
23 SCRIPTDIR=../../../scripts/
24 LIBS=-lapb_lcd_driver -llpp_apb_functions
25 INPUTFILE=main.c
26 EXEC=main.bin
27 OUTBINDIR=bin/
28
29
30 all:bin
31 @echo $(EXEC)" file created"
32
33 clean:
34 rm -f *.{o,a}
35
36
37
38 help:ruleshelp
39 @echo " all : makes an executable file called "$(EXEC)
40 @echo " in "$(OUTBINDIR)
41 @echo " clean : removes temporary files"
42
1 NO CONTENT: new file 100755, binary diff hidden
NO CONTENT: new file 100755, binary diff hidden
@@ -0,0 +1,1
1 load bin/main.bin
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,6 +1,6
1 #------------------------------------------------------------------------------
1 #------------------------------------------------------------------------------
2 #-- This file is a part of the LPP VHDL IP LIBRARY
2 #-- This file is a part of the LPP VHDL IP LIBRARY
3 #-- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
4 #--
4 #--
5 #-- This program is free software; you can redistribute it and/or modify
5 #-- This program is free software; you can redistribute it and/or modify
6 #-- it under the terms of the GNU General Public License as published by
6 #-- it under the terms of the GNU General Public License as published by
@@ -21,7 +21,10 CC = sparc-elf-gcc
21 AR = sparc-elf-ar
21 AR = sparc-elf-ar
22 LIBDIR = ../../lib/
22 LIBDIR = ../../lib/
23 INCPATH = ../../includes/
23 INCPATH = ../../includes/
24
24 SCRIPTDIR=../../scripts/
25 OUTBINDIR=bin/
26 EXEC=exec.bin
27 INPUTFILE=main.c
25
28
26 $(FILE): $(FILE).a
29 $(FILE): $(FILE).a
27 @echo "library ""lib"$(FILE)" created"
30 @echo "library ""lib"$(FILE)" created"
@@ -36,9 +39,25 INCPATH = ../../includes/
36 cp *.h $(INCPATH)
39 cp *.h $(INCPATH)
37 rm -R tmp
40 rm -R tmp
38
41
42 load: all
43 @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt
44 grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt
45
46 bin:
47 mkdir -p $(OUTBINDIR)
48 $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS)
49
39 clean:
50 clean:
40 rm -f -R tmp
51 rm -f -R tmp
41 rm -f *.{o,a}
52 rm -f *.{o,a}
42 rm -f $(INCPATH)*.h
53 rm -f $(INCPATH)*.h
43 rm -f $(LIBDIR)*.{o,a}
54 rm -f $(LIBDIR)*.{o,a}
44
55
56 ruleshelp:
57 @echo ""
58 @echo ""
59 @echo ""
60 @echo " load : call grmon-eval and loads "$(EXEC)" in the leon"
61 @echo " usage: make PORT=/dev/ttyUSBx load"
62
63
General Comments 0
You need to be logged in to leave comments. Login now