Subversion Repositories tendra.SVN

Rev

Rev 15 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 57
Line 2... Line 2...
2
 
2
 
3
# Standard directories and files
3
# Standard directories and files
4
.include "../Makefile.inc"
4
#.include "../Makefile.inc"
-
 
5
 
-
 
6
include ../../../defs.mk
5
 
7
 
6
SRCC=./obj_c
8
SRCC=./obj_c
7
SRCTOK=${.CURDIR}/obj_tok
9
SRCTOK=${.CURDIR}/obj_tok
8
SRCX=${.CURDIR}/../shared
10
SRCX=${.CURDIR}/../shared
9
 
11
 
10
# Standard variables
12
# Standard variables
11
 
13
 
12
WARNS?=		2
14
WARNS?=		2
13
 
15
 
14
TCCOPTS=	-Yposix2 -Xs
16
TCCOPTS=	-Yposix2 -Xs
15
CCOPTS=		${TCCOPTS} -I${BASE_DIR}/${INCLUDE} -I${.CURDIR} -I${SRCC}\
17
CCOPTS=		${TCCOPTS} -I${BASE_DIR}/${INCLUDE} -I${.CURDIR} -I${SRCC}\
16
		-I${SRCTOK} -I${SRCX}
18
		-I${SRCTOK} -I${SRCX}
17
LIBS=
19
LIBS=
18
 
20
 
19
CFLAGS+=-I../shared -I$(SRCC)
21
CFLAGS+=-I../shared -I$(SRCC)
20
 
22
 
21
# Dependencies and construction rules
23
# Dependencies and construction rules
22
 
24
 
23
PROG=		${.CURDIR:T}
25
PROG=		make_err
24
 
26
 
25
OBJS=		error.o errors.o lex.o main.o process.o syntax.o xalloc.o
27
OBJS=		error.o errors.o lex.o main.o process.o syntax.o xalloc.o
26
 
28
 
27
.c.o:
-
 
28
	$(CC) -c $(CFLAGS) -o $@ $<
-
 
29
 
29
 
30
$(PROG): $(OBJS)
30
$(PROG): $(OBJS)
31
	$(CC) -o $(PROG) $(LDFLAGS) $(OBJS)
31
	$(CC) -o $(PROG) $(LDFLAGS) $(OBJS)
-
 
32
 
-
 
33
.c.o:
-
 
34
	$(CC) -I../shared -I$(SRCC) -c $(CFLAGS) -o $@ $<
-
 
35
 
-
 
36
error.o: ../shared/error.c
-
 
37
	$(CC) -I../shared -c $(CFLAGS) -o $@ ../shared/error.c
-
 
38
 
-
 
39
xalloc.o: ../shared/xalloc.c
-
 
40
	$(CC) -I../shared -c $(CFLAGS) -o $@ ../shared/xalloc.c
-
 
41
 
-
 
42
errors.o: obj_c/errors.c
-
 
43
	$(CC) -I./ -I./obj_c -I../shared -c $(CFLAGS) -o $@ obj_c/errors.c
-
 
44
 
32
 
45
 
33
.PATH:		${SRCC} ${SRCTOK} ${SRCX}
46
.PATH:		${SRCC} ${SRCTOK} ${SRCX}
-
 
47
install:
-
 
48
	mkdir -p $(INSTALL_BINDIR)
-
 
49
	install $(PROG) $(INSTALL_BINDIR)/$(PROG)
34
 
50
 
35
clean:
51
clean:
36
	rm -f $(OBJS)
52
	rm -f $(OBJS)
37
	rm -f $(PROG)
53
	rm -f $(PROG)
38
 
54
 
Line 42... Line 58...
42
#.PATH:	${SRCC} ${SRCTOK} ${SRCX}
58
#.PATH:	${SRCC} ${SRCTOK} ${SRCX}
43
 
59
 
44
SIDOPTS=-l ansi-c -s no-lines
60
SIDOPTS=-l ansi-c -s no-lines
45
 
61
 
46
#SID_OUT=${SRC}/syntax.o ${SRC}/syntax.h
62
#SID_OUT=${SRC}/syntax.o ${SRC}/syntax.h
47
#C_OUT=${SRCC}/calculus.h ${SRCC}/type_ops.h
63
#C_OUT=${SRCC}/errors.h ${SRCC}/type_ops.h
48
#TOK_OUT=${SRCTOK}/calculus.h ${SRCTOK}/type_ops.h
64
#TOK_OUT=${SRCTOK}/errors.h ${SRCTOK}/type_ops.h
49
#DISK_OUT=${SRC}/read_def.h ${SRC}/write_def.h ${SRC}/print_def.h
65
#DISK_OUT=${SRC}/read_def.h ${SRC}/write_def.h ${SRC}/print_def.h
50
#LEXI_OUT=${SRC}/lexer.h ${SRC}/keyword.h
66
#LEXI_OUT=${SRC}/lexer.h ${SRC}/keyword.h
51
 
67
 
52
#${SRC}/syntax.o : ${SRC}/syntax.sid ${SRC}/syntax.act
68
#${SRC}/syntax.o : ${SRC}/syntax.sid ${SRC}/syntax.act
53
#	@${REMOVE} ${SID_OUT}
69
#	@${REMOVE} ${SID_OUT}
54
#	${SID} ${SIDOPTS} ${SRC}/syntax.sid ${SRC}/syntax.act ${SID_OUT}
70
#	${SID} ${SIDOPTS} ${SRC}/syntax.sid ${SRC}/syntax.act ${SID_OUT}
55
#
71
#
56
#${SRCC}/calculus.h : ${SRC}/calculus.alg
72
#${SRCC}/errors.h : ${SRC}/errors.alg
57
#	@${REMOVE} ${SRCC}/*.h
73
#	@${REMOVE} ${SRCC}/*.h
58
#	${CALCULUS} -a -x ${SRC}/calculus.alg ${SRCC}
74
#	${CALCULUS} -a -x ${SRC}/errors.alg ${SRCC}
59
#
75
#
60
#${SRCTOK}/calculus.h : ${SRC}/calculus.alg
76
#${SRCTOK}/errors.h : ${SRC}/errors.alg
61
#	@${REMOVE} ${SRCTOK}/*.h
77
#	@${REMOVE} ${SRCTOK}/*.h
62
#	${CALCULUS} -a -x -t ${SRC}/calculus.alg ${SRCTOK}
78
#	${CALCULUS} -a -x -t ${SRC}/errors.alg ${SRCTOK}
63
#
79
#
64
#${SRC}/read_def.h : ${SRC}/calculus.alg ${SRC}/disk.alg
80
#${SRC}/read_def.h : ${SRC}/errors.alg ${SRC}/disk.alg
65
#	@${REMOVE} ${SRC}/read_def.h ${SRC}/write_def.h
81
#	@${REMOVE} ${SRC}/read_def.h ${SRC}/write_def.h
66
#	${CALCULUS} -a -x -d ${SRC}/calculus.alg ${SRC}/disk.alg ${SRC}
82
#	${CALCULUS} -a -x -d ${SRC}/errors.alg ${SRC}/disk.alg ${SRC}
67
 
83
 
68
#CALCULUS=calculus
84
#CALCULUS=errors
69
#LEXI=lexi
85
#LEXI=lexi
70
#SID=sid
86
#SID=sid
71
#SIDOPTS=-l ansi-c -s no-lines
87
#SIDOPTS=-l ansi-c -s no-lines
72
#
88
#
73
#SID_OUT=${SRC}/syntax.o ${SRC}/syntax.h
89
#SID_OUT=${SRC}/syntax.o ${SRC}/syntax.h