Skip to content

Commit

Permalink
Build lib/ with WARNS=6 by default.
Browse files Browse the repository at this point in the history
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
  • Loading branch information
ed authored and ed committed Jan 2, 2010
1 parent b1c1be3 commit 09818ac
Show file tree
Hide file tree
Showing 66 changed files with 83 additions and 37 deletions.
2 changes: 2 additions & 0 deletions lib/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# $FreeBSD$
# Default version for system libs (override in <lib>/Makefile if necessary)
SHLIB_MAJOR?= 5

WARNS?= 6
2 changes: 2 additions & 0 deletions lib/csu/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# $FreeBSD$

SSP_CFLAGS=

WARNS?= 6
2 changes: 2 additions & 0 deletions lib/csu/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CFLAGS+= -Wall -Wno-unused \
-I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include

WARNS?= 2

all: ${OBJS}

CLEANFILES= ${OBJS}
Expand Down
1 change: 0 additions & 1 deletion lib/csu/i386-elf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESMODE= ${LIBMODE}
FILESDIR= ${LIBDIR}
WARNS?= 6
CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
Expand Down
2 changes: 2 additions & 0 deletions lib/csu/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CFLAGS+= -Wall -Wno-unused \
-I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include

WARNS?= 2

all: ${OBJS}

CLEANFILES= ${OBJS}
Expand Down
2 changes: 0 additions & 2 deletions lib/libarchive/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
.endif

WARNS?= 6

# Headers to be installed in /usr/include
INCS= archive.h archive_entry.h

Expand Down
2 changes: 2 additions & 0 deletions lib/libauditd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ SRCS= auditd_lib.c
#
CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR}

WARNS?= 3

NO_MAN=

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion lib/libautofs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

LIB= autofs
SHLIB_MAJOR= 3
WARNS?= 4

SRCS= libautofs.c
INCS= libautofs.h
Expand Down
2 changes: 0 additions & 2 deletions lib/libbegemot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIB= begemot
SHLIB_MAJOR= 4
SHLIBDIR?= /lib

# WARNS?= 6

CFLAGS+= -DUSE_SELECT -DQUADFMT='"ll"'
SRCS= rpoll.c
INCS= rpoll.h
Expand Down
2 changes: 2 additions & 0 deletions lib/libbsm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SRCS= bsm_audit.c \
#
CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR}

WARNS?= 1

INCS= audit_uevents.h libbsm.h
INCSDIR= ${INCLUDEDIR}/bsm

Expand Down
2 changes: 2 additions & 0 deletions lib/libbz2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
INCS= bzlib.h
CFLAGS+= -I${BZ2DIR}

WARNS?= 3

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion lib/libcalendar/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $FreeBSD$

LIB= calendar
WARNS?= 2

SRCS= calendar.c easter.c
INCS= calendar.h
Expand Down
1 change: 1 addition & 0 deletions lib/libcam/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LDADD= -lsbuf

MAN= cam.3 cam_cdbparse.3

WARNS?= 2

MLINKS+= cam.3 cam_open_device.3 \
cam.3 cam_open_spec_device.3 \
Expand Down
2 changes: 2 additions & 0 deletions lib/libcompat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ LIB=compat
CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
NO_PIC=

WARNS?= 1

.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \
${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \
${.CURDIR}/4.4/${MACHINE_ARCH} ${.CURDIR}/4.4 \
Expand Down
2 changes: 2 additions & 0 deletions lib/libcrypt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SRCS+= auth.c property.c
CFLAGS+= -D${sym}=__${sym}
.endfor

WARNS?= 2

PRECIOUSLIB=

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions lib/libdevinfo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ SRCS= devinfo.c
INCS= devinfo.h
MAN= devinfo.3

WARNS?= 3

.include <bsd.lib.mk>
2 changes: 1 addition & 1 deletion lib/libdevstat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ MLINKS+=devstat.3 compute_etime.3

CFLAGS+=-I${.CURDIR}

WARNS?= 2
WARNS?= 3

.include <bsd.lib.mk>
2 changes: 0 additions & 2 deletions lib/libdwarf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ CFLAGS+= -I. -I${.CURDIR}

SHLIB_MAJOR= 2

WARNS?= 6

WITHOUT_MAN= yes

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions lib/libedit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
CFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT

WARNS?= 1

AHDR= vi.h emacs.h common.h
ASRC= ${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c

Expand Down
2 changes: 0 additions & 2 deletions lib/libelf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ CFLAGS+= -I. -I${.CURDIR}

SHLIB_MAJOR= 1

WARNS?= 6

MAN= elf.3 \
elf_begin.3 \
elf_cntl.3 \
Expand Down
2 changes: 2 additions & 0 deletions lib/libexpat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ MAN= libbsdxml.3
CFLAGS+= -I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
CLEANFILES= bsdxml.h bsdxml_external.h

WARNS?= 2

# OK, so it is not entirely unadultered: we ammend the COPYING
# to point people to the right place, get rid of some VMS stuff
# and use FreeBSD style indempotency #ifndefs. We also want to
Expand Down
2 changes: 2 additions & 0 deletions lib/libftpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CLEANFILES= ftperr.c
CFLAGS+= -DINET6
.endif

WARNS?= 2

ftperr.c: ftp.errors
@echo '#include <stdio.h>' > ${.TARGET}
@echo '#include "ftpio.h"' >> ${.TARGET}
Expand Down
1 change: 0 additions & 1 deletion lib/libgpib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ SHLIB_MAJOR= 3
INCS= gpib.h
INCSDIR= ${INCLUDEDIR}/gpib
SRCS= ibfoo.c
WARNS?= 6

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion lib/libgssapi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

LIB= gssapi
SHLIB_MAJOR= 10
WARNS= 6
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map

Expand Down
2 changes: 2 additions & 0 deletions lib/libipsec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ CLEANFILES+= y.tab.c y.tab.h
YFLAGS+=-d -p __libipsecyy
LFLAGS+=-P__libipsecyy

WARNS?= 2

MAN= ipsec_set_policy.3 ipsec_strerror.3
MLINKS+=ipsec_set_policy.3 ipsec_get_policylen.3 \
ipsec_set_policy.3 ipsec_dump_policy.3
Expand Down
2 changes: 2 additions & 0 deletions lib/libipx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ SRCS= ipx_addr.c ipx_ntoa.c
MAN= ipx.3
MLINKS+=ipx.3 ipx_addr.3 ipx.3 ipx_ntoa.3

WARNS?= 2

.include <bsd.lib.mk>
2 changes: 0 additions & 2 deletions lib/libjail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ MLINKS+=jail.3 jailparam_free.3

CFLAGS+=-I${.CURDIR}

WARNS?= 6

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions lib/libkiconv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ MLINKS+= kiconv.3 kiconv_add_xlat16_cspair.3 \

CFLAGS+= -I${.CURDIR}/../../sys

WARNS?= 1

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions lib/libkvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
CFLAGS+=-DSUN4V
.endif

WARNS?= 0

SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm"
Expand Down
2 changes: 2 additions & 0 deletions lib/libmagic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ MAGICPATH?= /usr/share/misc
CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR} -I${CONTRDIR}

WARNS?= 1

CLEANFILES+= magic magic.mgc

FILES= magic magic.mgc
Expand Down
2 changes: 2 additions & 0 deletions lib/libmd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \
sha256c.c sha256hl.c
INCS= md2.h md4.h md5.h ripemd.h sha.h sha256.h

WARNS?= 0

MAN+= md2.3 md4.3 md5.3 ripemd.3 sha.3 sha256.3
MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3
MLINKS+=md2.3 MD2End.3 md2.3 MD2File.3 md2.3 MD2FileChunk.3
Expand Down
2 changes: 2 additions & 0 deletions lib/libmilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ SRCS+= main.c engine.c listener.c handler.c comm.c monitor.c smfi.c \
signal.c sm_gethost.c errstring.c strl.c worker.c
CLEANFILES+=sm_os.h

WARNS?= 0

sm_os.h:
ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h

Expand Down
1 change: 0 additions & 1 deletion lib/libmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ MAN= libmp.3
INCS= mp.h
SRCS= mpasbn.c

WARNS?= 6
CFLAGS+= -I${.CURDIR}/../../crypto

VERSION_DEF= ${.CURDIR}/../libc/Versions.def
Expand Down
2 changes: 2 additions & 0 deletions lib/libncp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ SRCS= ncpl_subr.c ncpl_bind.c ncpl_queue.c ncpl_file.c ncpl_misc.c \
ncpl_net.c ncpl_rcfile.c ncpl_conn.c ncpl_nls.c ncpl_msg.c \
ncpl_rpc.c ncpl_crypt.c ipx.c sap.c

WARNS?= 0

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion lib/libngatm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
LIB= ngatm
SHLIB_MAJOR= 4
MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3
WARNS?= 6

# source of the library lives in contrib
SDIR= ${.CURDIR}/../../sys
Expand Down
2 changes: 2 additions & 0 deletions lib/libopie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CFLAGS+=-I${.CURDIR} -I${OPIE_DIST} -I${DIST_DIR} \
ACCESSFILE?= \"/etc/opieaccess\"
CFLAGS+= -DINSECURE_OVERRIDE -DPATH_ACCESS_FILE=${ACCESSFILE}

WARNS?= 0

DPADD= ${LIBMD}
LDADD= -lmd

Expand Down
2 changes: 1 addition & 1 deletion lib/libpam/modules/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NO_INSTALLLIB=
NO_PROFILE=

CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
WARNS?= 4
WARNS?= 6

# This is nasty.
# For the static case, libpam.a depends on the modules.
Expand Down
2 changes: 1 addition & 1 deletion lib/libpam/modules/pam_exec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ LIB= pam_exec
SRCS= pam_exec.c
MAN= pam_exec.8

WARNS?= 0
WARNS?= 1

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion lib/libpam/modules/pam_krb5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ SRCS= pam_krb5.c
MAN= pam_krb5.8
.if defined(_FREEFALL_CONFIG)
CFLAGS+=-D_FREEFALL_CONFIG
WARNS= 0
.endif

DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
Expand Down
2 changes: 1 addition & 1 deletion lib/libpam/modules/pam_radius/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
LIB= pam_radius
SRCS= pam_radius.c
MAN= pam_radius.8
WARNS= 0
WARNS?= 3

DPADD= ${LIBRADIUS}
LDADD= -lradius
Expand Down
2 changes: 1 addition & 1 deletion lib/libpam/modules/pam_ssh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SRCS= pam_ssh.c
# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c

WARNS?= 0
WARNS?= 3
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h

DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
Expand Down
2 changes: 2 additions & 0 deletions lib/libpcap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ CFLAGS+=-DINET6
CFLAGS+=-DHAVE_NET_PFVAR_H
.endif

WARNS?= 0

SHLIB_MAJOR=7

#
Expand Down
2 changes: 0 additions & 2 deletions lib/libpmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ LIB= pmc
SRCS= libpmc.c pmclog.c
INCS= pmc.h pmclog.h

WARNS?= 6

MAN= pmc.3
MAN+= pmc_allocate.3
MAN+= pmc_attach.3
Expand Down
2 changes: 0 additions & 2 deletions lib/libproc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ CFLAGS+= -I. -I${.CURDIR}

SHLIB_MAJOR= 2

WARNS?= 6

WITHOUT_MAN= yes

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions lib/libradius/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CFLAGS+= -Wall
SHLIB_MAJOR= 4
MAN= libradius.3 radius.conf.5

WARNS?= 3

.if ${MK_OPENSSL} == "no"
DPADD= ${LIBMD}
LDADD= -lmd
Expand Down
1 change: 0 additions & 1 deletion lib/librpcsec_gss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

LIB= rpcsec_gss
SHLIB_MAJOR= 1
WARNS?= 6
SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rpcsec_gss_conf.c rpcsec_gss_misc.c \
svc_rpcsec_gss.c

Expand Down
2 changes: 2 additions & 0 deletions lib/librt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
CFLAGS+=-Winline -Wall -g
LDADD+=-lpthread

WARNS?= 2

#MAN= libthr.3

SRCS+= aio.c mq.c sigev_thread.c timer.c
Expand Down
1 change: 0 additions & 1 deletion lib/libsbuf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
LIB= sbuf
SHLIBDIR?= /lib
SRCS= subr_sbuf.c
WARNS?= 2

.PATH: ${.CURDIR}/../../sys/kern

Expand Down
Loading

0 comments on commit 09818ac

Please sign in to comment.