login: SIGINT should interrupt motd printing
[unleashed.git] / bin / bmake / mk / sys / AIX.mk
blob3109c23c58f1ac5f8da005cc843a22e7f7771701
1 # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
2 # @(#)sys.mk 5.11 (Berkeley) 3/13/91
4 OS= AIX
5 unix= We run ${OS}.
6 ROOT_GROUP= system
8 # This needs a lot of work yet...
10 NOPIC=no # no shared libs?
12 .SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4
14 .LIBS: .a
16 AR= ar
17 ARFLAGS= rl
18 RANLIB= ranlib
20 AS= as
21 AFLAGS=
22 COMPILE.s= ${AS} ${AFLAGS}
23 LINK.s= ${CC} ${AFLAGS} ${LDFLAGS}
24 COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
25 LINK.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
26 .if exists(/usr/local/bin/gcc)
27 CC= gcc
28 DBG= -O -g
29 STATIC?= -static
30 .else
31 CC= cc
32 DBG= -g
33 STATIC=
34 .endif
35 CFLAGS= ${DBG}
36 COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c
37 LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
39 CXX= g++
40 CXXFLAGS= ${CFLAGS}
41 COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
42 LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
44 CPP= cpp
45 .if defined(DESTDIR)
46 CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
47 .endif
49 MK_DEP= mkdeps.sh -N
50 FC= f77
51 FFLAGS= -O
52 RFLAGS=
53 COMPILE.f= ${FC} ${FFLAGS} -c
54 LINK.f= ${FC} ${FFLAGS} ${LDFLAGS}
55 COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c
56 LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
57 COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c
58 LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
60 LEX= lex
61 LFLAGS=
62 LEX.l= ${LEX} ${LFLAGS}
64 LD= ld
65 LDFLAGS=
67 LINT= lint
68 LINTFLAGS= -chapbx
70 MAKE= bmake
72 PC= pc
73 PFLAGS=
74 COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
75 LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
77 SHELL= sh
79 YACC= yacc
80 YFLAGS= -d
81 YACC.y= ${YACC} ${YFLAGS}
83 # C
84 .c:
85 ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
86 .c.o:
87 ${COMPILE.c} ${.IMPSRC}
88 .c.a:
89 ${COMPILE.c} ${.IMPSRC}
90 ${AR} ${ARFLAGS} $@ $*.o
91 rm -f $*.o
93 # C++
94 ${CXX_SUFFIXES}:
95 ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
96 ${CXX_SUFFIXES:%=%.o}:
97 ${COMPILE.cc} ${.IMPSRC}
98 ${CXX_SUFFIXES:%=%.a}:
99 ${COMPILE.cc} ${.IMPSRC}
100 ${AR} ${ARFLAGS} $@ $*.o
101 rm -f $*.o
103 # Fortran/Ratfor
105 ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
106 .f.o:
107 ${COMPILE.f} ${.IMPSRC}
108 .f.a:
109 ${COMPILE.f} ${.IMPSRC}
110 ${AR} ${ARFLAGS} $@ $*.o
111 rm -f $*.o
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
123 ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
124 .r.o:
125 ${COMPILE.r} ${.IMPSRC}
126 .r.a:
127 ${COMPILE.r} ${.IMPSRC}
128 ${AR} ${ARFLAGS} $@ $*.o
129 rm -f $*.o
131 # Pascal
133 ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
134 .p.o:
135 ${COMPILE.p} ${.IMPSRC}
136 .p.a:
137 ${COMPILE.p} ${.IMPSRC}
138 ${AR} ${ARFLAGS} $@ $*.o
139 rm -f $*.o
141 # Assembly
143 ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
144 .s.o:
145 ${COMPILE.s} -o ${.TARGET} ${.IMPSRC}
146 .s.a:
147 ${COMPILE.s} ${.IMPSRC}
148 ${AR} ${ARFLAGS} $@ $*.o
149 rm -f $*.o
151 ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
152 .S.o:
153 ${COMPILE.S} ${.IMPSRC}
154 .S.a:
155 ${COMPILE.S} ${.IMPSRC}
156 ${AR} ${ARFLAGS} $@ $*.o
157 rm -f $*.o
159 # Lex
161 ${LEX.l} ${.IMPSRC}
162 ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
163 rm -f lex.yy.c
164 .l.c:
165 ${LEX.l} ${.IMPSRC}
166 mv lex.yy.c ${.TARGET}
167 .l.o:
168 ${LEX.l} ${.IMPSRC}
169 ${COMPILE.c} -o ${.TARGET} lex.yy.c
170 rm -f lex.yy.c
172 # Yacc
174 ${YACC.y} ${.IMPSRC}
175 ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
176 rm -f y.tab.c
177 .y.c:
178 ${YACC.y} ${.IMPSRC}
179 mv y.tab.c ${.TARGET}
180 .y.o:
181 ${YACC.y} ${.IMPSRC}
182 ${COMPILE.c} -o ${.TARGET} y.tab.c
183 rm -f y.tab.c
185 # Shell
186 .sh:
187 rm -f ${.TARGET}
188 cp ${.IMPSRC} ${.TARGET}