Got Yacc compiling and running
This commit is contained in:
@@ -605,6 +605,7 @@ file /bin/whoami
|
||||
file /bin/write
|
||||
mode 02755
|
||||
file /bin/xargs
|
||||
file /bin/yacc
|
||||
file /bin/zcat
|
||||
|
||||
link /bin/[
|
||||
|
||||
@@ -17,7 +17,7 @@ SUBDIR = adb adc-demo aout ar as awk basic calendar cc chflags \
|
||||
ranlib re renice retroforth scm sed setty sh sl smallc \
|
||||
smlrc smux stty sysctl test uname wiznet xargs \
|
||||
zmodem gtest msec cron compress date2 tip \
|
||||
talloc uucp
|
||||
talloc uucp yacc
|
||||
|
||||
# /sbin
|
||||
SUBDIR += chown chroot disktool fsck getty init \
|
||||
|
||||
@@ -1,24 +1,31 @@
|
||||
#
|
||||
# @(#)Makefile 4.2.1 (2.11BSD) 1996/10/24
|
||||
#
|
||||
DESTDIR=
|
||||
SEPFLAG= -i
|
||||
CFLAGS=-O
|
||||
SRCS = Makefile dextern files yaccpar \
|
||||
y1.c y2.c y3.c y4.c \
|
||||
yaccdiffs yaccnews
|
||||
#==========================================
|
||||
# Makefile: makefile for yacc
|
||||
# Copyright 2012 Majenko Technolohies
|
||||
# (matt@majenko.co.uk
|
||||
# Last Modified: 29/01/2012
|
||||
#==========================================
|
||||
|
||||
all: yacc
|
||||
TOPSRC = $(shell cd ../../..; pwd)
|
||||
include $(TOPSRC)/target.mk
|
||||
|
||||
yacc: y1.o y2.o y3.o y4.o
|
||||
$(CC) ${SEPFLAG} -o yacc y?.o
|
||||
y1.o y2.o y3.o y4.o: dextern files
|
||||
install: yacc yaccpar
|
||||
install -s yacc $(DESTDIR)/usr/bin
|
||||
install -c yaccpar $(DESTDIR)/usr/share/misc
|
||||
clean :
|
||||
-rm -f *.o yacc
|
||||
OBJS = y1.o y2.o y3.o y4.o
|
||||
SRCS = y1.c y2.c y3.c y4.c
|
||||
|
||||
srcs: $(SRCS)
|
||||
$(SRCS):
|
||||
sccs get $@
|
||||
all: yacc
|
||||
|
||||
yacc: ${OBJS}
|
||||
${CC} ${LDFLAGS} -o yacc.elf ${OBJS} ${LIBS}
|
||||
${OBJDUMP} -S yacc.elf > yacc.dis
|
||||
${SIZE} yacc.elf
|
||||
${ELF2AOUT} yacc.elf $@
|
||||
|
||||
clean:
|
||||
-rm -f yacc ${OBJS} yacc.elf yacc.dis
|
||||
|
||||
install: all
|
||||
install yacc $(DESTDIR)/bin/
|
||||
|
||||
y1.o: y1.c dextern
|
||||
y2.o: y2.c dextern
|
||||
y3.o: y3.c dextern
|
||||
y4.o: y4.c dextern
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# ifdef MEDIUM
|
||||
# define ACTSIZE 4000
|
||||
# define MEMSIZE 5200
|
||||
# define NSTATES 600
|
||||
# define NSTATES 750
|
||||
# define NTERMS 127
|
||||
# define NPROD 400
|
||||
# define NNONTERM 200
|
||||
@@ -43,6 +43,19 @@
|
||||
# define WSETSIZE 250
|
||||
# endif
|
||||
|
||||
# ifdef TINY
|
||||
# define ACTSIZE 1000
|
||||
# define MEMSIZE 1300
|
||||
# define NSTATES 750
|
||||
# define NTERMS 127
|
||||
# define NPROD 200
|
||||
# define NNONTERM 50
|
||||
# define TEMPSIZE 200
|
||||
# define CNAMSZ 1000
|
||||
# define LSETSIZE 250
|
||||
# define WSETSIZE 100
|
||||
# endif
|
||||
|
||||
# define NAMESIZE 50
|
||||
# define NTYPES 63
|
||||
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
|
||||
/* basic size of the Yacc implementation */
|
||||
/* # define HUGE */
|
||||
#define MEDIUM
|
||||
/* #define MEDIUM */
|
||||
#define TINY
|
||||
|
||||
@@ -3,6 +3,7 @@ static char sccsid[] = "@(#)y1.c 4.1.1 (2.11BSD) 1995/05/11";
|
||||
#endif
|
||||
|
||||
# include "dextern"
|
||||
#include <stdlib.h>
|
||||
|
||||
/* variables used locally */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user