annotate scripts/mk-component.sh @ 19:294b440431fe

scripts/mk-component.sh: no more component flavors
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 22:08:52 +0000
parents f10cbd8a51c4
children 889745bf8615
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #!/bin/sh
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
19
294b440431fe scripts/mk-component.sh: no more component flavors
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
3 if [ $# != 1 ]
13
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 then
19
294b440431fe scripts/mk-component.sh: no more component flavors
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
5 echo "usage: $0 component-lib" 1>&2
13
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 LIBNAME="$1"
19
294b440431fe scripts/mk-component.sh: no more component flavors
Mychaela Falconia <falcon@freecalypso.org>
parents: 13
diff changeset
10 recipe_file="components/$1"
13
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 if [ ! -f "$recipe_file" ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 echo "Error: $recipe_file not found" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 if [ -z "$BUILD_DIR" ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 echo "Error: BUILD_DIR= must be passed via environment" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 set -e
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 mkdir -p $BUILD_DIR/$LIBNAME
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 # beginning of the Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 echo "all: $LIBNAME.lib" > $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 # shell functions to be used in the recipes
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 make_version() {
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 case $# in
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 1)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 echo "$1_version.c:" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 echo " ../../scripts/make-version.sh $1 > $1_version.c" \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 2)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 echo "$2_version.c:" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 echo " ../../scripts/make-version.sh $1 > $2_version.c" \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 *)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 echo "Error: make_version takes 1 or 2 arguments" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 esac
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 }
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 asm_file() {
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 if [ $# != 1 ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 echo "Error: asm_file takes 1 argument" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 objname=`basename "$1" .s`.obj
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 helpers/makeline cmd ../../toolwrap/asm470 ${ASMFLAGS} "$1" '$@' \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 OBJS="$OBJS $objname"
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 }
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 cfile_plain() {
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 if [ $# != 1 ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 echo "Error: cfile_plain takes 1 argument" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 objname=`basename "$1" .c`.obj
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 case "$objname" in
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 *[A-Z]*)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 helpers/makeline cmd rm -f '$@' \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 esac
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 helpers/makeline cmd ../../toolwrap/cl470 -q -c ${CFLAGS} ${CPPFLAGS} \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 "$1" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 case "$objname" in
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 *[A-Z]*)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 objname_lc=`echo $objname | tr A-Z a-z`
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 helpers/makeline cmd mv $objname_lc $objname \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 esac
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 OBJS="$OBJS $objname"
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 }
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 cfile_str2ind() {
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 if [ $# != 1 ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 echo "Error: cfile_str2ind takes 1 argument" 1>&2
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 exit 1
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 if [ "$USE_STR2IND" = 1 ]
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 then
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 objname=`basename "$1" .c`.obj
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 pp_name=`echo $1 | sed -e 's/\.c$/.pp/' | tr A-Z a-z`
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 pp__name=`echo $1 | sed -e 's/\.c$/.pp_/' | tr A-Z a-z`
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 helpers/makeline dep $objname "$1" \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 case "$objname" in
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 *[A-Z]*)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 helpers/makeline cmd rm -f '$@' \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 esac
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 helpers/makeline cmd ../../toolwrap/cl470 -q -po -p? -x \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 ${CPPFLAGS} "$1" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 helpers/makeline cmd ../../toolwrap/str2ind -a \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 -t ../str2ind.tab -l ../str2ind.log \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 -f "$pp_name" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 helpers/makeline cmd ../../toolwrap/cl470 -q -c ${CFLAGS} \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 "$pp__name" >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 helpers/makeline cmd @rm -f "$pp_name" \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 helpers/makeline cmd @rm -f "$pp__name" \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 case "$objname" in
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 *[A-Z]*)
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 objname_lc=`echo $objname | tr A-Z a-z`
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 helpers/makeline cmd mv $objname_lc $objname \
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 ;;
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 esac
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 OBJS="$OBJS $objname"
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 else
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 cfile_plain "$1"
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 fi
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 }
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 # invoke the recipe
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 SRC=../../src
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 OBJS=
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 . "$recipe_file"
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 # finish the Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 helpers/makeline dep $LIBNAME.lib ${OBJS} >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 echo ' ../../toolwrap/ar470 r $@ $^' >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 echo >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 echo 'clean:' >> $BUILD_DIR/$LIBNAME/Makefile
f10cbd8a51c4 scripts: pruned import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 echo ' rm -f *.obj *.lib *.c' >> $BUILD_DIR/$LIBNAME/Makefile