xref: /freebsd/contrib/bmake/mk/sys/IRIX.mk (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
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 .cc .cpp .cxx .C .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
73MAKE?=		make
74
75NM?=		nm
76
77PC?=		pc
78PFLAGS?=
79COMPILE.p?=	${PC} ${PFLAGS} ${CPPFLAGS} -c
80LINK.p?=	${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
81
82SHELL?=		sh
83
84SIZE?=		size
85
86TSORT?= 	tsort -q
87
88YACC?=		yacc
89YFLAGS?=
90YACC.y?=	${YACC} ${YFLAGS}
91
92# C
93.c:
94	${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
95.c.o:
96	${COMPILE.c} ${.IMPSRC}
97.c.a:
98	${COMPILE.c} ${.IMPSRC}
99	${AR} ${ARFLAGS} $@ $*.o
100	rm -f $*.o
101.c.ln:
102	${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
103
104# C++
105.cc .cpp .cxx .C:
106	${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
107.cc.o .cpp.o .cxx.o .C.o:
108	${COMPILE.cc} ${.IMPSRC}
109.cc.a .cpp.a .cxx.a .C.a:
110	${COMPILE.cc} ${.IMPSRC}
111	${AR} ${ARFLAGS} $@ $*.o
112	rm -f $*.o
113
114# Fortran/Ratfor
115.f:
116	${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
117.f.o:
118	${COMPILE.f} ${.IMPSRC}
119.f.a:
120	${COMPILE.f} ${.IMPSRC}
121	${AR} ${ARFLAGS} $@ $*.o
122	rm -f $*.o
123
124.F:
125	${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
126.F.o:
127	${COMPILE.F} ${.IMPSRC}
128.F.a:
129	${COMPILE.F} ${.IMPSRC}
130	${AR} ${ARFLAGS} $@ $*.o
131	rm -f $*.o
132
133.r:
134	${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
135.r.o:
136	${COMPILE.r} ${.IMPSRC}
137.r.a:
138	${COMPILE.r} ${.IMPSRC}
139	${AR} ${ARFLAGS} $@ $*.o
140	rm -f $*.o
141
142# Pascal
143.p:
144	${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
145.p.o:
146	${COMPILE.p} ${.IMPSRC}
147.p.a:
148	${COMPILE.p} ${.IMPSRC}
149	${AR} ${ARFLAGS} $@ $*.o
150	rm -f $*.o
151
152# Assembly
153.s:
154	${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
155.s.o:
156	${COMPILE.s} ${.IMPSRC}
157.s.a:
158	${COMPILE.s} ${.IMPSRC}
159	${AR} ${ARFLAGS} $@ $*.o
160	rm -f $*.o
161.S:
162	${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
163.S.o:
164	${COMPILE.S} ${.IMPSRC}
165.S.a:
166	${COMPILE.S} ${.IMPSRC}
167	${AR} ${ARFLAGS} $@ $*.o
168	rm -f $*.o
169
170# Lex
171.l:
172	${LEX.l} ${.IMPSRC}
173	${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
174	rm -f lex.yy.c
175.l.c:
176	${LEX.l} ${.IMPSRC}
177	mv lex.yy.c ${.TARGET}
178.l.o:
179	${LEX.l} ${.IMPSRC}
180	${COMPILE.c} -o ${.TARGET} lex.yy.c
181	rm -f lex.yy.c
182
183# Yacc
184.y:
185	${YACC.y} ${.IMPSRC}
186	${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
187	rm -f y.tab.c
188.y.c:
189	${YACC.y} ${.IMPSRC}
190	mv y.tab.c ${.TARGET}
191.y.o:
192	${YACC.y} ${.IMPSRC}
193	${COMPILE.c} -o ${.TARGET} y.tab.c
194	rm -f y.tab.c
195
196# Shell
197.sh:
198	rm -f ${.TARGET}
199	cp ${.IMPSRC} ${.TARGET}
200