1*3cbdda60SSimon J. Gerraty# $Id: README,v 1.1 1997/03/11 07:27:15 sjg Exp $ 2*3cbdda60SSimon J. Gerraty 3*3cbdda60SSimon J. GerratyThis directory contains some macro's derrived from the NetBSD bsd.*.mk 4*3cbdda60SSimon J. Gerratymacros. They have the same names but without the bsd., separate macro 5*3cbdda60SSimon J. Gerratyfiles are needed to ensure we can make them do what we want for 6*3cbdda60SSimon J. Gerratybuiling things outside of /usr/src. Nearly all the comments below 7*3cbdda60SSimon J. Gerratyapply. 8*3cbdda60SSimon J. Gerraty 9*3cbdda60SSimon J. Gerraty# $NetBSD: bsd.README,v 1.18 1997/01/13 00:54:23 mark Exp $ 10*3cbdda60SSimon J. Gerraty# @(#)bsd.README 5.1 (Berkeley) 5/11/90 11*3cbdda60SSimon J. Gerraty 12*3cbdda60SSimon J. GerratyThis is the README file for the new make "include" files for the BSD 13*3cbdda60SSimon J. Gerratysource tree. The files are installed in /usr/share/mk, and are, by 14*3cbdda60SSimon J. Gerratyconvention, named with the suffix ".mk". 15*3cbdda60SSimon J. Gerraty 16*3cbdda60SSimon J. GerratyNote, this file is not intended to replace reading through the .mk 17*3cbdda60SSimon J. Gerratyfiles for anything tricky. 18*3cbdda60SSimon J. Gerraty 19*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 20*3cbdda60SSimon J. Gerraty 21*3cbdda60SSimon J. GerratyRANDOM THINGS WORTH KNOWING: 22*3cbdda60SSimon J. Gerraty 23*3cbdda60SSimon J. GerratyThe files are simply C-style #include files, and pretty much behave like 24*3cbdda60SSimon J. Gerratyyou'd expect. The syntax is slightly different in that a single '.' is 25*3cbdda60SSimon J. Gerratyused instead of the hash mark, i.e. ".include <bsd.prog.mk>". 26*3cbdda60SSimon J. Gerraty 27*3cbdda60SSimon J. GerratyOne difference that will save you lots of debugging time is that inclusion 28*3cbdda60SSimon J. Gerratyof the file is normally done at the *end* of the Makefile. The reason for 29*3cbdda60SSimon J. Gerratythis is because .mk files often modify variables and behavior based on the 30*3cbdda60SSimon J. Gerratyvalues of variables set in the Makefile. To make this work, remember that 31*3cbdda60SSimon J. Gerratythe FIRST target found is the target that is used, i.e. if the Makefile has: 32*3cbdda60SSimon J. Gerraty 33*3cbdda60SSimon J. Gerraty a: 34*3cbdda60SSimon J. Gerraty echo a 35*3cbdda60SSimon J. Gerraty a: 36*3cbdda60SSimon J. Gerraty echo a number two 37*3cbdda60SSimon J. Gerraty 38*3cbdda60SSimon J. Gerratythe command "make a" will echo "a". To make things confusing, the SECOND 39*3cbdda60SSimon J. Gerratyvariable assignment is the overriding one, i.e. if the Makefile has: 40*3cbdda60SSimon J. Gerraty 41*3cbdda60SSimon J. Gerraty a= foo 42*3cbdda60SSimon J. Gerraty a= bar 43*3cbdda60SSimon J. Gerraty 44*3cbdda60SSimon J. Gerraty b: 45*3cbdda60SSimon J. Gerraty echo ${a} 46*3cbdda60SSimon J. Gerraty 47*3cbdda60SSimon J. Gerratythe command "make b" will echo "bar". This is for compatibility with the 48*3cbdda60SSimon J. Gerratyway the V7 make behaved. 49*3cbdda60SSimon J. Gerraty 50*3cbdda60SSimon J. GerratyIt's fairly difficult to make the BSD .mk files work when you're building 51*3cbdda60SSimon J. Gerratymultiple programs in a single directory. It's a lot easier split up the 52*3cbdda60SSimon J. Gerratyprograms than to deal with the problem. Most of the agony comes from making 53*3cbdda60SSimon J. Gerratythe "obj" directory stuff work right, not because we switch to a new version 54*3cbdda60SSimon J. Gerratyof make. So, don't get mad at us, figure out a better way to handle multiple 55*3cbdda60SSimon J. Gerratyarchitectures so we can quit using the symbolic link stuff. (Imake doesn't 56*3cbdda60SSimon J. Gerratycount.) 57*3cbdda60SSimon J. Gerraty 58*3cbdda60SSimon J. GerratyThe file .depend in the source directory is expected to contain dependencies 59*3cbdda60SSimon J. Gerratyfor the source files. This file is read automatically by make after reading 60*3cbdda60SSimon J. Gerratythe Makefile. 61*3cbdda60SSimon J. Gerraty 62*3cbdda60SSimon J. GerratyThe variable DESTDIR works as before. It's not set anywhere but will change 63*3cbdda60SSimon J. Gerratythe tree where the file gets installed. 64*3cbdda60SSimon J. Gerraty 65*3cbdda60SSimon J. GerratyThe profiled libraries are no longer built in a different directory than 66*3cbdda60SSimon J. Gerratythe regular libraries. A new suffix, ".po", is used to denote a profiled 67*3cbdda60SSimon J. Gerratyobject. 68*3cbdda60SSimon J. Gerraty 69*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 70*3cbdda60SSimon J. Gerraty 71*3cbdda60SSimon J. GerratyThe include file <sys.mk> has the default rules for all makes, in the BSD 72*3cbdda60SSimon J. Gerratyenvironment or otherwise. You probably don't want to touch this file. 73*3cbdda60SSimon J. Gerraty 74*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 75*3cbdda60SSimon J. Gerraty 76*3cbdda60SSimon J. GerratyThe include file <bsd.man.mk> handles installing manual pages and their 77*3cbdda60SSimon J. Gerratylinks. 78*3cbdda60SSimon J. Gerraty 79*3cbdda60SSimon J. GerratyIt has a single target: 80*3cbdda60SSimon J. Gerraty 81*3cbdda60SSimon J. Gerraty maninstall: 82*3cbdda60SSimon J. Gerraty Install the manual pages and their links. 83*3cbdda60SSimon J. Gerraty 84*3cbdda60SSimon J. GerratyIt sets/uses the following variables: 85*3cbdda60SSimon J. Gerraty 86*3cbdda60SSimon J. GerratyMANDIR Base path for manual installation. 87*3cbdda60SSimon J. Gerraty 88*3cbdda60SSimon J. GerratyMANGRP Manual group. 89*3cbdda60SSimon J. Gerraty 90*3cbdda60SSimon J. GerratyMANOWN Manual owner. 91*3cbdda60SSimon J. Gerraty 92*3cbdda60SSimon J. GerratyMANMODE Manual mode. 93*3cbdda60SSimon J. Gerraty 94*3cbdda60SSimon J. GerratyMANSUBDIR Subdirectory under the manual page section, i.e. "/vax" 95*3cbdda60SSimon J. Gerraty or "/tahoe" for machine specific manual pages. 96*3cbdda60SSimon J. Gerraty 97*3cbdda60SSimon J. GerratyMAN The manual pages to be installed (use a .1 - .9 suffix). 98*3cbdda60SSimon J. Gerraty 99*3cbdda60SSimon J. GerratyMLINKS List of manual page links (using a .1 - .9 suffix). The 100*3cbdda60SSimon J. Gerraty linked-to file must come first, the linked file second, 101*3cbdda60SSimon J. Gerraty and there may be multiple pairs. The files are soft-linked. 102*3cbdda60SSimon J. Gerraty 103*3cbdda60SSimon J. GerratyThe include file <bsd.man.mk> includes a file named "../Makefile.inc" if 104*3cbdda60SSimon J. Gerratyit exists. 105*3cbdda60SSimon J. Gerraty 106*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 107*3cbdda60SSimon J. Gerraty 108*3cbdda60SSimon J. GerratyThe include file <bsd.own.mk> contains source tree configuration parameters, 109*3cbdda60SSimon J. Gerratysuch as the owners, groups, etc. for both manual pages and binaries, and 110*3cbdda60SSimon J. Gerratya few global "feature configuration" parameters. 111*3cbdda60SSimon J. Gerraty 112*3cbdda60SSimon J. GerratyIt has no targets. 113*3cbdda60SSimon J. Gerraty 114*3cbdda60SSimon J. GerratyTo get system-specific configuration parameters, bsd.own.mk will try to 115*3cbdda60SSimon J. Gerratyinclude the file specified by the "MAKECONF" variable. If MAKECONF is not 116*3cbdda60SSimon J. Gerratyset, or no such file exists, the system make configuration file, /etc/mk.conf 117*3cbdda60SSimon J. Gerratyis included. These files may define any of the variables described below. 118*3cbdda60SSimon J. Gerraty 119*3cbdda60SSimon J. Gerratybsd.own.mk sets the following variables, if they are not already defined 120*3cbdda60SSimon J. Gerraty(defaults are in brackets): 121*3cbdda60SSimon J. Gerraty 122*3cbdda60SSimon J. GerratyBSDSRCDIR The real path to the system sources, so that 'make obj' 123*3cbdda60SSimon J. Gerraty will work correctly. [/usr/src] 124*3cbdda60SSimon J. Gerraty 125*3cbdda60SSimon J. GerratyBSDOBJDIR The real path to the system 'obj' tree, so that 'make obj' 126*3cbdda60SSimon J. Gerraty will work correctly. [/usr/obj] 127*3cbdda60SSimon J. Gerraty 128*3cbdda60SSimon J. GerratyBINGRP Binary group. [bin] 129*3cbdda60SSimon J. Gerraty 130*3cbdda60SSimon J. GerratyBINOWN Binary owner. [bin] 131*3cbdda60SSimon J. Gerraty 132*3cbdda60SSimon J. GerratyBINMODE Binary mode. [555] 133*3cbdda60SSimon J. Gerraty 134*3cbdda60SSimon J. GerratyNONBINMODE Mode for non-executable files. [444] 135*3cbdda60SSimon J. Gerraty 136*3cbdda60SSimon J. GerratyMANDIR Base path for manual installation. [/usr/share/man/cat] 137*3cbdda60SSimon J. Gerraty 138*3cbdda60SSimon J. GerratyMANGRP Manual group. [bin] 139*3cbdda60SSimon J. Gerraty 140*3cbdda60SSimon J. GerratyMANOWN Manual owner. [bin] 141*3cbdda60SSimon J. Gerraty 142*3cbdda60SSimon J. GerratyMANMODE Manual mode. [${NONBINMODE}] 143*3cbdda60SSimon J. Gerraty 144*3cbdda60SSimon J. GerratyLIBDIR Base path for library installation. [/usr/lib] 145*3cbdda60SSimon J. Gerraty 146*3cbdda60SSimon J. GerratyLINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint] 147*3cbdda60SSimon J. Gerraty 148*3cbdda60SSimon J. GerratyLIBGRP Library group. [${BINGRP}] 149*3cbdda60SSimon J. Gerraty 150*3cbdda60SSimon J. GerratyLIBOWN Library owner. [${BINOWN}] 151*3cbdda60SSimon J. Gerraty 152*3cbdda60SSimon J. GerratyLIBMODE Library mode. [${NONBINMODE}] 153*3cbdda60SSimon J. Gerraty 154*3cbdda60SSimon J. GerratyDOCDIR Base path for system documentation (e.g. PSD, USD, etc.) 155*3cbdda60SSimon J. Gerraty installation. [/usr/share/doc] 156*3cbdda60SSimon J. Gerraty 157*3cbdda60SSimon J. GerratyDOCGRP Documentation group. [bin] 158*3cbdda60SSimon J. Gerraty 159*3cbdda60SSimon J. GerratyDOCOWN Documentation owner. [bin] 160*3cbdda60SSimon J. Gerraty 161*3cbdda60SSimon J. GerratyDOCMODE Documentation mode. [${NONBINMODE}] 162*3cbdda60SSimon J. Gerraty 163*3cbdda60SSimon J. GerratyNLSDIR Base path for National Language Support files installation. 164*3cbdda60SSimon J. Gerraty [/usr/share/nls] 165*3cbdda60SSimon J. Gerraty 166*3cbdda60SSimon J. GerratyNLSGRP National Language Support files group. [bin] 167*3cbdda60SSimon J. Gerraty 168*3cbdda60SSimon J. GerratyNLSOWN National Language Support files owner. [bin] 169*3cbdda60SSimon J. Gerraty 170*3cbdda60SSimon J. GerratyNLSMODE National Language Support files mode. [${NONBINMODE}] 171*3cbdda60SSimon J. Gerraty 172*3cbdda60SSimon J. GerratySTRIP The flag passed to the install program to cause the binary 173*3cbdda60SSimon J. Gerraty to be stripped. This is to be used when building your 174*3cbdda60SSimon J. Gerraty own install script so that the entire system can be made 175*3cbdda60SSimon J. Gerraty stripped/not-stripped using a single knob. [-s] 176*3cbdda60SSimon J. Gerraty 177*3cbdda60SSimon J. GerratyCOPY The flag passed to the install program to cause the binary 178*3cbdda60SSimon J. Gerraty to be copied rather than moved. This is to be used when 179*3cbdda60SSimon J. Gerraty building our own install script so that the entire system 180*3cbdda60SSimon J. Gerraty can either be installed with copies, or with moves using 181*3cbdda60SSimon J. Gerraty a single knob. [-c] 182*3cbdda60SSimon J. Gerraty 183*3cbdda60SSimon J. GerratyAdditionally, the following variables may be set by bsd.own.mk or in a 184*3cbdda60SSimon J. Gerratymake configuration file to modify the behaviour of the system build 185*3cbdda60SSimon J. Gerratyprocess (default values are in brackets along with comments, if set by 186*3cbdda60SSimon J. Gerratybsd.own.mk): 187*3cbdda60SSimon J. Gerraty 188*3cbdda60SSimon J. GerratyEXPORTABLE_SYSTEM 189*3cbdda60SSimon J. Gerraty Do not build /usr/src/domestic, even if it is present. 190*3cbdda60SSimon J. Gerraty 191*3cbdda60SSimon J. GerratySKEY Compile in support for S/key authentication. [yes, set 192*3cbdda60SSimon J. Gerraty unconditionally] 193*3cbdda60SSimon J. Gerraty 194*3cbdda60SSimon J. GerratyKERBEROS Compile in support for Kerberos 4 authentication. 195*3cbdda60SSimon J. Gerraty 196*3cbdda60SSimon J. GerratyKERBEROS5 Compile in support for Kerberos 5 authentication. 197*3cbdda60SSimon J. Gerraty 198*3cbdda60SSimon J. GerratyMANZ Compress manual pages at installation time. 199*3cbdda60SSimon J. Gerraty 200*3cbdda60SSimon J. GerratySYS_INCLUDE Copy or symlink kernel include files into /usr/include. 201*3cbdda60SSimon J. Gerraty Possible values are "symlinks" or "copies" (which is 202*3cbdda60SSimon J. Gerraty the same as the variable being unset). 203*3cbdda60SSimon J. Gerraty 204*3cbdda60SSimon J. GerratyNOPROFILE Do not build profiled versions of system libraries 205*3cbdda60SSimon J. Gerraty 206*3cbdda60SSimon J. GerratyNOPIC Do not build PIC versions of system libraries, and 207*3cbdda60SSimon J. Gerraty do not build shared libraries. [set if ${MACHINE_ARCH} 208*3cbdda60SSimon J. Gerraty is "mips", "vax", "alpha" or "arm32", unset otherwise.] 209*3cbdda60SSimon J. Gerraty 210*3cbdda60SSimon J. GerratyNOLINT Do not build lint libraries. [set, set unconditionally] 211*3cbdda60SSimon J. Gerraty 212*3cbdda60SSimon J. Gerratybsd.own.mk is generally useful when building your own Makefiles so that 213*3cbdda60SSimon J. Gerratythey use the same default owners etc. as the rest of the tree. 214*3cbdda60SSimon J. Gerraty 215*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 216*3cbdda60SSimon J. Gerraty 217*3cbdda60SSimon J. GerratyThe include file <bsd.prog.mk> handles building programs from one or 218*3cbdda60SSimon J. Gerratymore source files, along with their manual pages. It has a limited number 219*3cbdda60SSimon J. Gerratyof suffixes, consistent with the current needs of the BSD tree. 220*3cbdda60SSimon J. Gerraty 221*3cbdda60SSimon J. GerratyIt has eight targets: 222*3cbdda60SSimon J. Gerraty 223*3cbdda60SSimon J. Gerraty all: 224*3cbdda60SSimon J. Gerraty build the program and its manual page 225*3cbdda60SSimon J. Gerraty clean: 226*3cbdda60SSimon J. Gerraty remove the program, any object files and the files a.out, 227*3cbdda60SSimon J. Gerraty Errs, errs, mklog, and core. 228*3cbdda60SSimon J. Gerraty cleandir: 229*3cbdda60SSimon J. Gerraty remove all of the files removed by the target clean, as 230*3cbdda60SSimon J. Gerraty well as .depend, tags, and any manual pages. 231*3cbdda60SSimon J. Gerraty depend: 232*3cbdda60SSimon J. Gerraty make the dependencies for the source files, and store 233*3cbdda60SSimon J. Gerraty them in the file .depend. 234*3cbdda60SSimon J. Gerraty includes: 235*3cbdda60SSimon J. Gerraty install any header files. 236*3cbdda60SSimon J. Gerraty install: 237*3cbdda60SSimon J. Gerraty install the program and its manual pages; if the Makefile 238*3cbdda60SSimon J. Gerraty does not itself define the target install, the targets 239*3cbdda60SSimon J. Gerraty beforeinstall and afterinstall may also be used to cause 240*3cbdda60SSimon J. Gerraty actions immediately before and after the install target 241*3cbdda60SSimon J. Gerraty is executed. 242*3cbdda60SSimon J. Gerraty lint: 243*3cbdda60SSimon J. Gerraty run lint on the source files 244*3cbdda60SSimon J. Gerraty tags: 245*3cbdda60SSimon J. Gerraty create a tags file for the source files. 246*3cbdda60SSimon J. Gerraty 247*3cbdda60SSimon J. GerratyIt sets/uses the following variables: 248*3cbdda60SSimon J. Gerraty 249*3cbdda60SSimon J. GerratyBINGRP Binary group. 250*3cbdda60SSimon J. Gerraty 251*3cbdda60SSimon J. GerratyBINOWN Binary owner. 252*3cbdda60SSimon J. Gerraty 253*3cbdda60SSimon J. GerratyBINMODE Binary mode. 254*3cbdda60SSimon J. Gerraty 255*3cbdda60SSimon J. GerratyCLEANFILES Additional files to remove for the clean and cleandir targets. 256*3cbdda60SSimon J. Gerraty 257*3cbdda60SSimon J. GerratyCOPTS Additional flags to the compiler when creating C objects. 258*3cbdda60SSimon J. Gerraty 259*3cbdda60SSimon J. GerratyHIDEGAME If HIDEGAME is defined, the binary is installed in 260*3cbdda60SSimon J. Gerraty /usr/games/hide, and a symbolic link is created to 261*3cbdda60SSimon J. Gerraty /usr/games/dm. 262*3cbdda60SSimon J. Gerraty 263*3cbdda60SSimon J. GerratyLDADD Additional loader objects. Usually used for libraries. 264*3cbdda60SSimon J. Gerraty For example, to load with the compatibility and utility 265*3cbdda60SSimon J. Gerraty libraries, use: 266*3cbdda60SSimon J. Gerraty 267*3cbdda60SSimon J. Gerraty LDADD+=-lutil -lcompat 268*3cbdda60SSimon J. Gerraty 269*3cbdda60SSimon J. GerratyLDFLAGS Additional loader flags. 270*3cbdda60SSimon J. Gerraty 271*3cbdda60SSimon J. GerratyLINKS The list of binary links; should be full pathnames, the 272*3cbdda60SSimon J. Gerraty linked-to file coming first, followed by the linked 273*3cbdda60SSimon J. Gerraty file. The files are hard-linked. For example, to link 274*3cbdda60SSimon J. Gerraty /bin/test and /bin/[, use: 275*3cbdda60SSimon J. Gerraty 276*3cbdda60SSimon J. Gerraty LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[ 277*3cbdda60SSimon J. Gerraty 278*3cbdda60SSimon J. GerratyMAN Manual pages (should end in .1 - .9). If no MAN variable is 279*3cbdda60SSimon J. Gerraty defined, "MAN=${PROG}.1" is assumed. 280*3cbdda60SSimon J. Gerraty 281*3cbdda60SSimon J. GerratyPROG The name of the program to build. If not supplied, nothing 282*3cbdda60SSimon J. Gerraty is built. 283*3cbdda60SSimon J. Gerraty 284*3cbdda60SSimon J. GerratySRCS List of source files to build the program. If PROG is not 285*3cbdda60SSimon J. Gerraty defined, it's assumed to be ${PROG}.c. 286*3cbdda60SSimon J. Gerraty 287*3cbdda60SSimon J. GerratyDPADD Additional dependencies for the program. Usually used for 288*3cbdda60SSimon J. Gerraty libraries. For example, to depend on the compatibility and 289*3cbdda60SSimon J. Gerraty utility libraries use: 290*3cbdda60SSimon J. Gerraty 291*3cbdda60SSimon J. Gerraty DPADD+=${LIBCOMPAT} ${LIBUTIL} 292*3cbdda60SSimon J. Gerraty 293*3cbdda60SSimon J. Gerraty The following libraries are predefined for DPADD: 294*3cbdda60SSimon J. Gerraty 295*3cbdda60SSimon J. Gerraty LIBC /lib/libc.a 296*3cbdda60SSimon J. Gerraty LIBCOMPAT /usr/lib/libcompat.a 297*3cbdda60SSimon J. Gerraty LIBCRYPT /usr/lib/libcrypt.a 298*3cbdda60SSimon J. Gerraty LIBCURSES /usr/lib/libcurses.a 299*3cbdda60SSimon J. Gerraty LIBDBM /usr/lib/libdbm.a 300*3cbdda60SSimon J. Gerraty LIBDES /usr/lib/libdes.a 301*3cbdda60SSimon J. Gerraty LIBL /usr/lib/libl.a 302*3cbdda60SSimon J. Gerraty LIBKDB /usr/lib/libkdb.a 303*3cbdda60SSimon J. Gerraty LIBKRB /usr/lib/libkrb.a 304*3cbdda60SSimon J. Gerraty LIBKVM /usr/lib/libkvm.a 305*3cbdda60SSimon J. Gerraty LIBM /usr/lib/libm.a 306*3cbdda60SSimon J. Gerraty LIBMP /usr/lib/libmp.a 307*3cbdda60SSimon J. Gerraty LIBPC /usr/lib/libpc.a 308*3cbdda60SSimon J. Gerraty LIBPLOT /usr/lib/libplot.a 309*3cbdda60SSimon J. Gerraty LIBRPC /usr/lib/sunrpc.a 310*3cbdda60SSimon J. Gerraty LIBTERM /usr/lib/libterm.a 311*3cbdda60SSimon J. Gerraty LIBUTIL /usr/lib/libutil.a 312*3cbdda60SSimon J. Gerraty 313*3cbdda60SSimon J. GerratySHAREDSTRINGS If defined, a new .c.o rule is used that results in shared 314*3cbdda60SSimon J. Gerraty strings, using xstr(1). Note that this will not work with 315*3cbdda60SSimon J. Gerraty parallel makes. 316*3cbdda60SSimon J. Gerraty 317*3cbdda60SSimon J. GerratySTRIP The flag passed to the install program to cause the binary 318*3cbdda60SSimon J. Gerraty to be stripped. 319*3cbdda60SSimon J. Gerraty 320*3cbdda60SSimon J. GerratySUBDIR A list of subdirectories that should be built as well. 321*3cbdda60SSimon J. Gerraty Each of the targets will execute the same target in the 322*3cbdda60SSimon J. Gerraty subdirectories. 323*3cbdda60SSimon J. Gerraty 324*3cbdda60SSimon J. GerratyThe include file <bsd.prog.mk> includes the file named "../Makefile.inc" 325*3cbdda60SSimon J. Gerratyif it exists, as well as the include file <bsd.man.mk>. 326*3cbdda60SSimon J. Gerraty 327*3cbdda60SSimon J. GerratySome simple examples: 328*3cbdda60SSimon J. Gerraty 329*3cbdda60SSimon J. GerratyTo build foo from foo.c with a manual page foo.1, use: 330*3cbdda60SSimon J. Gerraty 331*3cbdda60SSimon J. Gerraty PROG= foo 332*3cbdda60SSimon J. Gerraty 333*3cbdda60SSimon J. Gerraty .include <bsd.prog.mk> 334*3cbdda60SSimon J. Gerraty 335*3cbdda60SSimon J. GerratyTo build foo from foo.c with a manual page foo.2, add the line: 336*3cbdda60SSimon J. Gerraty 337*3cbdda60SSimon J. Gerraty MAN= foo.2 338*3cbdda60SSimon J. Gerraty 339*3cbdda60SSimon J. GerratyIf foo does not have a manual page at all, add the line: 340*3cbdda60SSimon J. Gerraty 341*3cbdda60SSimon J. Gerraty NOMAN= noman 342*3cbdda60SSimon J. Gerraty 343*3cbdda60SSimon J. GerratyIf foo has multiple source files, add the line: 344*3cbdda60SSimon J. Gerraty 345*3cbdda60SSimon J. Gerraty SRCS= a.c b.c c.c d.c 346*3cbdda60SSimon J. Gerraty 347*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 348*3cbdda60SSimon J. Gerraty 349*3cbdda60SSimon J. GerratyThe include file <bsd.subdir.mk> contains the default targets for building 350*3cbdda60SSimon J. Gerratysubdirectories. It has the same eight targets as <bsd.prog.mk>: all, 351*3cbdda60SSimon J. Gerratyclean, cleandir, depend, includes, install, lint, and tags. For all of 352*3cbdda60SSimon J. Gerratythe directories listed in the variable SUBDIRS, the specified directory 353*3cbdda60SSimon J. Gerratywill be visited and the target made. There is also a default target which 354*3cbdda60SSimon J. Gerratyallows the command "make subdir" where subdir is any directory listed in 355*3cbdda60SSimon J. Gerratythe variable SUBDIRS. 356*3cbdda60SSimon J. Gerraty 357*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 358*3cbdda60SSimon J. Gerraty 359*3cbdda60SSimon J. GerratyThe include file <bsd.sys.mk> is used by <bsd.prog.mk> and 360*3cbdda60SSimon J. Gerraty<bsd.lib.mk>. It contains overrides that are used when building 361*3cbdda60SSimon J. Gerratythe NetBSD source tree. For instance, if "PARALLEL" is defined by 362*3cbdda60SSimon J. Gerratythe program/library Makefile, it includes a set of rules for lex and 363*3cbdda60SSimon J. Gerratyyacc that allow multiple lex and yacc targets to be built in parallel. 364*3cbdda60SSimon J. Gerraty 365*3cbdda60SSimon J. Gerraty=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 366*3cbdda60SSimon J. Gerraty 367*3cbdda60SSimon J. GerratyThe include file <bsd.lib.mk> has support for building libraries. It has 368*3cbdda60SSimon J. Gerratythe same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, 369*3cbdda60SSimon J. Gerratyincludes, install, lint, and tags. It has a limited number of suffixes, 370*3cbdda60SSimon J. Gerratyconsistent with the current needs of the BSD tree. 371*3cbdda60SSimon J. Gerraty 372*3cbdda60SSimon J. GerratyIt sets/uses the following variables: 373*3cbdda60SSimon J. Gerraty 374*3cbdda60SSimon J. GerratyLIB The name of the library to build. 375*3cbdda60SSimon J. Gerraty 376*3cbdda60SSimon J. GerratyLIBDIR Target directory for libraries. 377*3cbdda60SSimon J. Gerraty 378*3cbdda60SSimon J. GerratyLINTLIBDIR Target directory for lint libraries. 379*3cbdda60SSimon J. Gerraty 380*3cbdda60SSimon J. GerratyLIBGRP Library group. 381*3cbdda60SSimon J. Gerraty 382*3cbdda60SSimon J. GerratyLIBOWN Library owner. 383*3cbdda60SSimon J. Gerraty 384*3cbdda60SSimon J. GerratyLIBMODE Library mode. 385*3cbdda60SSimon J. Gerraty 386*3cbdda60SSimon J. GerratyLDADD Additional loader objects. 387*3cbdda60SSimon J. Gerraty 388*3cbdda60SSimon J. GerratyMAN The manual pages to be installed (use a .1 - .9 suffix). 389*3cbdda60SSimon J. Gerraty 390*3cbdda60SSimon J. GerratySRCS List of source files to build the library. Suffix types 391*3cbdda60SSimon J. Gerraty .s, .c, and .f are supported. Note, .s files are preferred 392*3cbdda60SSimon J. Gerraty to .c files of the same name. (This is not the default for 393*3cbdda60SSimon J. Gerraty versions of make.) 394*3cbdda60SSimon J. Gerraty 395*3cbdda60SSimon J. GerratyThe include file <bsd.lib.mk> includes the file named "../Makefile.inc" 396*3cbdda60SSimon J. Gerratyif it exists, as well as the include file <bsd.man.mk>. 397*3cbdda60SSimon J. Gerraty 398*3cbdda60SSimon J. GerratyIt has rules for building profiled objects; profiled libraries are 399*3cbdda60SSimon J. Gerratybuilt by default. 400*3cbdda60SSimon J. Gerraty 401*3cbdda60SSimon J. GerratyLibraries are ranlib'd when made. 402