# makefile for xetal,
# Copyright (C) 1991 Raphael Cerf (e-mail:
[email protected])
# This file is part of xetal.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# C compiler
CC=cc
# Flags for compiler
# CFLAGS= -g
CFLAGS= -O -sun4
# Lexical analyser
LEX=lex
# LEX=flex
# Flag to use when with flex
LEXPGM=
# LEXPGM=-DFLEX_SCANNER
# Flags for lexical analyser
LEXFLAGS=
# LEXFLAGS=-f
# Parser
PARSER=yacc
# PARSER=bison
# Flags for parser
PARSFLAGS=-dv
CLIBS=
# variables to use for debugging
# FLAGS1=-DYYDEBUG -DMALDEBUG
FLAGS1=
# MALLOC=/usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o
MALLOC=
# object files
COBJ=str.o stack.o y.tab.o lex.yy.o main.o
# where xetal goes for installation
BINDIR=/java/home1/cerf/def
all : xetal
install: xetal
strip xetal
cp xetal xetal.1 $(BINDIR)
clean:
rm *.o y.tab.[ch] lex.yy.c y.output xetal
tar:
tar cf xetal.tar str.c str.h stack.c stack.h \
proto.h glbl.h main.c \
l.l y.y makefile xetal.1 \
COPYING README
xetal: $(COBJ)
$(CC) $(COBJ) $(MALLOC) -ll $(CLIBS) -o xetal
lex.yy.o: l.l y.tab.c
$(LEX) $(LEXFLAGS) l.l
$(CC) -c lex.yy.c $(CFLAGS) $(FLAGS1)
y.tab.c: y.y proto.h
$(PARSER) $(PARSFLAGS) y.y
y.tab.o: y.tab.c
$(CC) -c y.tab.c $(CFLAGS) $(FLAGS1) $(LEXPGM)
str.o: str.c str.h proto.h
$(CC) -c str.c $(CFLAGS)
stack.o:stack.c stack.h proto.h
$(CC) -c stack.c $(CFLAGS)
main.o: main.c proto.h
$(CC) -c main.c $(CFLAGS) $(FLAGS1) $(LEXPGM)