A place to build binaries for floppies. always static, always OMAGIC.

note that some have been rewritten (echo, umount) and some are compiled
with options that make them smaller.
This commit is contained in:
cgd 1994-04-18 08:47:08 +00:00
parent 5e8742b110
commit 536b9f6e5c
14 changed files with 371 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# $Id: Makefile,v 1.1 1994/04/18 08:47:08 cgd Exp $
SUBDIR= echo fsck init mount reboot sh tar test umount
.include <bsd.subdir.mk>

View File

@ -0,0 +1,4 @@
# $Id: Makefile.inc,v 1.1 1994/04/18 08:47:09 cgd Exp $
LDSTATIC= -static
LDFLAGS+= -N

View File

@ -0,0 +1,7 @@
# $Id: Makefile,v 1.1 1994/04/18 08:47:20 cgd Exp $
PROG= echo
NOMAN=
BINDIR=/bin
.include <bsd.prog.mk>

View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 1994 Christopher G. Demetriou
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christopher G. Demetriou.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define writestr(x) write(STDOUT_FILENO, x, sizeof(x))
/* ARGSUSED */
main(argc, argv)
int argc;
char **argv;
{
int nflag;
/* This utility may NOT do getopt(3) option parsing. */
if (*++argv && !strcmp(*argv, "-n")) {
++argv;
nflag = 1;
}
else
nflag = 0;
while (*argv) {
(void)writestr(*argv);
if (*++argv)
writestr(" ");
}
if (!nflag)
writestr("\n");
_exit(0);
}

View File

@ -0,0 +1,16 @@
# from: @(#)Makefile 5.15 (Berkeley) 6/29/90
# $Id: Makefile,v 1.1 1994/04/18 08:47:24 cgd Exp $
SRCDIR= ${.CURDIR}/../../../../../sbin/fsck
PROG= fsck
NOMAN=
SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
pass5.c preen.c setup.c utilities.c ufs_subr.c ufs_tables.c
CFLAGS+= -DSMALL
BINDIR= /sbin
.PATH: ${SRCDIR} ${SRCDIR}/../../sys/ufs
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
# from: @(#)Makefile 5.3 (Berkeley) 5/11/90
# from: BSDI Id: Makefile,v 1.3 1993/06/14 20:06:22 donn Exp
# $Id: Makefile,v 1.1 1994/04/18 08:47:26 cgd Exp $
PROG= init
SRCS= init.c
NOMAN=
CFLAGS+=-DNOSYSCTL -DLETS_GET_SMALL
DPADD= ${LIBUTIL} ${LIBCRYPT}
LDADD= -lutil -lcrypt
BINMODE=500
BINDIR= /sbin
.PATH: ${.CURDIR}/../../../../../sbin/init
.include <bsd.prog.mk>

View File

@ -0,0 +1,13 @@
# from: @(#)Makefile 5.5 (Berkeley) 5/11/90
# $Id: Makefile,v 1.1 1994/04/18 08:47:28 cgd Exp $
PROG= mount
SRCS= mount.c
CFLAGS+= -DLETS_GET_SMALL
NOMAN=
BINDIR=/sbin
.PATH: ${.CURDIR}/../../../../../sbin/mount
.include <bsd.prog.mk>

View File

@ -0,0 +1,11 @@
# from: @(#)Makefile 5.6 (Berkeley) 6/29/90
# $Id: Makefile,v 1.1 1994/04/18 08:47:32 cgd Exp $
PROG= reboot
NOMAN=
BINDIR=/sbin
LINKS= ${BINDIR}/reboot ${BINDIR}/halt
.include <bsd.prog.mk>

View File

@ -0,0 +1,66 @@
/*
* Copyright (c) 1994 Christopher G. Demetriou
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christopher G. Demetriou.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef lint
/*static char sccsid[] = "from: @(#)reboot.c 5.11 (Berkeley) 2/27/91";*/
static char rcsid[] = "$Id: reboot.c,v 1.1 1994/04/18 08:47:34 cgd Exp $";
#endif /* not lint */
#include <sys/signal.h>
#include <sys/syscall.h>
#include <sys/reboot.h>
#include <string.h>
#include <unistd.h>
#define errprint(x) write(STDERR_FILENO, x, strlen(x))
main(argc, argv)
int argc;
char **argv;
{
int howto;
char *name;
name = strrchr(argv[0], '/');
if (name == NULL)
name = argv[0];
else
name++;
if (strcmp("halt", name) == 0)
howto = RB_HALT;
else
howto = RB_AUTOBOOT;
syscall(SYS_reboot, howto);
errprint(name);
errprint(" failed");
kill(1, SIGHUP);
exit(1);
}

View File

@ -0,0 +1,47 @@
# $Id: Makefile,v 1.1 1994/04/18 08:47:36 cgd Exp $
PROG= sh
NOMAN=
SRCS= builtins.c cd.c dirent.c echo.c error.c eval.c exec.c expand.c \
input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
mystring.c nodes.c options.c parser.c redir.c show.c \
syntax.c trap.c output.c var.c
OBJS+= init.o
SRCDIR= ${.CURDIR}/../../../../../bin/sh
CFLAGS+=-DSHELL -I. -I${SRCDIR}
BINDIR=/bin
.PATH: ${SRCDIR} ${SRCDIR}/bltin
CLEANFILES+=\
builtins.c builtins.h init.c mkinit mknodes mksyntax \
nodes.c nodes.h syntax.c syntax.h token.def
.depend parser.o: token.def
token.def: mktokens
sh ${SRCDIR}/mktokens
builtins.h builtins.c: ${SRCDIR}/mkbuiltins ${SRCDIR}/builtins
cd ${SRCDIR}; sh mkbuiltins ${.OBJDIR}
init.c: mkinit ${SRCS}
./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC}
touch ${.TARGET}
nodes.c nodes.h: mknodes ${SRCDIR}/nodetypes ${SRCDIR}/nodes.c.pat
./mknodes ${SRCDIR}/nodetypes ${SRCDIR}/nodes.c.pat
syntax.c syntax.h: mksyntax
./mksyntax
.include <bsd.prog.mk>
mkinit: ${LIBCRT0} ${SRCDIR}/mkinit.c ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mkinit.c -o $@ ${LDADD}
mknodes: ${LIBCRT0} ${SRCDIR}/mknodes.c ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mknodes.c -o $@ ${LDADD}
mksyntax: ${LIBCRT0} ${SRCDIR}/mksyntax.c ${SRCDIR}/parser.h ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mksyntax.c -o $@ ${LDADD}

View File

@ -0,0 +1,26 @@
# $Id: Makefile,v 1.1 1994/04/18 08:47:38 cgd Exp $
SRCDIR= ${.CURDIR}/../../../../../gnu/usr.bin/tar
PROG= tar
SRCS= buffer.c create.c diffarch.c extract.c fnmatch.c getdate.y \
getoldopt.c getopt.c getopt1.c gnu.c list.c mangle.c names.c port.c \
regex.c rtapelib.c tar.c update.c version.c
CFLAGS+= -DRETSIGTYPE=void -DDIRENT=1 -DHAVE_SYS_MTIO_H=1 -DHAVE_UNISTD_H=1
CFLAGS+= -DHAVE_GETGRGID=1 -DHAVE_GETPWUID=1 -DHAVE_STRING_H=1
CFLAGS+= -DHAVE_LIMITS_H=1 -DHAVE_STRSTR=1 -DHAVE_VALLOC=1 -DHAVE_MKDIR=1
CFLAGS+= -DHAVE_MKNOD=1 -DHAVE_RENAME=1 -DHAVE_FTRUNCATE=1 -DHAVE_GETCWD=1
CFLAGS+= -DHAVE_VPRINTF=1 -DNEEDPAD -I${SRCDIR}
CFLAGS+= -DDEF_AR_FILE=\"/dev/rst0\" -DDEFBLOCKING=20
LDADD+= -lgnumalloc
DPADD+= /usr/lib/libgnumalloc.a
NOMAN=noman
CLEANFILES+=y.tab.h
BINDIR= /usr/bin
.PATH: ${SRCDIR}
.include <bsd.prog.mk>

View File

@ -0,0 +1,20 @@
# from: @(#)Makefile 5.1 (Berkeley) 6/8/92
# $Id: Makefile,v 1.1 1994/04/18 08:47:41 cgd Exp $
SRCDIR= ${.CURDIR}/../../../../../bin/test
PROG= test
SRCS= test.c operators.c
CFLAGS+=-I.
LINKS= ${BINDIR}/test ${BINDIR}/[
NOMAN=
BINDIR= /bin
# use this rule to if you update binary_ops, or unary_ops
make_op:
sh ${SRCDIR}/mkops
.PATH: ${SRCDIR}
.include <bsd.prog.mk>

View File

@ -0,0 +1,9 @@
# from: @(#)Makefile 5.4 (Berkeley) 5/11/90
# $Id: Makefile,v 1.1 1994/04/18 08:47:43 cgd Exp $
PROG= umount
NOMAN= noman
BINDIR= /sbin
.include <bsd.prog.mk>

View File

@ -0,0 +1,70 @@
/*
* Copyright (c) 1994 Christopher G. Demetriou
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christopher G. Demetriou.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef lint
static char rcsid[] = "$Id: umount.c,v 1.1 1994/04/18 08:47:45 cgd Exp $";
#endif /* not lint */
#include <sys/types.h>
#include <sys/mount.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define errprint(x) write(STDERR_FILENO, x, strlen(x))
int eval, fflag = MNT_NOFORCE;
int
main(argc, argv)
int argc;
char **argv;
{
sync();
argc--;
if (strcmp(*++argv, "-f") == 0) {
fflag = MNT_FORCE;
argc--;
argv++;
}
if (*++argv && **argv == '-') {
errprint("usage: umount [-f] node ...");
_exit(1);
}
for (eval = 0; *argv; ++argv)
if (unmount(*argv, MNT_NOFORCE)) {
errprint(*argv);
errprint(": couldn't unmount");
eval = 1;
}
_exit(eval);
}