diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index def26e0018cf..c0639fc2cb98 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -1,31 +1,25 @@ -# $NetBSD: Makefile,v 1.23 2009/01/10 22:06:29 bjh21 Exp $ +# $NetBSD: Makefile,v 1.24 2009/01/16 19:39:52 pooka Exp $ # .include PROG= makefs -SRCS= buf.c \ - cd9660.c cd9660_strings.c cd9660_debug.c cd9660_eltorito.c \ - cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c \ - ffs.c ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ffs_tables.c \ +SRCS= cd9660.c ffs.c \ getid.c \ - makefs.c misc.c mkfs.c \ + makefs.c misc.c \ pack_dev.c \ spec.c \ - ufs_bmap.c \ walk.c MAN= makefs.8 MKNODSRC= ${NETBSDSRCDIR}/sbin/mknod MTREESRC= ${NETBSDSRCDIR}/usr.sbin/mtree -UFSSRC= ${NETBSDSRCDIR}/sys/ufs -CD9660SRC= ${NETBSDSRCDIR}/sys/fs/cd9660 -CPPFLAGS+= -I${.CURDIR} \ - -I${MKNODSRC} -I${MTREESRC} -I${CD9660SRC} -.PATH: ${.CURDIR}/ffs ${UFSSRC}/ffs \ - ${.CURDIR}/cd9660 ${CD9660SRC} \ - ${MKNODSRC} ${MTREESRC} +CPPFLAGS+= -I${.CURDIR} -I${MKNODSRC} -I${MTREESRC} +.PATH: ${MKNODSRC} ${MTREESRC} + +.include "${.CURDIR}/cd9660/Makefile.inc" +.include "${.CURDIR}/ffs/Makefile.inc" .if (${HOSTPROG:U} == "") DPADD+= ${LIBUTIL} @@ -34,12 +28,4 @@ LDADD+= -lutil WARNS?= 3 -.if !defined(HOSTPROGNAME) -.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC) -.for f in cd9660_debug cd9660_write -COPTS.${f}.c+= -Wno-pointer-sign -.endfor -.endif -.endif - .include diff --git a/usr.sbin/makefs/cd9660/Makefile.inc b/usr.sbin/makefs/cd9660/Makefile.inc new file mode 100644 index 000000000000..539a388e6478 --- /dev/null +++ b/usr.sbin/makefs/cd9660/Makefile.inc @@ -0,0 +1,17 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/01/16 19:39:52 pooka Exp $ +# + +.PATH: ${.CURDIR}/cd9660 ${NETBSDSRCDIR}/sys/fs/cd9660 + +CPPFLAGS+=-I${NETBSDSRCDIR}/sys/fs/cd9660 + +SRCS+= cd9660_strings.c cd9660_debug.c cd9660_eltorito.c +SRCS+= cd9660_write.c cd9660_conversion.c iso9660_rrip.c cd9660_archimedes.c + +.if !defined(HOSTPROGNAME) +.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC) +.for f in cd9660_debug cd9660_write +COPTS.${f}.c+= -Wno-pointer-sign +.endfor +.endif +.endif diff --git a/usr.sbin/makefs/ffs/Makefile.inc b/usr.sbin/makefs/ffs/Makefile.inc new file mode 100644 index 000000000000..d13bcb358d80 --- /dev/null +++ b/usr.sbin/makefs/ffs/Makefile.inc @@ -0,0 +1,7 @@ +# $NetBSD: Makefile.inc,v 1.1 2009/01/16 19:39:52 pooka Exp $ +# + +.PATH: ${.CURDIR}/ffs ${NETBSDSRCDIR}/sys/ufs/ffs + +SRCS+= ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c ffs_tables.c ufs_bmap.c +SRCS+= buf.c mkfs.c