@@ -0,0 +1,69 | |||||
|
1 | #!/bin/bash | |||
|
2 | #/*------------------------------------------------------------------------------ | |||
|
3 | #-- This file is a part of the libuc, microcontroler library | |||
|
4 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
5 | #-- | |||
|
6 | #-- This program is free software; you can redistribute it and/or modify | |||
|
7 | #-- it under the terms of the GNU General Public License as published by | |||
|
8 | #-- the Free Software Foundation; either version 3 of the License, or | |||
|
9 | #-- (at your option) any later version. | |||
|
10 | #-- | |||
|
11 | #-- This program is distributed in the hope that it will be useful, | |||
|
12 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | #-- GNU General Public License for more details. | |||
|
15 | #-- | |||
|
16 | #-- You should have received a copy of the GNU General Public License | |||
|
17 | #-- along with this program; if not, write to the Free Software | |||
|
18 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | #------------------------------------------------------------------------------- | |||
|
20 | #-- Author : Alexis Jeandet | |||
|
21 | #-- Mail : alexis.jeandet@gmail.com | |||
|
22 | #-------------------------------------------------------------------------------*/ | |||
|
23 | ||||
|
24 | function getFilesList { | |||
|
25 | sed ':a;N;$!ba;s/\\\n/ /g' $1 | sed ':a;N;$!ba;s/\\ \n/ /g' | grep -i $2 | sed 's/\t//g' | |||
|
26 | } | |||
|
27 | ||||
|
28 | ||||
|
29 | function Template { | |||
|
30 | TEMPLATE=`more $1 | grep -i "TEMPLATE " | sed s/TEMPLATE// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
31 | } | |||
|
32 | ||||
|
33 | function Arch { | |||
|
34 | ARCH=`more $1 | grep -i "ARCH " | sed s/ARCH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
35 | } | |||
|
36 | ||||
|
37 | function Target { | |||
|
38 | TARGET=`more $1 | grep -i "TARGET " | sed s/TARGET// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
39 | } | |||
|
40 | ||||
|
41 | function Libs_Inc { | |||
|
42 | INCLUDEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
43 | for FILES in $INCLUDEStmp | |||
|
44 | do | |||
|
45 | INCLUDES+='$('"LIBUC_INC_DIR_$FILES) " | |||
|
46 | done | |||
|
47 | } | |||
|
48 | function Libs_Link { | |||
|
49 | LIBRARIEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
50 | for FILES in $LIBRARIEStmp | |||
|
51 | do | |||
|
52 | LIBRARIES+='$('"LIBUC_LIBS_DIR_$FILES) "'$('"LIBUC_LIBS_$FILES) " | |||
|
53 | done | |||
|
54 | } | |||
|
55 | ||||
|
56 | function HeadersInstallPath { | |||
|
57 | HEADERSINSTALLPATH=`more $1 | grep -i "HEADERSINSTALLPATH" | sed s/HEADERSINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
58 | } | |||
|
59 | ||||
|
60 | function TargetInstallPath { | |||
|
61 | TARGETINSTALLPATH=`more $1 | grep -i "TARGETINSTALLPATH" | sed s/TARGETINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
62 | } | |||
|
63 | ||||
|
64 | function getBSP { | |||
|
65 | ||||
|
66 | if(more $1 | grep -i "BSP ="); then | |||
|
67 | BSP=`more $1 | grep -i "BSP" | sed s/BSP// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` | |||
|
68 | fi | |||
|
69 | } |
@@ -0,0 +1,67 | |||||
|
1 | #!/bin/bash | |||
|
2 | #/*------------------------------------------------------------------------------ | |||
|
3 | #-- This file is a part of the libuc, microcontroler library | |||
|
4 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
5 | #-- | |||
|
6 | #-- This program is free software; you can redistribute it and/or modify | |||
|
7 | #-- it under the terms of the GNU General Public License as published by | |||
|
8 | #-- the Free Software Foundation; either version 3 of the License, or | |||
|
9 | #-- (at your option) any later version. | |||
|
10 | #-- | |||
|
11 | #-- This program is distributed in the hope that it will be useful, | |||
|
12 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | #-- GNU General Public License for more details. | |||
|
15 | #-- | |||
|
16 | #-- You should have received a copy of the GNU General Public License | |||
|
17 | #-- along with this program; if not, write to the Free Software | |||
|
18 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | #------------------------------------------------------------------------------- | |||
|
20 | #-- Author : Alexis Jeandet | |||
|
21 | #-- Mail : alexis.jeandet@gmail.com | |||
|
22 | #-------------------------------------------------------------------------------*/ | |||
|
23 | ||||
|
24 | function template-run { | |||
|
25 | ||||
|
26 | Target $PROJECTFILE | |||
|
27 | Arch $PROJECTFILE | |||
|
28 | Libs_Inc $PROJECTFILE | |||
|
29 | Libs_Link $PROJECTFILE | |||
|
30 | HeadersInstallPath $PROJECTFILE | |||
|
31 | TargetInstallPath $PROJECTFILE | |||
|
32 | getBSP $PROJECTFILE | |||
|
33 | echo "Current BSP is $BSP" | |||
|
34 | echo $SRCFILES >> Makefile | |||
|
35 | getFilesList $PROJECTFILE HEADERS >> Makefile | |||
|
36 | getFilesList $PROJECTFILE SOURCES | sed 's/SOURCES/APPSOURCES/' >> Makefile | |||
|
37 | ||||
|
38 | echo "=========================================================================" | |||
|
39 | echo " M A K E F I L E G E N E R A T I O N " | |||
|
40 | echo "-------------------------------------------------------------------------" | |||
|
41 | echo " Template = application " | |||
|
42 | echo " Architecture = $ARCH " | |||
|
43 | echo " Current Board Support package is $BSP " | |||
|
44 | echo " Output file = $TARGET " | |||
|
45 | echo "=========================================================================" | |||
|
46 | echo "" | |||
|
47 | echo " Start Writing Makefile ..." | |||
|
48 | echo 'OBJECTFILES = $(APPSOURCES:.c=.o)'>> Makefile | |||
|
49 | echo "ARCH = "'$(LIBUC)'"/rules/$ARCH" >> Makefile | |||
|
50 | echo "TARGET=$TARGET">> Makefile | |||
|
51 | echo "LIBUC_INCLUDES=$INCLUDES">> Makefile | |||
|
52 | echo "LIBUC_LIBRARIES=$LIBRARIES">> Makefile | |||
|
53 | echo "TARGETINSTALLPATH=$TARGETINSTALLPATH">> Makefile | |||
|
54 | echo "HEADERSINSTALLPATH=$HEADERSINSTALLPATH">> Makefile | |||
|
55 | echo "BSP=$BSP">> Makefile | |||
|
56 | echo 'include $(ARCH)/rules.mk' >> Makefile | |||
|
57 | echo '' >> Makefile | |||
|
58 | echo 'all:bin' >> Makefile | |||
|
59 | echo " @echo Code compiled" >> Makefile | |||
|
60 | echo '' >> Makefile | |||
|
61 | echo " Makefile writing finished" | |||
|
62 | echo "" | |||
|
63 | echo "=========================================================================" | |||
|
64 | echo "" | |||
|
65 | } | |||
|
66 | ||||
|
67 |
@@ -0,0 +1,54 | |||||
|
1 | #!/bin/bash | |||
|
2 | #/*------------------------------------------------------------------------------ | |||
|
3 | #-- This file is a part of the libuc, microcontroler library | |||
|
4 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
5 | #-- | |||
|
6 | #-- This program is free software; you can redistribute it and/or modify | |||
|
7 | #-- it under the terms of the GNU General Public License as published by | |||
|
8 | #-- the Free Software Foundation; either version 3 of the License, or | |||
|
9 | #-- (at your option) any later version. | |||
|
10 | #-- | |||
|
11 | #-- This program is distributed in the hope that it will be useful, | |||
|
12 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | #-- GNU General Public License for more details. | |||
|
15 | #-- | |||
|
16 | #-- You should have received a copy of the GNU General Public License | |||
|
17 | #-- along with this program; if not, write to the Free Software | |||
|
18 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | #------------------------------------------------------------------------------- | |||
|
20 | #-- Author : Alexis Jeandet | |||
|
21 | #-- Mail : alexis.jeandet@gmail.com | |||
|
22 | #-------------------------------------------------------------------------------*/ | |||
|
23 | ||||
|
24 | function template-run { | |||
|
25 | echo 'include $(LIBUC)/rules/common/rules.mk' >> Makefile | |||
|
26 | SUBDIRS=`getFilesList $PROJECTFILE SUBDIRS | sed 's/SUBDIRS//' | sed 's/=//' | sed 's/+//' ` | |||
|
27 | CURRENTDIR=`pwd` | |||
|
28 | echo "" >> Makefile | |||
|
29 | echo 'all:subdir' >> Makefile | |||
|
30 | for DIRS in $SUBDIRS | |||
|
31 | do | |||
|
32 | echo "enter $DIRS" | |||
|
33 | cd $DIRS | |||
|
34 | echo "run $0" | |||
|
35 | $0 | |||
|
36 | cd $CURRENTDIR | |||
|
37 | echo "exit $DIRS" | |||
|
38 | if [ -e "$DIRS/Makefile" ]; then | |||
|
39 | echo " make -C $DIRS">> Makefile | |||
|
40 | fi | |||
|
41 | done | |||
|
42 | echo " @echo Code compiled" >> Makefile | |||
|
43 | echo "" >> Makefile | |||
|
44 | echo 'clean:' >> Makefile | |||
|
45 | for DIRS in $SUBDIRS | |||
|
46 | do | |||
|
47 | if [ -e "$DIRS/Makefile" ]; then | |||
|
48 | echo " make clean -C $DIRS">> Makefile | |||
|
49 | fi | |||
|
50 | done | |||
|
51 | echo " @echo Code compiled" >> Makefile | |||
|
52 | echo "" >> Makefile | |||
|
53 | } | |||
|
54 |
@@ -0,0 +1,63 | |||||
|
1 | #!/bin/bash | |||
|
2 | #/*------------------------------------------------------------------------------ | |||
|
3 | #-- This file is a part of the libuc, microcontroler library | |||
|
4 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
5 | #-- | |||
|
6 | #-- This program is free software; you can redistribute it and/or modify | |||
|
7 | #-- it under the terms of the GNU General Public License as published by | |||
|
8 | #-- the Free Software Foundation; either version 3 of the License, or | |||
|
9 | #-- (at your option) any later version. | |||
|
10 | #-- | |||
|
11 | #-- This program is distributed in the hope that it will be useful, | |||
|
12 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | #-- GNU General Public License for more details. | |||
|
15 | #-- | |||
|
16 | #-- You should have received a copy of the GNU General Public License | |||
|
17 | #-- along with this program; if not, write to the Free Software | |||
|
18 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | #------------------------------------------------------------------------------- | |||
|
20 | #-- Author : Alexis Jeandet | |||
|
21 | #-- Mail : alexis.jeandet@gmail.com | |||
|
22 | #-------------------------------------------------------------------------------*/ | |||
|
23 | ||||
|
24 | function template-run { | |||
|
25 | Target $PROJECTFILE | |||
|
26 | Arch $PROJECTFILE | |||
|
27 | Libs_Inc $PROJECTFILE | |||
|
28 | Libs_Link $PROJECTFILE | |||
|
29 | HeadersInstallPath $PROJECTFILE | |||
|
30 | TargetInstallPath $PROJECTFILE | |||
|
31 | getBSP $PROJECTFILE | |||
|
32 | echo "Current BSP is $BSP" | |||
|
33 | echo $SRCFILES >> Makefile | |||
|
34 | getFilesList $PROJECTFILE HEADERS >> Makefile | |||
|
35 | getFilesList $PROJECTFILE SOURCES | sed 's/SOURCES/LIBSOURCES/' >> Makefile | |||
|
36 | ||||
|
37 | echo "=========================================================================" | |||
|
38 | echo " M A K E F I L E G E N E R A T I O N " | |||
|
39 | echo "-------------------------------------------------------------------------" | |||
|
40 | echo " Template = library " | |||
|
41 | echo " Architecture = $ARCH " | |||
|
42 | echo " Output file = $TARGET " | |||
|
43 | echo "=========================================================================" | |||
|
44 | echo "" | |||
|
45 | echo " Start Writing Makefile ..." | |||
|
46 | echo 'OBJECTFILES = $(LIBSOURCES:.c=.o)'>> Makefile | |||
|
47 | echo "ARCH = "'$(LIBUC)'"/rules/$ARCH" >> Makefile | |||
|
48 | echo "TARGET=$TARGET">> Makefile | |||
|
49 | echo "LIBUC_INCLUDES=$INCLUDES">> Makefile | |||
|
50 | echo "LIBUC_LIBRARIES=$LIBRARIES">> Makefile | |||
|
51 | echo "TARGETINSTALLPATH=$TARGETINSTALLPATH">> Makefile | |||
|
52 | echo "HEADERSINSTALLPATH=$HEADERSINSTALLPATH">> Makefile | |||
|
53 | echo "BSP=$BSP">> Makefile | |||
|
54 | echo 'include $(ARCH)/rules.mk' >> Makefile | |||
|
55 | echo '' >> Makefile | |||
|
56 | echo 'all:lib' >> Makefile | |||
|
57 | echo " @echo Code compiled" >> Makefile | |||
|
58 | echo " Makefile writing finished" | |||
|
59 | echo "" | |||
|
60 | echo "=========================================================================" | |||
|
61 | echo "" | |||
|
62 | } | |||
|
63 |
@@ -0,0 +1,27 | |||||
|
1 | #!/bin/bash | |||
|
2 | #/*------------------------------------------------------------------------------ | |||
|
3 | #-- This file is a part of the libuc, microcontroler library | |||
|
4 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
5 | #-- | |||
|
6 | #-- This program is free software; you can redistribute it and/or modify | |||
|
7 | #-- it under the terms of the GNU General Public License as published by | |||
|
8 | #-- the Free Software Foundation; either version 3 of the License, or | |||
|
9 | #-- (at your option) any later version. | |||
|
10 | #-- | |||
|
11 | #-- This program is distributed in the hope that it will be useful, | |||
|
12 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
13 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
14 | #-- GNU General Public License for more details. | |||
|
15 | #-- | |||
|
16 | #-- You should have received a copy of the GNU General Public License | |||
|
17 | #-- along with this program; if not, write to the Free Software | |||
|
18 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
19 | #------------------------------------------------------------------------------- | |||
|
20 | #-- Author : Alexis Jeandet | |||
|
21 | #-- Mail : alexis.jeandet@gmail.com | |||
|
22 | #-------------------------------------------------------------------------------*/ | |||
|
23 | ||||
|
24 | ||||
|
25 | getFilesList $PROJECTFILE SOURCES | sed 's/SOURCES/LATEXSOURCES/' >> Makefile | |||
|
26 | echo 'include $(LIBUC)/rules/rules.mk' >> Makefile | |||
|
27 |
@@ -0,0 +1,33 | |||||
|
1 | #/*------------------------------------------------------------------------------ | |||
|
2 | #-- This file is a part of the libuc, microcontroler library | |||
|
3 | #-- Copyright (C) 2011, Alexis Jeandet | |||
|
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 | #-- Author : Alexis Jeandet | |||
|
20 | #-- Mail : alexis.jeandet@gmail.com | |||
|
21 | #-------------------------------------------------------------------------------*/ | |||
|
22 | LIBUC_LATEX = latex | |||
|
23 | LIBUC_PDFLATEX = pdflatex | |||
|
24 | ||||
|
25 | ||||
|
26 | all: | |||
|
27 | @echo "latex rules" | |||
|
28 | ||||
|
29 | pdf: | |||
|
30 | $(LIBUC_PDFLATEX) $(LATEXSOURCES) | |||
|
31 | ||||
|
32 | clean: | |||
|
33 | rm -f *.toc *.aux *.log *.pdf *.dvi |
@@ -4,3 +4,9 syntax: glob | |||||
4 | *.*~ |
|
4 | *.*~ | |
5 | *~ |
|
5 | *~ | |
6 | *.o |
|
6 | *.o | |
|
7 | *.a | |||
|
8 | *.hex | |||
|
9 | *.bin | |||
|
10 | *.d | |||
|
11 | *.dump | |||
|
12 | *.map |
@@ -30,52 +30,8 HEADERSINSTALLPATH="" | |||||
30 | TARGETINSTALLPATH="" |
|
30 | TARGETINSTALLPATH="" | |
31 | BSP="generic" |
|
31 | BSP="generic" | |
32 |
|
32 | |||
33 | function getFilesList { |
|
33 | scriptPath=${0%/*} | |
34 | sed ':a;N;$!ba;s/\\\n/ /g' $1 | sed ':a;N;$!ba;s/\\ \n/ /g' | grep -i $2 | sed 's/\t//g' |
|
34 | source $scriptPath/functions | |
35 | } |
|
|||
36 |
|
||||
37 |
|
||||
38 | function Template { |
|
|||
39 | TEMPLATE=`more $1 | grep -i "TEMPLATE " | sed s/TEMPLATE// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
40 | } |
|
|||
41 |
|
||||
42 | function Arch { |
|
|||
43 | ARCH=`more $1 | grep -i "ARCH " | sed s/ARCH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
44 | } |
|
|||
45 |
|
||||
46 | function Target { |
|
|||
47 | TARGET=`more $1 | grep -i "TARGET " | sed s/TARGET// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
48 | } |
|
|||
49 |
|
||||
50 | function Libs_Inc { |
|
|||
51 | INCLUDEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
52 | for FILES in $INCLUDEStmp |
|
|||
53 | do |
|
|||
54 | INCLUDES+='$('"LIBUC_INC_DIR_$FILES) " |
|
|||
55 | done |
|
|||
56 | } |
|
|||
57 | function Libs_Link { |
|
|||
58 | LIBRARIEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
59 | for FILES in $LIBRARIEStmp |
|
|||
60 | do |
|
|||
61 | LIBRARIES+='$('"LIBUC_LIBS_DIR_$FILES) "'$('"LIBUC_LIBS_$FILES) " |
|
|||
62 | done |
|
|||
63 | } |
|
|||
64 |
|
||||
65 | function HeadersInstallPath { |
|
|||
66 | HEADERSINSTALLPATH=`more $1 | grep -i "HEADERSINSTALLPATH" | sed s/HEADERSINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
67 | } |
|
|||
68 |
|
||||
69 | function TargetInstallPath { |
|
|||
70 | TARGETINSTALLPATH=`more $1 | grep -i "TARGETINSTALLPATH" | sed s/TARGETINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
71 | } |
|
|||
72 |
|
||||
73 | function getBSP { |
|
|||
74 |
|
||||
75 | if(more $1 | grep -i "BSP ="); then |
|
|||
76 | BSP=`more $1 | grep -i "BSP" | sed s/BSP// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'` |
|
|||
77 | fi |
|
|||
78 | } |
|
|||
79 |
|
35 | |||
80 | if [ -z "$1" ] ; then |
|
36 | if [ -z "$1" ] ; then | |
81 | echo "try to find a project file ..." |
|
37 | echo "try to find a project file ..." | |
@@ -99,87 +55,14 fi | |||||
99 |
|
55 | |||
100 | CURRENTDIR=`pwd` |
|
56 | CURRENTDIR=`pwd` | |
101 | Template $PROJECTFILE |
|
57 | Template $PROJECTFILE | |
102 | echo "Template = $TEMPLATE" |
|
|||
103 | echo '' > Makefile |
|
58 | echo '' > Makefile | |
104 | echo 'PROJECTDIR = `pwd`'>> Makefile |
|
59 | echo 'PROJECTDIR = `pwd`'>> Makefile | |
105 | echo "LIBUC = $libuc2" >> Makefile |
|
60 | echo "LIBUC = $libuc2" >> Makefile | |
106 |
|
61 | |||
107 | if(echo $TEMPLATE | grep -i 'dir'); then |
|
62 | ||
108 |
|
||||
109 | echo 'include $(LIBUC)/rules/common/rules.mk' >> Makefile |
|
|||
110 | SUBDIRS=`getFilesList $PROJECTFILE SUBDIRS | sed 's/SUBDIRS//' | sed 's/=//' | sed 's/+//' ` |
|
|||
111 | CURRENTDIR=`pwd` |
|
|||
112 | echo "" >> Makefile |
|
|||
113 | echo 'all:subdir' >> Makefile |
|
|||
114 | for DIRS in $SUBDIRS |
|
|||
115 | do |
|
|||
116 | echo "enter $DIRS" |
|
|||
117 | cd $DIRS |
|
|||
118 | echo "run $0" |
|
|||
119 | $0 |
|
|||
120 | cd $CURRENTDIR |
|
|||
121 | echo "exit $DIRS" |
|
|||
122 | if [ -e "$DIRS/Makefile" ]; then |
|
|||
123 | echo " make -C $DIRS">> Makefile |
|
|||
124 | fi |
|
|||
125 | done |
|
|||
126 | echo " @echo Code compiled" >> Makefile |
|
|||
127 | echo "" >> Makefile |
|
|||
128 | echo 'clean:' >> Makefile |
|
|||
129 | for DIRS in $SUBDIRS |
|
|||
130 | do |
|
|||
131 | if [ -e "$DIRS/Makefile" ]; then |
|
|||
132 | echo " make clean -C $DIRS">> Makefile |
|
|||
133 | fi |
|
|||
134 | done |
|
|||
135 | echo " @echo Code compiled" >> Makefile |
|
|||
136 | echo "" >> Makefile |
|
|||
137 | else |
|
|||
138 | Target $PROJECTFILE |
|
|||
139 | Arch $PROJECTFILE |
|
|||
140 | Libs_Inc $PROJECTFILE |
|
|||
141 | Libs_Link $PROJECTFILE |
|
|||
142 | HeadersInstallPath $PROJECTFILE |
|
|||
143 | TargetInstallPath $PROJECTFILE |
|
|||
144 | getBSP $PROJECTFILE |
|
|||
145 | echo "Current BSP is $BSP" |
|
|||
146 | echo $SRCFILES >> Makefile |
|
|||
147 |
|
63 | |||
148 | if(echo $TEMPLATE|grep -i app); then |
|
64 | source $scriptPath/templates/libucmake-$TEMPLATE | |
149 | getFilesList $PROJECTFILE HEADERS >> Makefile |
|
65 | template-run | |
150 | getFilesList $PROJECTFILE SOURCES | sed 's/SOURCES/APPSOURCES/' >> Makefile |
|
|||
151 | echo 'OBJECTFILES = $(APPSOURCES:.c=.o)'>> Makefile |
|
|||
152 | echo "ARCH = "'$(LIBUC)'"/rules/$ARCH" >> Makefile |
|
|||
153 | echo "TARGET=$TARGET">> Makefile |
|
|||
154 | echo "LIBUC_INCLUDES=$INCLUDES">> Makefile |
|
|||
155 | echo "LIBUC_LIBRARIES=$LIBRARIES">> Makefile |
|
|||
156 | echo "TARGETINSTALLPATH=$TARGETINSTALLPATH">> Makefile |
|
|||
157 | echo "HEADERSINSTALLPATH=$HEADERSINSTALLPATH">> Makefile |
|
|||
158 | echo "BSP=$BSP">> Makefile |
|
|||
159 | echo 'include $(ARCH)/rules.mk' >> Makefile |
|
|||
160 | echo '' >> Makefile |
|
|||
161 | echo 'all:bin' >> Makefile |
|
|||
162 | echo " @echo Code compiled" >> Makefile |
|
|||
163 | echo '' >> Makefile |
|
|||
164 | else |
|
|||
165 | if(echo $TEMPLATE|grep -i lib); then |
|
|||
166 | getFilesList $PROJECTFILE HEADERS >> Makefile |
|
|||
167 | getFilesList $PROJECTFILE SOURCES | sed 's/SOURCES/LIBSOURCES/' >> Makefile |
|
|||
168 | echo 'OBJECTFILES = $(LIBSOURCES:.c=.o)'>> Makefile |
|
|||
169 | echo "ARCH = "'$(LIBUC)'"/rules/$ARCH" >> Makefile |
|
|||
170 | echo "TARGET=$TARGET">> Makefile |
|
|||
171 | echo "LIBUC_INCLUDES=$INCLUDES">> Makefile |
|
|||
172 | echo "LIBUC_LIBRARIES=$LIBRARIES">> Makefile |
|
|||
173 | echo "TARGETINSTALLPATH=$TARGETINSTALLPATH">> Makefile |
|
|||
174 | echo "HEADERSINSTALLPATH=$HEADERSINSTALLPATH">> Makefile |
|
|||
175 | echo "BSP=$BSP">> Makefile |
|
|||
176 | echo 'include $(ARCH)/rules.mk' >> Makefile |
|
|||
177 | echo '' >> Makefile |
|
|||
178 | echo 'all:lib' >> Makefile |
|
|||
179 | echo " @echo Code compiled" >> Makefile |
|
|||
180 | fi |
|
|||
181 | fi |
|
|||
182 | fi |
|
|||
183 |
|
66 | |||
184 |
|
67 | |||
185 |
|
68 |
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 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -41,8 +41,8 00000000 l df *ABS* 00000000 system_L | |||||
41 | 00000000 l df *ABS* 00000000 bsp.c |
|
41 | 00000000 l df *ABS* 00000000 bsp.c | |
42 | 00000000 l df *ABS* 00000000 uart.c |
|
42 | 00000000 l df *ABS* 00000000 uart.c | |
43 | 00000f08 l O .text 00000010 CSWTCH.5 |
|
43 | 00000f08 l O .text 00000010 CSWTCH.5 | |
44 |
00000f18 l O .text 00000009 C.0.588 |
|
44 | 00000f18 l O .text 00000009 C.0.5884 | |
45 |
00000f24 l O .text 00000004 C.2.591 |
|
45 | 00000f24 l O .text 00000004 C.2.5915 | |
46 | 00000000 l df *ABS* 00000000 core.c |
|
46 | 00000000 l df *ABS* 00000000 core.c | |
47 | 00000000 l df *ABS* 00000000 libucstrings.c |
|
47 | 00000000 l df *ABS* 00000000 libucstrings.c | |
48 | 10000014 g O .bss 00000004 UART1 |
|
48 | 10000014 g O .bss 00000004 UART1 |
@@ -14,6 +14,7 Discarded input sections | |||||
14 | .text 0x00000000 0x0 main.o |
|
14 | .text 0x00000000 0x0 main.o | |
15 | .data 0x00000000 0x0 main.o |
|
15 | .data 0x00000000 0x0 main.o | |
16 | .bss 0x00000000 0x0 main.o |
|
16 | .bss 0x00000000 0x0 main.o | |
|
17 | .data.tes 0x00000000 0x4 main.o | |||
17 | .text 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o |
|
18 | .text 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o | |
18 | .data 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o |
|
19 | .data 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o | |
19 | .bss 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o |
|
20 | .bss 0x00000000 0x0 /opt/libuc2/rules/lpc17XX-arm-noabi-gcc/startup_LPC17xx.o | |
@@ -223,9 +224,9 Linker script and memory map | |||||
223 | 0x00000eec 0x1c main.o |
|
224 | 0x00000eec 0x1c main.o | |
224 | .rodata.CSWTCH.5 |
|
225 | .rodata.CSWTCH.5 | |
225 | 0x00000f08 0x10 /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) |
|
226 | 0x00000f08 0x10 /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) | |
226 |
.rodata.C.0.588 |
|
227 | .rodata.C.0.5884 | |
227 | 0x00000f18 0xc /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) |
|
228 | 0x00000f18 0xc /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) | |
228 |
.rodata.C.2.591 |
|
229 | .rodata.C.2.5915 | |
229 | 0x00000f24 0x4 /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) |
|
230 | 0x00000f24 0x4 /opt/libuc2/lib/bin/lpc17XX/UART/libuart.a(uart.o) | |
230 | .rodata 0x00000f28 0xc /opt/libuc2/lib/bin/lpc17XX/STRINGS/libucstrings.a(libucstrings.o) |
|
231 | .rodata 0x00000f28 0xc /opt/libuc2/lib/bin/lpc17XX/STRINGS/libucstrings.a(libucstrings.o) | |
231 | *(.gnu.linkonce.r.*) |
|
232 | *(.gnu.linkonce.r.*) |
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 | 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 |
General Comments 0
You need to be logged in to leave comments.
Login now