Lines Matching +full:- +full:- +full:libs
6 # Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
9 # -s directory: alternative source directory (default .)
10 # -l directory: library source directory (default derived from $0)
11 # -c file: alternative config.c template (default $libdir/config.c.in)
12 # -c -: don't write config.c
13 # -m file: alternative Makefile template (default ./Makefile.pre)
14 # -m -: don't write Makefile
17 # Setup files after a -n option are used for their variables, modules
25 # - insert an identifying comment at the start
26 # - for each <module> mentioned in Setup before *noconfig*:
31 # - insert an identifying comment at the start
32 # - replace _MODOBJS_ by the list of objects from Setup (except for
33 # Setup files after a -n option)
34 # - replace _MODLIBS_ by the list of libraries from Setup
35 # - for each object file mentioned in Setup, append a rule
37 # - for each module mentioned in Setup, append a rule
39 # - for each variable definition found in Setup, insert the definition
44 usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre]
45 [Setup] ... [-n [Setup] ...]'
55 -s) shift; srcdir=$1; shift;;
56 -l) shift; libdir=$1; shift;;
57 -c) shift; config=$1; shift;;
58 -m) shift; makepre=$1; shift;;
59 --) shift; break;;
60 -n) noobjects=yes;;
61 -*) echo "$usage" 1>&2; exit 2;;
87 case `uname -s` in
94 ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
98 for i in ${*-Setup}
101 -n) echo '*noobjects*';;
105 sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
108 trap 'rm -f $rulesf' 0 1 2 3
116 LIBS=
136 *) LOCALLIBS=$LIBS; LIBS=;;
147 libs=
153 libs) libs="$libs $arg"; skip=; continue;;
158 -framework) libs="$libs $arg"; skip=libs;
161 -[IDUCfF]*) cpps="$cpps $arg";;
162 -Xcompiler) skip=cpps;;
163 -Xlinker) libs="$libs $arg"; skip=libs;;
164 -rpath) libs="$libs $arg"; skip=libs;;
165 --rpath) libs="$libs $arg"; skip=libs;;
166 -[A-Zl]*) libs="$libs $arg";;
167 *.a) libs="$libs $arg";;
168 *.so) libs="$libs $arg";;
169 *.sl) libs="$libs $arg";;
170 /*.o) libs="$libs $arg";;
171 *.def) libs="$libs $arg";;
174 *.m) srcs="$srcs $arg";; # Objective-C src
179 \$*) libs="$libs $arg"
183 -u) skip=libs; libs="$libs -u";;
184 [a-zA-Z_]*) mods="$mods $arg";;
191 LIBS="$LIBS $libs"
208 *.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
224 rule="$obj: $src; $cc $cpps -c $src -o $obj"
241 rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
252 yes) BASELIBS=$LIBS;;
253 *) LOCALLIBS=$LIBS;;
255 LIBS='$(LOCALMODLIBS) $(BASEMODLIBS)'
269 -) ;;
270 *) sed -e "
281 -) ;;
283 trap 'rm -f $sedf' 0 1 2 3
288 echo "s%_MODLIBS_%$LIBS%" >>$sedf
290 sed -f $sedf $makepre >Makefile
292 rm -f $sedf
296 rm -f $rulesf