# Makefile for rc.
#
# Define the macro NODIRENT if your system has <sys/dir.h> but not <dirent.h>.
# Define the macro NONMPIPES if your system does not support named pipes.
# Define the macro NOJOB if your system does not support job control.
# Define the macro NOLIMITS if your system does not support Berkeley limits.

# Get rid of default CFLAGS on braindamaged make's
CFLAGS=  

# Use an ANSI compiler (or at least one that groks prototypes and void *):
CC=gcc -O -DNODIRENT -DNOLIMITS

# On an sgi running IRIX 3.3.1 I used:
#CC=cc -g -O
#
# On the NeXT I used
#CC=cc -g -O -DNODIRENT
#
# On a VAX running BSD 4.2
#CC=gcc -g -O -DNODIRENT

# Use bison if you will, but yacc generates a smaller y.tab.c, and the speed
# of the parser is largely irrelevant in a shell.
YACC=yacc

OBJS =  builtins.o exec.o fn.o footobar.o glob.o glom.o hash.o heredoc.o \
	input.o lex.o list.o main.o match.o nalloc.o open.o redir.o status.o \
	tree.o utils.o var.o walk.o which.o y.tab.o

rc: $(OBJS)
	$(CC) -o rc $(OBJS)

y.tab.c: parse.y
	$(YACC) -d parse.y

clean:
	rm -f a.* *.o *.s core *.tab.* *.out

# dependencies:

lex.o: y.tab.c
y.tab.o: y.tab.c
