summaryrefslogtreecommitdiff
path: root/support/xetal/makefile
blob: a2b22bf45d26736188861c18418e2197d9ee1fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#   makefile for xetal,	
#   Copyright (C) 1991 Raphael Cerf (e-mail: cerf@ens.ens.fr)

#   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)