Index: head/games/atc/Makefile =================================================================== --- head/games/atc/Makefile (revision 2675) +++ head/games/atc/Makefile (revision 2676) @@ -1,18 +1,18 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= atc CFLAGS+=-DBSD -I${.CURDIR} -I. SRCS= extern.c grammar.c graphics.c input.c lex.c list.c log.c \ main.c tunable.c update.c MAN6= atc.6 -DPADD= ${usr/lib/libl.a ${LIBM} ${LIBTERM} ${LIBCURSES} ${LIBCOMPAT} +DPADD= ${usr/lib/libl.a ${LIBM} ${LIBTERMCAP} ${LIBCURSES} ${LIBCOMPAT} LDADD= -ll -lm -lcurses -ltermcap -lcompat GAMES= ATC_scores Game_List Killer crossover default easy game_2 CLEANFILES=grammar.c y.tab.h lex.c HIDEGAME=hidegame beforeinstall: (cd ${.CURDIR}/games; install -c -o ${BINOWN} -g ${BINGRP} -m 400 \ ${GAMES} ${DESTDIR}/usr/share/games/atc) .include Index: head/games/backgammon/backgammon/Makefile =================================================================== --- head/games/backgammon/backgammon/Makefile (revision 2675) +++ head/games/backgammon/backgammon/Makefile (revision 2676) @@ -1,14 +1,14 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= backgammon CFLAGS+=-DV7 -I${.CURDIR}/../common_source SRCS= allow.c board.c check.c extra.c fancy.c init.c main.c move.c \ odds.c one.c save.c subs.c table.c text.c version.c MAN6= backgammon.6 -DPADD= ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ltermcap -lcompat .PATH: ${.CURDIR}/../common_source HIDEGAME=hidegame .include "../../Makefile.inc" .include Index: head/games/backgammon/teachgammon/Makefile =================================================================== --- head/games/backgammon/teachgammon/Makefile (revision 2675) +++ head/games/backgammon/teachgammon/Makefile (revision 2676) @@ -1,15 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= teachgammon CFLAGS+=-DV7 -I${.CURDIR}/../common_source SRCS= allow.c board.c check.c data.c fancy.c init.c odds.c one.c save.c \ subs.c table.c teach.c ttext1.c ttext2.c tutor.c -DPADD= ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ltermcap -lcompat HIDEGAME=hidegame NOMAN= noman .PATH: ${.CURDIR}/../common_source .include "../../Makefile.inc" .include Index: head/games/battlestar/Makefile =================================================================== --- head/games/battlestar/Makefile (revision 2675) +++ head/games/battlestar/Makefile (revision 2676) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= battlestar SRCS= battlestar.c com1.c com2.c com3.c com4.c com5.c com6.c com7.c \ init.c cypher.c getcom.c parse.c room.c save.c fly.c misc.c \ globals.c dayfile.c nightfile.c dayobjs.c nightobjs.c words.c MAN6= battlestar.6 DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame .include Index: head/games/canfield/canfield/Makefile =================================================================== --- head/games/canfield/canfield/Makefile (revision 2675) +++ head/games/canfield/canfield/Makefile (revision 2676) @@ -1,11 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= canfield MAN6= canfield.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame .include "../../Makefile.inc" .include Index: head/games/cribbage/Makefile =================================================================== --- head/games/cribbage/Makefile (revision 2675) +++ head/games/cribbage/Makefile (revision 2676) @@ -1,14 +1,14 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= cribbage -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat SRCS= extern.c crib.c cards.c instr.c io.c score.c support.c MAN6= cribbage.6 HIDEGAME=hidegame beforeinstall: install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/cribbage.n \ ${DESTDIR}/usr/share/games/cribbage.instr .include Index: head/games/hack/Makefile =================================================================== --- head/games/hack/Makefile (revision 2675) +++ head/games/hack/Makefile (revision 2676) @@ -1,35 +1,35 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= hack SRCS= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \ hack.do.c hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c \ hack.end.c hack.engrave.c hack.fight.c hack.invent.c hack.ioctl.c \ hack.lev.c hack.main.c hack.makemon.c hack.mhitu.c hack.mklev.c \ hack.mkmaze.c hack.mkobj.c hack.mkshop.c hack.mon.c hack.monst.c \ hack.o_init.c hack.objnam.c hack.options.c hack.pager.c hack.potion.c \ hack.pri.c hack.read.c hack.rip.c hack.rumors.c hack.save.c \ hack.search.c hack.shk.c hack.shknam.c hack.steal.c hack.termcap.c \ hack.timeout.c hack.topl.c hack.track.c hack.trap.c hack.tty.c \ hack.u_init.c hack.unix.c hack.vault.c hack.version.c hack.wield.c \ hack.wizard.c hack.worm.c hack.worn.c hack.zap.c rnd.c MAN6= hack.6 -DPADD= ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ltermcap -lcompat HIDEGAME=hidegame hack.onames.h: makedefs def.objects.h makedefs ${.CURDIR}/def.objects.h > hack.onames.h makedefs: makedefs.c ${CC} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${.PREFIX}.c beforeinstall: install -c -o ${BINOWN} -g ${BINGRP} -m 666 /dev/null \ ${DESTDIR}/var/games/hackdir/perm install -c -o ${BINOWN} -g ${BINGRP} -m 666 /dev/null \ ${DESTDIR}/var/games/hackdir/record install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/help \ ${.CURDIR}/hh ${.CURDIR}/data ${DESTDIR}/var/games/hackdir rm -f ${DESTDIR}/var/games/hackdir/bones* .include Index: head/games/hangman/Makefile =================================================================== --- head/games/hangman/Makefile (revision 2675) +++ head/games/hangman/Makefile (revision 2676) @@ -1,13 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= hangman SRCS= endgame.c extern.c getguess.c getword.c main.c playgame.c \ prdata.c prman.c prword.c setup.c MAN6= hangman.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame .include Index: head/games/larn/Makefile =================================================================== --- head/games/larn/Makefile (revision 2675) +++ head/games/larn/Makefile (revision 2676) @@ -1,69 +1,69 @@ # @(#)Makefile 5.12 (Berkeley) 5/30/93 # EXTRA # Incorporates code to gather additional performance statistics # SYSV # Use system III/V (instead of V7) type ioctl calls # BSD # Use BSD specific features (mostly timer and signal stuff) # BSD4.1 # Use BSD4.1 to avoid some 4.2 dependencies (must be used with # BSD above; do not mix with SYSV) # HIDEBYLINK # If defined, the program attempts to hide from ps # DOCHECKPOINTS # If not defined, checkpoint files are periodically written by the # larn process (no forking) if enabled in the .larnopts description # file. Checkpointing is handy on an unreliable system, but takes # CPU. Inclusion of DOCHECKPOINTS will cause fork()ing to perform the # checkpoints (again if enabled in the .larnopts file). This usually # avoids pauses in larn while the checkpointing is being done (on # large machines). # VER # This is the version of the software, example: 12 # SUBVER # This is the revision of the software, example: 1 # FLUSHNO=# # Set the input queue excess flushing threshold (default 5) # NOVARARGS # Define for systems that don't have varargs (a default varargs will # be used). # MACRORND # Define to use macro version of rnd() and rund() (fast and big) # UIDSCORE # Define to use user id's to manage scoreboard. Leaving this out will # cause player id's from the file ".playerids" to be used instead. # (.playerids is created upon demand). Only one entry per id # is # allowed in each scoreboard (winning & non-winning). # VT100 # Compile for using vt100 family of terminals. Omission of this # define will cause larn to use termcap, but it will be MUCH slower # due to an extra layer of output interpretation. Also, only VT100 # mode allows 2 different standout modes, inverse video, and bold video. # And only in VT100 mode is the scrolling region of the terminal used # (much nicer than insert/delete line sequences to simulate it, if # VT100 is omitted). # NONAP # This causes napms() to return immediately instead of delaying n # milliseconds. This define may be needed on some systems if the nap # stuff does not work correctly (possible hang). nap() is primarilly # used to delay for effect when casting missile type spells. # NOLOG # Turn off logging. PROG= larn MAN6= larn.6 CFLAGS+=-DBSD -DVER=12 -DSUBVER=0 -DNONAP -DUIDSCORE -fwritable-strings SRCS= main.c object.c create.c tok.c display.c global.c data.c io.c \ monster.c store.c diag.c help.c config.c nap.c bill.c scores.c \ signal.c moreobj.c movem.c regen.c fortune.c savelev.c -DPADD= ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ltermcap -lcompat HIDEGAME=hidegame beforeinstall: (cd ${.CURDIR}/datfiles; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ larnmaze larnopts larn.help \ ${DESTDIR}/usr/share/games/larn) .include Index: head/games/mille/Makefile =================================================================== --- head/games/mille/Makefile (revision 2675) +++ head/games/mille/Makefile (revision 2676) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= mille SRCS= comp.c end.c extern.c init.c mille.c misc.c move.c print.c \ roll.c save.c types.c varpush.c -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat MAN6= mille.6 HIDEGAME=hidegame .include Index: head/games/phantasia/Makefile =================================================================== --- head/games/phantasia/Makefile (revision 2675) +++ head/games/phantasia/Makefile (revision 2676) @@ -1,30 +1,30 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= phantasia SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c -DPADD= ${LIBM} ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lm -lcurses -ltermlib -lcompat +DPADD= ${LIBM} ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lm -lcurses -ltermcap -lcompat HIDEGAME=hidegame MAN6= phantasia.6 CLEANFILES+=map setup setup.o all: setup phantasia ${MAN6} setup: phantglobs.o setup.o monsters.asc ${LIBM} ${CC} phantglobs.o setup.o -o ${.TARGET} -lm beforeinstall: ./setup -m ${.CURDIR}/monsters.asc chown games.bin ${DESTDIR}/var/games/phantasia/* # Make Phantasia map. Change the map commands reflect your installation. # PLOTDEVICE is used for plotting the map. Change as appropriate. map: map.c ${CC} -O ${.CURDIR}/map.c -lplot -o ${.TARGET} ./map | plot > /dev/tty phantasia.0: phantasia.6 tbl ${.CURDIR}/phantasia.6 | nroff -man > ${.TARGET} .include Index: head/games/rain/Makefile =================================================================== --- head/games/rain/Makefile (revision 2675) +++ head/games/rain/Makefile (revision 2676) @@ -1,8 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= rain MAN6= rain.6 -DPADD= ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -ltermcap -lcompat .include Index: head/games/robots/Makefile =================================================================== --- head/games/robots/Makefile (revision 2675) +++ head/games/robots/Makefile (revision 2676) @@ -1,16 +1,16 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= robots CFLAGS+=-DMAX_PER_UID=5 SRCS= extern.c init_field.c main.c make_level.c move.c move_robs.c \ play_level.c query.c rnd_pos.c score.c flush_in.c MAN6= robots.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame beforeinstall: install -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ ${DESTDIR}/var/games/robots_roll .include Index: head/games/rogue/Makefile =================================================================== --- head/games/rogue/Makefile (revision 2675) +++ head/games/rogue/Makefile (revision 2676) @@ -1,13 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= rogue CFLAGS+=-DUNIX -fwritable-strings SRCS= curses.c hit.c init.c inventory.c level.c machdep.c main.c \ message.c monster.c move.c object.c pack.c play.c random.c ring.c \ room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame MAN6= rogue.6 .include Index: head/games/sail/Makefile =================================================================== --- head/games/sail/Makefile (revision 2675) +++ head/games/sail/Makefile (revision 2676) @@ -1,12 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= sail SRCS= main.c pl_main.c pl_1.c pl_2.c pl_3.c pl_4.c pl_5.c pl_6.c pl_7.c \ dr_main.c dr_1.c dr_2.c dr_3.c dr_4.c dr_5.c lo_main.c \ assorted.c game.c globals.c misc.c parties.c sync.c version.c MAN6= sail.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} -LDADD= -lcurses -ltermlib -lcompat +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} +LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame .include Index: head/games/snake/snake/Makefile =================================================================== --- head/games/snake/snake/Makefile (revision 2675) +++ head/games/snake/snake/Makefile (revision 2676) @@ -1,11 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= snake SRCS= snake.c move.c MAN6= snake.6 -DPADD= ${LIBM} ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBM} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -lm -ltermcap -lcompat HIDEGAME=hidegame .include "../../Makefile.inc" .include Index: head/games/worm/Makefile =================================================================== --- head/games/worm/Makefile (revision 2675) +++ head/games/worm/Makefile (revision 2676) @@ -1,9 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= worm MAN6= worm.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -lcurses -ltermcap -lcompat HIDEGAME=hidegame .include Index: head/games/worms/Makefile =================================================================== --- head/games/worms/Makefile (revision 2675) +++ head/games/worms/Makefile (revision 2676) @@ -1,8 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= worms MAN6= worms.6 -DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT} +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT} LDADD= -lcurses -ltermcap -lcompat .include Index: head/share/mk/bsd.README =================================================================== --- head/share/mk/bsd.README (revision 2675) +++ head/share/mk/bsd.README (revision 2676) @@ -1,300 +1,300 @@ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the new make "include" files for the BSD source tree. The files are installed in /usr/share/mk, and are, by convention, named with the suffix ".mk". Each ".mk" file has a corresponding ".rd" file which is an explanation of the ".mk" file. Note, this file is not intended to replace reading through the .mk files for anything tricky. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= RANDOM THINGS WORTH KNOWING: The files are simply C-style #include files, and pretty much behave like you'd expect. The syntax is slightly different in that a single '.' is used instead of the hash mark, i.e. ".include ". One difference that will save you lots of debugging time is that inclusion of the file is normally done at the *end* of the Makefile. The reason for this is because .mk files often modify variables and behavior based on the values of variables set in the Makefile. To make this work, remember that the FIRST target found is the target that is used, i.e. if the Makefile has: a: echo a a: echo a number two the command "make a" will echo "a". To make things confusing, the SECOND variable assignment is the overriding one, i.e. if the Makefile has: a= foo a= bar b: echo ${a} the command "make b" will echo "bar". This is for compatibility with the way the V7 make behaved. It's fairly difficult to make the BSD .mk files work when you're building multiple programs in a single directory. It's a lot easier split up the programs than to deal with the problem. Most of the agony comes from making the "obj" directory stuff work right, not because we switch to a new version of make. So, don't get mad at us, figure out a better way to handle multiple architectures so we can quit using the symbolic link stuff. (Imake doesn't count.) The file .depend in the source directory is expected to contain dependencies for the source files. This file is read automatically by make after reading the Makefile. The variable DESTDIR works as before. It's not set anywhere but will change the tree where the file gets installed. The profiled libraries are no longer built in a different directory than the regular libraries. A new suffix, ".po", is used to denote a profiled object. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file has the default rules for all makes, in the BSD environment or otherwise. You probably don't want to touch this file. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file handles installing manual pages and their links. It has a single target: maninstall: Install the manual pages and their links. It sets/uses the following variables: MANDIR Base path for manual installation. MANGRP Manual group. MANOWN Manual owner. MANMODE Manual mode. MANSUBDIR Subdirectory under the manual page section, i.e. "/vax" or "/tahoe" for machine specific manual pages. MAN1 ... MAN8 The manual pages to be installed (use a .0 suffix). MLINKS List of manual page links (using a .1 - .8 suffix). The linked-to file must come first, the linked file second, and there may be multiple pairs. The files are soft-linked. The include file includes a file named "../Makefile.inc" if it exists. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file contains the owners, groups, etc. for both manual pages and binaries. It has no targets. It sets/uses the following variables: BINGRP Binary group. BINOWN Binary owner. BINMODE Binary mode. STRIP The flag passed to the install program to cause the binary to be stripped. This is to be used when building your own install script so that the entire system can be made stripped/not-stripped using a single nob. MANDIR Base path for manual installation. MANGRP Manual group. MANOWN Manual owner. MANMODE Manual mode. This file is generally useful when building your own Makefiles so that they use the same default owners etc. as the rest of the tree. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file handles building programs from one or more source files, along with their manual pages. It has a limited number of suffixes, consistent with the current needs of the BSD tree. It has seven targets: all: build the program and its manual page clean: remove the program, any object files and the files a.out, Errs, errs, mklog, and ${PROG}.core. cleandir: remove all of the files removed by the target clean, as well as .depend, tags, and any manual pages. depend: make the dependencies for the source files, and store them in the file .depend. install: install the program and its manual pages; if the Makefile does not itself define the target install, the targets beforeinstall and afterinstall may also be used to cause actions immediately before and after the install target is executed. lint: run lint on the source files tags: create a tags file for the source files. It sets/uses the following variables: BINGRP Binary group. BINOWN Binary owner. BINMODE Binary mode. CLEANFILES Additional files to remove for the clean and cleandir targets. COPTS Additional flags to the compiler when creating C objects. HIDEGAME If HIDEGAME is defined, the binary is installed in /usr/games/hide, and a symbolic link is created to /usr/games/dm. LDADD Additional loader objects. Usually used for libraries. For example, to load with the compatibility and utility libraries, use: LDFILES=-lutil -lcompat LDFLAGS Additional loader flags. LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked file. The files are hard-linked. For example, to link /bin/test and /bin/[, use: LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[ MAN1...MAN8 Manual pages (should end in .0). If no MAN variable is defined, "MAN1=${PROG}.0" is assumed. PROG The name of the program to build. If not supplied, nothing is built. SRCS List of source files to build the program. If PROG is not defined, it's assumed to be ${PROG}.c. DPADD Additional dependencies for the program. Usually used for libraries. For example, to depend on the compatibility and utility libraries use: SRCLIB=${LIBCOMPAT} ${LIBUTIL} The following libraries are predefined for DPADD: LIBC /usr/lib/libc.a LIBCOMPAT /usr/lib/libcompat.a LIBCURSES /usr/lib/libcurses.a LIBDBM /usr/lib/libdbm.a LIBDES /usr/lib/libdes.a LIBL /usr/lib/libl.a LIBKDB /usr/lib/libkdb.a LIBKRB /usr/lib/libkrb.a LIBM /usr/lib/libm.a LIBMP /usr/lib/libmp.a LIBPC /usr/lib/libpc.a LIBPLOT /usr/lib/libplot.a LIBRPC /usr/lib/sunrpc.a - LIBTERM /usr/lib/libtermcap.a (sic) + LIBTERMCAP /usr/lib/libtermcap.a LIBUTIL /usr/lib/libutil.a SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared strings, using xstr(1). STRIP The flag passed to the install program to cause the binary to be stripped. SUBDIR A list of subdirectories that should be built as well. Each of the targets will execute the same target in the subdirectories. The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Some simple examples: To build foo from foo.c with a manual page foo.1, use: PROG= foo .include To build foo from foo.c with a manual page foo.2, add the line: MAN2= foo.0 If foo does not have a manual page at all, add the line: NOMAN= noman If foo has multiple source files, add the line: SRCS= a.c b.c c.c d.c =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file contains the default targets for building subdirectories. It has the same seven targets as : all, clean, cleandir, depend, install, lint, and tags. For all of the directories listed in the variable SUBDIRS, the specified directory will be visited and the target made. There is also a default target which allows the command "make subdir" where subdir is any directory listed in the variable SUBDIRS. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The include file has support for building libraries. It has the same seven targets as : all, clean, cleandir, depend, install, lint, and tags. It has a limited number of suffixes, consistent with the current needs of the BSD tree. It sets/uses the following variables: LIBDIR Target directory for libraries. LINTLIBDIR Target directory for lint libraries. LIBGRP Library group. LIBOWN Library owner. LIBMODE Library mode. LDADD Additional loader objects. MAN1 ... MAN8 The manual pages to be installed (use a .0 suffix). SRCS List of source files to build the library. Suffix types .s, .c, and .f are supported. Note, .s files are preferred to .c files of the same name. (This is not the default for versions of make.) The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . It has rules for building profiled objects; profiled libraries are built by default. Libraries are ranlib'd before installation. Index: head/share/mk/bsd.prog.mk =================================================================== --- head/share/mk/bsd.prog.mk (revision 2675) +++ head/share/mk/bsd.prog.mk (revision 2676) @@ -1,247 +1,247 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.3 1994/08/10 02:48:08 wollman Exp $ +# $Id: bsd.prog.mk,v 1.4 1994/08/28 15:32:10 bde Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S CFLAGS+=${COPTS} .if defined(DESTDIR) CFLAGS+= -I${DESTDIR}/usr/include CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX} .endif STRIP?= -s BINGRP?= bin BINOWN?= bin BINMODE?= 555 INSTALL?= install .if !defined(DESTDIR) LIBCRT0?= /usr/lib/crt0.o LIBC?= /usr/lib/libc.a LIBCOMPAT?= /usr/lib/libcompat.a LIBCRYPT?= /usr/lib/libcrypt.a LIBCURSES?= /usr/lib/libcurses.a LIBDBM?= /usr/lib/libdbm.a LIBDES?= /usr/lib/libdes.a LIBGNUMALLOC?= /usr/lib/libgnumalloc.a LIBGNUREGEX?= /usr/lib/libgnuregex.a LIBL?= /usr/lib/libl.a LIBKDB?= /usr/lib/libkdb.a LIBKRB?= /usr/lib/libkrb.a LIBM?= /usr/lib/libm.a LIBMP?= /usr/lib/libmp.a LIBPC?= /usr/lib/libpc.a LIBPLOT?= /usr/lib/libplot.a LIBREADLINE?= /usr/lib/libreadline.a LIBRESOLV?= /usr/lib/libresolv.a LIBRPCSVC?= /usr/lib/librpcsvc.a LIBSKEY?= /usr/lib/libskey.a LIBTELNET?= /usr/lib/libtelnet.a -LIBTERM?= /usr/lib/libtermcap.a +LIBTERMCAP?= /usr/lib/libtermcap.a LIBUTIL?= /usr/lib/libutil.a .else LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o LIBC?= ${DESTDIR}/usr/lib/libc.a LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a LIBDES?= ${DESTDIR}/usr/lib/libdes.a LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a LIBGNUREGEX?= ${DESTDIR}/usr/lib/libgnuregex.a LIBL?= ${DESTDIR}/usr/lib/libl.a LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a LIBM?= ${DESTDIR}/usr/lib/libm.a LIBMP?= ${DESTDIR}/usr/lib/libmp.a LIBPC?= ${DESTDIR}/usr/lib/libpc.a LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a LIBREADLINE?= ${DESTDIR}/usr/lib/libreadline.a LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a -LIBTERM?= ${DESTDIR}/usr/lib/libtermcap.a +LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a .endif .if defined(NOSHARED) LDFLAGS+= -static .endif .if defined(SHAREDSTRINGS) CLEANFILES+=strings .c.o: ${CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c - @${CC} ${CFLAGS} -c x.c -o ${.TARGET} @rm -f x.c .cc.o .cxx.o .C.o: ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c - @mv -f x.c x.cc @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET} .endif .if defined(DESTDIR) LDDESTDIR?= -L${DESTDIR}/usr/lib .endif .if defined(PROG) .if defined(SRCS) DPSRCS+= ${SRCS:M*.h} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if defined(LDONLY) ${PROG}: ${LIBCRT0} ${LIBC} ${DPSRCS} ${OBJS} ${DPADD} ${LD} ${LDFLAGS} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDDESTDIR} \ ${LDADD} .else defined(LDONLY) ${PROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD} .endif .else defined(PROG) SRCS= ${PROG}.c .if 0 ${PROG}: ${DPSRCS} ${SRCS} ${LIBC} ${DPADD} ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${SRCS} \ ${LDDESTDIR} ${LDADD} .else # Always make an intermediate object file because: # - it saves time rebuilding when only the library has changed # - the name of the object gets put into the executable symbol table instead of # the name of a variable temporary object. # - it's useful to keep objects around for crunching. OBJS= ${PROG}.o ${PROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD} .endif MKDEP= -p .endif .if !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ !defined(MAN7) && !defined(MAN8) && !defined(NOMAN) MAN1= ${PROG}.1 .endif .endif _PROGSUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) @for entry in ${SUBDIR}; do \ (${ECHODIR} "===> $$entry"; \ if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ cd ${.CURDIR}/$${entry}.${MACHINE}; \ else \ cd ${.CURDIR}/$${entry}; \ fi; \ ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/}); \ done .endif .MAIN: all all: ${PROG} _PROGSUBDIR .if !target(clean) clean: _PROGSUBDIR rm -f a.out [Ee]rrs mklog ${PROG} ${OBJS} ${CLEANFILES} .endif .if !target(cleandir) cleandir: _PROGSUBDIR rm -f a.out [Ee]rrs mklog ${PROG} ${OBJS} ${CLEANFILES} rm -f ${.CURDIR}/tags .depend cd ${.CURDIR}; rm -rf obj; .endif .if !target(install) .if !target(beforeinstall) beforeinstall: .endif .if !target(afterinstall) afterinstall: .endif realinstall: _PROGSUBDIR .if defined(PROG) ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR} .endif .if defined(HIDEGAME) (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \ chown games.bin ${PROG}) .endif .if defined(LINKS) && !empty(LINKS) @set ${LINKS}; \ while test $$# -ge 2; do \ l=${DESTDIR}$$1; \ shift; \ t=${DESTDIR}$$1; \ shift; \ ${ECHO} $$t -\> $$l; \ rm -f $$t; \ ln $$l $$t; \ done; true .endif install: afterinstall .if !defined(NOMAN) afterinstall: realinstall maninstall .else afterinstall: realinstall .endif realinstall: beforeinstall .endif .if !target(lint) lint: ${SRCS} _PROGSUBDIR .if defined(PROG) @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1 .endif .endif .if !target(obj) .if defined(NOOBJ) obj: _PROGSUBDIR .else obj: _PROGSUBDIR @cd ${.CURDIR}; rm -rf obj; \ here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \ ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \ if test -d /usr/obj -a ! -d $$dest; then \ mkdir -p $$dest; \ else \ true; \ fi; .endif .endif .if !target(tags) tags: ${SRCS} _PROGSUBDIR .if defined(PROG) -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \ sed "s;\${.CURDIR}/;;" > tags .endif .endif .if !defined(NOMAN) .include .elif !target(maninstall) maninstall: .endif .include