xref: /dragonfly/contrib/bmake/mk/sys/OSF1.mk (revision 6eef5f0c)
1*6eef5f0cSAntonio Huete Jimenez#	$Id: OSF1.mk,v 1.14 2022/03/25 23:43:06 sjg Exp $
25f1e34d9SAlexandre Perrin#	$NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
35f1e34d9SAlexandre Perrin#	@(#)sys.mk	5.11 (Berkeley) 3/13/91
45f1e34d9SAlexandre Perrin
55f1e34d9SAlexandre PerrinOS ?=		OSF1
65f1e34d9SAlexandre Perrinunix ?=		We run ${OS}.
7ca58f742SDaniel FojtROOT_GROUP ?=	system
85f1e34d9SAlexandre Perrin
95f1e34d9SAlexandre Perrin# can't fine one anywhere, so just stop the dependency
10ca58f742SDaniel FojtLIBCRT0 ?= /dev/null
115f1e34d9SAlexandre Perrin
12ca58f742SDaniel FojtPATH ?=/usr/sbin:/usr/bin:/usr/ucb:/opt/gnu/bin:/usr/ccs/bin
135f1e34d9SAlexandre Perrin
14f445c897SJohn Marino.SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4
155f1e34d9SAlexandre Perrin
165f1e34d9SAlexandre Perrin.LIBS:		.a
175f1e34d9SAlexandre Perrin
185f1e34d9SAlexandre Perrin# no -X
195f1e34d9SAlexandre PerrinLD_X=
20ca58f742SDaniel FojtLD_x ?=		-x
21ca58f742SDaniel FojtLD_r ?=		-r
22ca58f742SDaniel FojtAR ?=		ar
23*6eef5f0cSAntonio Huete JimenezARFLAGS ?=	r
24ca58f742SDaniel FojtRANLIB ?=		ranlib
255f1e34d9SAlexandre Perrin
26ca58f742SDaniel FojtAS ?=		as
27ca58f742SDaniel FojtAS_STDIN ?=	-
285f1e34d9SAlexandre PerrinAFLAGS=
29ca58f742SDaniel FojtCOMPILE.s ?=	${AS} ${AFLAGS}
30ca58f742SDaniel FojtLINK.s ?=		${CC} ${AFLAGS} ${LDFLAGS}
31ca58f742SDaniel FojtCOMPILE.S ?=	${CC} ${AFLAGS} ${CPPFLAGS} -c
32ca58f742SDaniel FojtLINK.S ?=		${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
335f1e34d9SAlexandre Perrin.if exists(/opt/gnu/bin/gcc) || exists(/usr/local/bin/gcc)
345f1e34d9SAlexandre PerrinCC ?=		gcc
355f1e34d9SAlexandre Perrin.else
365f1e34d9SAlexandre PerrinCC ?=             cc -std
375f1e34d9SAlexandre Perrin.endif
385f1e34d9SAlexandre Perrin.if (${CC:T} == "gcc")
39ca58f742SDaniel FojtDBG ?=		-O -g
40ca58f742SDaniel FojtSTATIC ?=		-static
41ca58f742SDaniel FojtDBG ?=         -g
42ca58f742SDaniel FojtSTATIC ?=         -non_shared
435f1e34d9SAlexandre Perrin.endif
445f1e34d9SAlexandre Perrin
45ca58f742SDaniel FojtCFLAGS ?=		${DBG}
46ca58f742SDaniel FojtCOMPILE.c ?=	${CC} ${CFLAGS} ${CPPFLAGS} -c
47ca58f742SDaniel FojtLINK.c ?=		${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
485f1e34d9SAlexandre Perrin
49ca58f742SDaniel FojtCXX ?=		g++
50ca58f742SDaniel FojtCXXFLAGS ?=	${CFLAGS}
51ca58f742SDaniel FojtCOMPILE.cc ?=	${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
52ca58f742SDaniel FojtLINK.cc ?=	${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
535f1e34d9SAlexandre Perrin
54ca58f742SDaniel FojtCPP ?=		/usr/ccs/lib/cpp
555f1e34d9SAlexandre Perrin.if defined(DESTDIR)
565f1e34d9SAlexandre PerrinCPPFLAGS+=	-nostdinc -idirafter ${DESTDIR}/usr/include
575f1e34d9SAlexandre Perrin.endif
585f1e34d9SAlexandre Perrin
59ca58f742SDaniel FojtMK_DEP ?=	mkdeps.sh -N
60ca58f742SDaniel FojtFC ?=		f77
61ca58f742SDaniel FojtFFLAGS ?=		-O
625f1e34d9SAlexandre PerrinRFLAGS=
63ca58f742SDaniel FojtCOMPILE.f ?=	${FC} ${FFLAGS} -c
64ca58f742SDaniel FojtLINK.f ?=		${FC} ${FFLAGS} ${LDFLAGS}
65ca58f742SDaniel FojtCOMPILE.F ?=	${FC} ${FFLAGS} ${CPPFLAGS} -c
66ca58f742SDaniel FojtLINK.F ?=		${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
67ca58f742SDaniel FojtCOMPILE.r ?=	${FC} ${FFLAGS} ${RFLAGS} -c
68ca58f742SDaniel FojtLINK.r ?=		${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
695f1e34d9SAlexandre Perrin
70ca58f742SDaniel FojtLEX ?=		lex
715f1e34d9SAlexandre PerrinLFLAGS=
72ca58f742SDaniel FojtLEX.l ?=		${LEX} ${LFLAGS}
735f1e34d9SAlexandre Perrin
74ca58f742SDaniel FojtLD ?=		ld
755f1e34d9SAlexandre PerrinLDFLAGS=
765f1e34d9SAlexandre Perrin
77ca58f742SDaniel FojtLINT ?=		lint
78ca58f742SDaniel FojtLINTFLAGS ?=	-chapbx
795f1e34d9SAlexandre Perrin
80ca58f742SDaniel FojtPC ?=		pc
815f1e34d9SAlexandre PerrinPFLAGS=
82ca58f742SDaniel FojtCOMPILE.p ?=	${PC} ${PFLAGS} ${CPPFLAGS} -c
83ca58f742SDaniel FojtLINK.p ?=		${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
845f1e34d9SAlexandre Perrin
855f1e34d9SAlexandre Perrin.if exists(/usr/local/bin/bison) || exists(/opt/gnu/bin/bison)
86ca58f742SDaniel FojtYACC ?=		bison -y
875f1e34d9SAlexandre Perrin.else
88ca58f742SDaniel FojtYACC ?=		yacc
895f1e34d9SAlexandre Perrin.endif
90ca58f742SDaniel FojtYFLAGS ?=		-d
91ca58f742SDaniel FojtYACC.y ?=		${YACC} ${YFLAGS}
925f1e34d9SAlexandre Perrin
935f1e34d9SAlexandre Perrin# C
945f1e34d9SAlexandre Perrin.c:
955f1e34d9SAlexandre Perrin	${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
965f1e34d9SAlexandre Perrin.c.o:
975f1e34d9SAlexandre Perrin	${COMPILE.c} ${.IMPSRC}
985f1e34d9SAlexandre Perrin.c.a:
995f1e34d9SAlexandre Perrin	${COMPILE.c} ${.IMPSRC}
1005f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1015f1e34d9SAlexandre Perrin	rm -f $*.o
1025f1e34d9SAlexandre Perrin
1035f1e34d9SAlexandre Perrin# C++
104f445c897SJohn Marino${CXX_SUFFIXES}:
1055f1e34d9SAlexandre Perrin	${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
106f445c897SJohn Marino${CXX_SUFFIXES:%=%.o}:
1075f1e34d9SAlexandre Perrin	${COMPILE.cc} ${.IMPSRC}
108f445c897SJohn Marino${CXX_SUFFIXES:%=%.a}:
1095f1e34d9SAlexandre Perrin	${COMPILE.cc} ${.IMPSRC}
1105f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1115f1e34d9SAlexandre Perrin	rm -f $*.o
1125f1e34d9SAlexandre Perrin
1135f1e34d9SAlexandre Perrin# Fortran/Ratfor
1145f1e34d9SAlexandre Perrin.f:
1155f1e34d9SAlexandre Perrin	${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1165f1e34d9SAlexandre Perrin.f.o:
1175f1e34d9SAlexandre Perrin	${COMPILE.f} ${.IMPSRC}
1185f1e34d9SAlexandre Perrin.f.a:
1195f1e34d9SAlexandre Perrin	${COMPILE.f} ${.IMPSRC}
1205f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1215f1e34d9SAlexandre Perrin	rm -f $*.o
1225f1e34d9SAlexandre Perrin
1235f1e34d9SAlexandre Perrin.F:
1245f1e34d9SAlexandre Perrin	${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1255f1e34d9SAlexandre Perrin.F.o:
1265f1e34d9SAlexandre Perrin	${COMPILE.F} ${.IMPSRC}
1275f1e34d9SAlexandre Perrin.F.a:
1285f1e34d9SAlexandre Perrin	${COMPILE.F} ${.IMPSRC}
1295f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1305f1e34d9SAlexandre Perrin	rm -f $*.o
1315f1e34d9SAlexandre Perrin
1325f1e34d9SAlexandre Perrin.r:
1335f1e34d9SAlexandre Perrin	${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1345f1e34d9SAlexandre Perrin.r.o:
1355f1e34d9SAlexandre Perrin	${COMPILE.r} ${.IMPSRC}
1365f1e34d9SAlexandre Perrin.r.a:
1375f1e34d9SAlexandre Perrin	${COMPILE.r} ${.IMPSRC}
1385f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1395f1e34d9SAlexandre Perrin	rm -f $*.o
1405f1e34d9SAlexandre Perrin
1415f1e34d9SAlexandre Perrin# Pascal
1425f1e34d9SAlexandre Perrin.p:
1435f1e34d9SAlexandre Perrin	${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1445f1e34d9SAlexandre Perrin.p.o:
1455f1e34d9SAlexandre Perrin	${COMPILE.p} ${.IMPSRC}
1465f1e34d9SAlexandre Perrin.p.a:
1475f1e34d9SAlexandre Perrin	${COMPILE.p} ${.IMPSRC}
1485f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1495f1e34d9SAlexandre Perrin	rm -f $*.o
1505f1e34d9SAlexandre Perrin
1515f1e34d9SAlexandre Perrin# Assembly
1525f1e34d9SAlexandre Perrin.s:
1535f1e34d9SAlexandre Perrin	${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1545f1e34d9SAlexandre Perrin.s.o:
1555f1e34d9SAlexandre Perrin	${COMPILE.s} ${.IMPSRC}
1565f1e34d9SAlexandre Perrin.s.a:
1575f1e34d9SAlexandre Perrin	${COMPILE.s} ${.IMPSRC}
1585f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1595f1e34d9SAlexandre Perrin	rm -f $*.o
1605f1e34d9SAlexandre Perrin.S:
1615f1e34d9SAlexandre Perrin	${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
1625f1e34d9SAlexandre Perrin.S.o:
1635f1e34d9SAlexandre Perrin	${COMPILE.S} ${.IMPSRC}
1645f1e34d9SAlexandre Perrin.S.a:
1655f1e34d9SAlexandre Perrin	${COMPILE.S} ${.IMPSRC}
1665f1e34d9SAlexandre Perrin	${AR} ${ARFLAGS} $@ $*.o
1675f1e34d9SAlexandre Perrin	rm -f $*.o
1685f1e34d9SAlexandre Perrin
1695f1e34d9SAlexandre Perrin# Lex
1705f1e34d9SAlexandre Perrin.l:
1715f1e34d9SAlexandre Perrin	${LEX.l} ${.IMPSRC}
1725f1e34d9SAlexandre Perrin	${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
1735f1e34d9SAlexandre Perrin	rm -f lex.yy.c
1745f1e34d9SAlexandre Perrin.l.c:
1755f1e34d9SAlexandre Perrin	${LEX.l} ${.IMPSRC}
1765f1e34d9SAlexandre Perrin	mv lex.yy.c ${.TARGET}
1775f1e34d9SAlexandre Perrin.l.o:
1785f1e34d9SAlexandre Perrin	${LEX.l} ${.IMPSRC}
1795f1e34d9SAlexandre Perrin	${COMPILE.c} -o ${.TARGET} lex.yy.c
1805f1e34d9SAlexandre Perrin	rm -f lex.yy.c
1815f1e34d9SAlexandre Perrin
1825f1e34d9SAlexandre Perrin# Yacc
1835f1e34d9SAlexandre Perrin.y:
1845f1e34d9SAlexandre Perrin	${YACC.y} ${.IMPSRC}
1855f1e34d9SAlexandre Perrin	${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
1865f1e34d9SAlexandre Perrin	rm -f y.tab.c
1875f1e34d9SAlexandre Perrin.y.c:
1885f1e34d9SAlexandre Perrin	${YACC.y} ${.IMPSRC}
1895f1e34d9SAlexandre Perrin	mv y.tab.c ${.TARGET}
1905f1e34d9SAlexandre Perrin.y.o:
1915f1e34d9SAlexandre Perrin	${YACC.y} ${.IMPSRC}
1925f1e34d9SAlexandre Perrin	${COMPILE.c} -o ${.TARGET} y.tab.c
1935f1e34d9SAlexandre Perrin	rm -f y.tab.c
1945f1e34d9SAlexandre Perrin
1955f1e34d9SAlexandre Perrin# Shell
1965f1e34d9SAlexandre Perrin.sh:
1975f1e34d9SAlexandre Perrin	rm -f ${.TARGET}
1985f1e34d9SAlexandre Perrin	cp ${.IMPSRC} ${.TARGET}
199*6eef5f0cSAntonio Huete Jimenez	chmod a+x ${.TARGET}
200