xref: /freebsd/contrib/bmake/mk/sys/IRIX.mk (revision 3416500aef140042c64bc149cb1ec6620483bc44)
1#	$NetBSD: IRIX.sys.mk,v 1.2 2002/12/24 23:03:27 jschauma Exp $
2#	@(#)sys.mk	8.2 (Berkeley) 3/21/94
3
4.if ${.PARSEFILE} == "sys.mk"
5.ifndef ROOT_GROUP
6OS!=		uname -s
7ROOT_GROUP!=	sed -n /:0:/s/:.*//p /etc/group
8.MAKEOVERRIDES+= OS ROOT_GROUP
9.endif
10unix?=		We run ${OS}.
11.endif
12
13.SUFFIXES: .out .a .ln .o .s .S .c ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h
14.SUFFIXES: .sh .m4
15
16.LIBS:		.a
17
18AR?=		ar
19ARFLAGS?=	rl
20RANLIB?=	ranlib
21
22AS?=		as
23AFLAGS?=
24COMPILE.s?=	${CC} ${AFLAGS} -c
25LINK.s?=	${CC} ${AFLAGS} ${LDFLAGS}
26COMPILE.S?=	${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
27LINK.S?=	${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
28
29CC?=		cc
30NOGCCERROR?=	# defined
31DBG?=	-O2
32CFLAGS?=	${DBG}
33COMPILE.c?=	${CC} ${CFLAGS} ${CPPFLAGS} -c
34LINK.c?=	${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
35
36CXX?=		CC
37CXXFLAGS?=	${CFLAGS}
38COMPILE.cc?=	${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
39LINK.cc?=	${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
40
41OBJC?=		${CC}
42OBJCFLAGS?=	${CFLAGS}
43COMPILE.m?=	${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
44LINK.m?=	${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
45
46CPP?=		CC
47CPPFLAGS?=
48
49FC?=		f77
50FFLAGS?=	-O
51RFLAGS?=
52COMPILE.f?=	${FC} ${FFLAGS} -c
53LINK.f?=	${FC} ${FFLAGS} ${LDFLAGS}
54COMPILE.F?=	${FC} ${FFLAGS} ${CPPFLAGS} -c
55LINK.F?=	${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
56COMPILE.r?=	${FC} ${FFLAGS} ${RFLAGS} -c
57LINK.r?=	${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
58
59INSTALL?=	${PREFIX}/bin/install-sh
60
61LEX?=		lex
62LFLAGS?=
63LEX.l?=		${LEX} ${LFLAGS}
64
65LD?=		ld
66LDFLAGS?=
67
68LINT?=		lint
69LINTFLAGS?=	-chapbxzF
70
71LORDER?=	lorder
72
73NM?=		nm
74
75PC?=		pc
76PFLAGS?=
77COMPILE.p?=	${PC} ${PFLAGS} ${CPPFLAGS} -c
78LINK.p?=	${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
79
80SHELL?=		sh
81
82SIZE?=		size
83
84TSORT?= 	tsort -q
85
86YACC?=		yacc
87YFLAGS?=
88YACC.y?=	${YACC} ${YFLAGS}
89
90# C
91.c:
92	${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
93.c.o:
94	${COMPILE.c} ${.IMPSRC}
95.c.a:
96	${COMPILE.c} ${.IMPSRC}
97	${AR} ${ARFLAGS} $@ $*.o
98	rm -f $*.o
99.c.ln:
100	${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
101
102# C++
103${CXX_SUFFIXES}:
104	${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
105${CXX_SUFFIXES:%=%.o}:
106	${COMPILE.cc} ${.IMPSRC}
107${CXX_SUFFIXES:%=%.a}:
108	${COMPILE.cc} ${.IMPSRC}
109	${AR} ${ARFLAGS} $@ $*.o
110	rm -f $*.o
111
112# Fortran/Ratfor
113.f:
114	${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
115.f.o:
116	${COMPILE.f} ${.IMPSRC}
117.f.a:
118	${COMPILE.f} ${.IMPSRC}
119	${AR} ${ARFLAGS} $@ $*.o
120	rm -f $*.o
121
122.F:
123	${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
124.F.o:
125	${COMPILE.F} ${.IMPSRC}
126.F.a:
127	${COMPILE.F} ${.IMPSRC}
128	${AR} ${ARFLAGS} $@ $*.o
129	rm -f $*.o
130
131.r:
132	${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
133.r.o:
134	${COMPILE.r} ${.IMPSRC}
135.r.a:
136	${COMPILE.r} ${.IMPSRC}
137	${AR} ${ARFLAGS} $@ $*.o
138	rm -f $*.o
139
140# Pascal
141.p:
142	${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
143.p.o:
144	${COMPILE.p} ${.IMPSRC}
145.p.a:
146	${COMPILE.p} ${.IMPSRC}
147	${AR} ${ARFLAGS} $@ $*.o
148	rm -f $*.o
149
150# Assembly
151.s:
152	${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
153.s.o:
154	${COMPILE.s} ${.IMPSRC}
155.s.a:
156	${COMPILE.s} ${.IMPSRC}
157	${AR} ${ARFLAGS} $@ $*.o
158	rm -f $*.o
159.S:
160	${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
161.S.o:
162	${COMPILE.S} ${.IMPSRC}
163.S.a:
164	${COMPILE.S} ${.IMPSRC}
165	${AR} ${ARFLAGS} $@ $*.o
166	rm -f $*.o
167
168# Lex
169.l:
170	${LEX.l} ${.IMPSRC}
171	${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
172	rm -f lex.yy.c
173.l.c:
174	${LEX.l} ${.IMPSRC}
175	mv lex.yy.c ${.TARGET}
176.l.o:
177	${LEX.l} ${.IMPSRC}
178	${COMPILE.c} -o ${.TARGET} lex.yy.c
179	rm -f lex.yy.c
180
181# Yacc
182.y:
183	${YACC.y} ${.IMPSRC}
184	${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
185	rm -f y.tab.c
186.y.c:
187	${YACC.y} ${.IMPSRC}
188	mv y.tab.c ${.TARGET}
189.y.o:
190	${YACC.y} ${.IMPSRC}
191	${COMPILE.c} -o ${.TARGET} y.tab.c
192	rm -f y.tab.c
193
194# Shell
195.sh:
196	rm -f ${.TARGET}
197	cp ${.IMPSRC} ${.TARGET}
198