made to work on pdp-11

This commit is contained in:
ceriel 1987-03-18 09:35:31 +00:00
parent 8e9f1f781c
commit 5fe6bf0fcd
2 changed files with 12 additions and 9 deletions

View file

@ -44,6 +44,7 @@ GENOPTIONS =
# Special #defines during compilation # Special #defines during compilation
CDEFS = $(EM_INCLUDES) $(LIB_INCLUDES) CDEFS = $(EM_INCLUDES) $(LIB_INCLUDES)
CFLAGS = $(CDEFS) $(COPTIONS) -O CFLAGS = $(CDEFS) $(COPTIONS) -O
LDFLAGS = -i
# Grammar files and their objects # Grammar files and their objects
LSRC = tokenfile.g declar.g statement.g expression.g program.g LSRC = tokenfile.g declar.g statement.g expression.g program.g
@ -139,11 +140,11 @@ lint: Cfiles
@rm -f nmclash.o a.out @rm -f nmclash.o a.out
longnames: $(SRC) $(HFILES) longnames: $(SRC) $(HFILES)
sh -c 'if test -f longnames ; then $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames ; else $(PRID) -l7 $? > longnames ; fi' sh -c 'if test -f longnames ; then : ; else touch longnames ; fi ; $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames'
# entry points not to be used directly # entry points not to be used directly
Cfiles: hfiles LLfiles $(GENCFILES) $(GHSTRSRC) $(GHSRC) makefile Cfiles: hfiles LLfiles $(GENCFILES) $(GSRC) $(GHSRC) makefile
echo $(SRC) $(HFILES) > Cfiles echo $(SRC) $(HFILES) > Cfiles
hfiles: ./make.hfiles Parameters hfiles: ./make.hfiles Parameters
@ -193,11 +194,11 @@ depend: Cfiles
#INCLINCLINCLINCL #INCLINCLINCLINCL
$(CURRDIR)/main: $(OBJ) $(CURRDIR)/makefile $(CURRDIR)/main: $(OBJ) $(CURRDIR)/makefile
$(CC) $(COPTIONS) $(LFLAGS) $(OBJ) $(LIBS) -o $(CURRDIR)/main $(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(LIBS) -o $(CURRDIR)/main
size $(CURRDIR)/main size $(CURRDIR)/main
$(CURRDIR)/emain: $(OBJ) $(CURRDIR)/makefile $(CURRDIR)/emain: $(OBJ) $(CURRDIR)/makefile
$(CC) $(COPTIONS) $(LFLAGS) $(OBJ) $(ELIBS) -o $(CURRDIR)/emain $(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(ELIBS) -o $(CURRDIR)/emain
size $(CURRDIR)/emain size $(CURRDIR)/emain
Xlint: Xlint:

View file

@ -40,11 +40,6 @@ else
mv Xclashes clashes mv Xclashes clashes
fi fi
rm -f makefile rm -f makefile
ed - $PW/makefile <<'EOF'
/^#EXCLEXCL/,/^#INCLINCL/d
w makefile
q
EOF
for i in `cat $PW/Cfiles` for i in `cat $PW/Cfiles`
do do
cat >> makefile <<EOF cat >> makefile <<EOF
@ -53,4 +48,11 @@ $i: clashes $PW/$i
cid -Fclashes < $PW/$i > $i cid -Fclashes < $PW/$i > $i
EOF EOF
done done
make `cat $PW/Cfiles`
rm -f makefile
ed - $PW/makefile <<'EOF'
/^#EXCLEXCL/,/^#INCLINCL/d
w makefile
q
EOF
make CURRDIR=$PW $target make CURRDIR=$PW $target