4 # $1: file w/o extension
5 # $2: src path (optional)
9 if [ "z$ptmp" = "z" ]; then
12 ${CC} -c -o ${BUILDPATH}/obj/$1.o ${CFLAGS} -Isrc -I${BUILDPATH} $ptmp/$1.c
16 # $1: file w/o extension
17 # $2: dst path (optional)
24 if [ "z$ptmp" = "z" ]; then
29 ${LINK} ${LINKFLAGS} -o $ptmp/${fname}${EXESFX} ${BUILDPATH}/obj/${fname}.o $* ${LINKLIBS}
30 if [ "z$WINE" != "z" ]; then
31 chmod 711 $ptmp/${fname}${EXESFX}
46 OLINKFLAGS
="$LINKFLAGS"
53 LINKFLAGS
="$OLINKFLAGS"
59 yacc -h >/dev
/null
2>&1
60 if test "$?" = "127"; then
61 echo "WARNING: YACC/Bison not found!"
96 echo "building K8Jam..."
98 mkdir
-p ${BUILDPATH} 2>/dev
/null
99 rm -rf ${BUILDPATH}/* 2>/dev
/null
100 mkdir
-p ${BUILDPATH}/obj
2>/dev
/null
102 mkdir
-p ${DESTPATH} 2>/dev
/null
103 rm -rf ${DESTPATH}/* 2>/dev
/null
105 if [ "$have_yacc" = "tan" ]; then
107 tools
/yyacc
${BUILDPATH}/jamgram.y
${BUILDPATH}/jamgramtab.h src
/jamgram.yy
108 yacc -d ${BUILDPATH}/jamgram.y
109 mv -f y.tab.c
${BUILDPATH}/jamgram.c
110 mv -f y.tab.h
${BUILDPATH}/jamgram.h
112 echo "Using pregenerated jamgram"
113 cp src
/jamgram_poorman
/* ${BUILDPATH}/
115 docc
"jamgram" ${BUILDPATH}
118 donativelink
"unigen"
120 ${BUILDPATH}/unigen${EXESFX} ${BUILDPATH}/hsregexp_unicode_mapping.c unidata
/UnicodeData.txt
122 libobj
="${BUILDPATH}/obj/jamgram.o"
123 for srcf
in ${srclist}; do
125 libobj
="${libobj} ${BUILDPATH}/obj/${srcf}.o"
129 ${AR} ${BUILDPATH}/obj/libjam.a ${libobj}
131 echo "Ranlib libjam.a"
132 ${RANLIB} ${BUILDPATH}/obj
/libjam.a
137 donativecc
"mkjambase"
138 donativelink
"mkjambase"
139 echo "preparing Jambase"
140 ${BUILDPATH}/mkjambase${EXESFX} ${BUILDPATH}/jambase.c defaults
/Jambase
141 docc
"jambase" ${BUILDPATH}
143 dolink
"jam" ${DESTPATH} ${BUILDPATH}/obj/jambase.o ${BUILDPATH}/obj
/libjam.a
145 #rm ${BUILDPATH}/obj/* 2>/dev/null