head	1.39;
access;
symbols
	DOSCMD_20040324:1.38
	DOSCMD_20040330:1.39
	old_RELENG_5_2_1_RELEASE:1.35
	old_RELENG_5_2_0_RELEASE:1.35
	old_RELENG_5_2:1.35.0.6
	old_RELENG_5_2_BP:1.35
	old_RELENG_4_9_0_RELEASE:1.21.2.5
	old_RELENG_4_9:1.21.2.5.0.6
	old_RELENG_4_9_BP:1.21.2.5
	old_RELENG_5_1_0_RELEASE:1.35
	old_RELENG_5_1:1.35.0.4
	old_RELENG_5_1_BP:1.35
	old_RELENG_4_8_0_RELEASE:1.21.2.5
	old_RELENG_4_8:1.21.2.5.0.4
	old_RELENG_4_8_BP:1.21.2.5
	old_RELENG_5_0_0_RELEASE:1.35
	old_RELENG_5_0:1.35.0.2
	old_RELENG_5_0_BP:1.35
	old_RELENG_4_7_0_RELEASE:1.21.2.5
	old_RELENG_4_7:1.21.2.5.0.2
	old_RELENG_4_7_BP:1.21.2.5
	old_RELENG_4_6_2_RELEASE:1.21.2.4
	old_RELENG_4_6_1_RELEASE:1.21.2.4
	old_RELENG_4_6_0_RELEASE:1.21.2.4
	old_RELENG_4_6:1.21.2.4.0.2
	old_RELENG_4_6_BP:1.21.2.4
	old_RELENG_4_5_0_RELEASE:1.21.2.3
	old_RELENG_4_5:1.21.2.3.0.4
	old_RELENG_4_5_BP:1.21.2.3
	old_RELENG_4_4_0_RELEASE:1.21.2.3
	old_RELENG_4_4:1.21.2.3.0.2
	old_RELENG_4_4_BP:1.21.2.3
	old_RELENG_4_3_0_RELEASE:1.21.2.2
	old_RELENG_4_3:1.21.2.2.0.2
	old_RELENG_4_3_BP:1.21.2.2
	old_RELENG_4_2_0_RELEASE:1.21.2.2
	old_RELENG_4_1_1_RELEASE:1.21.2.2
	old_PRE_SMPNG:1.25
	old_RELENG_4_1_0_RELEASE:1.21.2.2
	old_RELENG_3_5_0_RELEASE:1.13.2.4
	old_RELENG_4_0_0_RELEASE:1.21
	old_RELENG_4:1.21.0.2
	old_RELENG_4_BP:1.21
	old_RELENG_3_4_0_RELEASE:1.13.2.3
	old_RELENG_3_3_0_RELEASE:1.13.2.3
	old_RELENG_3_2_PAO:1.13.2.2.0.2
	old_RELENG_3_2_PAO_BP:1.13.2.2
	old_RELENG_3_2_0_RELEASE:1.13.2.2
	old_RELENG_3_1_0_RELEASE:1.13.2.1
	old_RELENG_3:1.13.0.2
	old_RELENG_3_BP:1.13
	old_RELENG_3_0_0_RELEASE:1.13;
locks; strict;
comment	@# @;


1.39
date	2004.03.30.17.10.01;	author des;	state Exp;
branches;
next	1.38;

1.38
date	2004.03.23.23.01.47;	author des;	state Exp;
branches;
next	1.37;

1.37
date	2004.03.23.21.21.38;	author des;	state Exp;
branches;
next	1.36;

1.36
date	2004.02.05.22.44.24;	author ru;	state Exp;
branches;
next	1.35;

1.35
date	2002.09.17.01.48.59;	author peter;	state Exp;
branches;
next	1.34;

1.34
date	2002.07.29.09.40.15;	author ru;	state Exp;
branches;
next	1.33;

1.33
date	2001.09.13.07.20.51;	author ru;	state Exp;
branches;
next	1.32;

1.32
date	2001.08.03.10.47.13;	author tg;	state Exp;
branches;
next	1.31;

1.31
date	2001.07.30.11.38.20;	author tg;	state Exp;
branches;
next	1.30;

1.30
date	2001.07.26.11.04.08;	author tg;	state Exp;
branches;
next	1.29;

1.29
date	2001.07.25.12.21.27;	author sheldonh;	state Exp;
branches;
next	1.28;

1.28
date	2001.07.24.19.25.19;	author ache;	state Exp;
branches;
next	1.27;

1.27
date	2001.07.24.18.33.26;	author ache;	state Exp;
branches;
next	1.26;

1.26
date	2001.07.24.11.44.20;	author tg;	state Exp;
branches;
next	1.25;

1.25
date	2000.06.23.08.57.17;	author tg;	state Exp;
branches;
next	1.24;

1.24
date	2000.05.07.09.22.23;	author kris;	state Exp;
branches;
next	1.23;

1.23
date	2000.05.07.09.19.07;	author kris;	state Exp;
branches;
next	1.22;

1.22
date	2000.03.19.09.49.03;	author kris;	state Exp;
branches;
next	1.21;

1.21
date	2000.01.05.12.59.31;	author marcel;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	99.08.28.01.00.03;	author peter;	state Exp;
branches;
next	1.19;

1.19
date	99.04.17.01.57.06;	author luoqi;	state Exp;
branches;
next	1.18;

1.18
date	99.03.16.20.57.19;	author imp;	state Exp;
branches;
next	1.17;

1.17
date	99.02.17.13.48.07;	author bde;	state Exp;
branches;
next	1.16;

1.16
date	99.02.16.14.57.58;	author luoqi;	state Exp;
branches;
next	1.15;

1.15
date	99.02.15.12.36.21;	author bde;	state Exp;
branches;
next	1.14;

1.14
date	99.01.22.12.45.27;	author jdp;	state Exp;
branches;
next	1.13;

1.13
date	98.09.24.01.11.45;	author luoqi;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	98.05.31.11.32.38;	author bde;	state Exp;
branches;
next	1.11;

1.11
date	98.05.26.20.12.55;	author sos;	state Exp;
branches;
next	1.10;

1.10
date	98.03.21.12.51.44;	author bde;	state Exp;
branches;
next	1.9;

1.9
date	97.12.16.16.36.43;	author bde;	state Exp;
branches;
next	1.8;

1.8
date	97.09.30.22.03.34;	author jlemon;	state Exp;
branches;
next	1.7;

1.7
date	97.08.28.18.23.40;	author jlemon;	state Exp;
branches;
next	1.6;

1.6
date	97.08.18.18.48.33;	author jlemon;	state Exp;
branches;
next	1.5;

1.5
date	97.08.15.23.41.22;	author jlemon;	state Exp;
branches;
next	1.4;

1.4
date	97.08.12.16.08.02;	author ache;	state Exp;
branches;
next	1.3;

1.3
date	97.08.09.20.04.04;	author ache;	state Exp;
branches;
next	1.2;

1.2
date	97.08.09.02.08.32;	author dyson;	state Exp;
branches;
next	1.1;

1.1
date	97.08.09.01.52.58;	author dyson;	state Exp;
branches;
next	;

1.13.2.1
date	99.01.22.18.40.55;	author jdp;	state Exp;
branches;
next	1.13.2.2;

1.13.2.2
date	99.05.11.07.35.33;	author jkh;	state Exp;
branches;
next	1.13.2.3;

1.13.2.3
date	99.08.29.15.26.49;	author peter;	state Exp;
branches;
next	1.13.2.4;

1.13.2.4
date	2000.03.24.07.39.04;	author kris;	state Exp;
branches;
next	;

1.21.2.1
date	2000.03.24.07.36.29;	author kris;	state Exp;
branches;
next	1.21.2.2;

1.21.2.2
date	2000.06.30.11.06.16;	author tg;	state Exp;
branches;
next	1.21.2.3;

1.21.2.3
date	2001.08.02.02.17.15;	author obrien;	state Exp;
branches;
next	1.21.2.4;

1.21.2.4
date	2002.04.25.11.04.50;	author tg;	state Exp;
branches;
next	1.21.2.5;

1.21.2.5
date	2002.08.07.16.32.01;	author ru;	state Exp;
branches;
next	;


desc
@@


1.39
log
@Install README* and PROBLEMS.
@
text
@# from BSDI Makefile,v 2.6 1996/04/08 20:06:40 bostic Exp
#
# $FreeBSD$

PROG=	doscmd
WARNS?=	2
SRCS=	AsyncIO.c ParseBuffer.c bios.c callback.c cmos.c config.c cpu.c cwd.c \
	debug.c disktab.c dos.c doscmd.c ems.c emuint.c exe.c i386-pinsn.c \
	int.c int10.c int13.c int14.c int16.c int17.c int1a.c int2f.c intff.c \
	mem.c mouse.c net.c port.c setver.c signal.c timer.c trace.c trap.c \
	tty.c video.c xms.c ${FONTHDRS}
CFLAGS+=	-I. -DDISASSEMBLER
FONTFILES=	cp437-8x8.pcf.gz cp437-8x14.pcf.gz cp437-8x16.pcf.gz
FONTHDRS=	font8x8.h font8x14.h font8x16.h
CLEANFILES=	${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com

PREFIX?=	/usr/local
BINDIR?=	${PREFIX}/bin
DATADIR?=	${PREFIX}/share/doscmd
DOCSDIR?=	${PREFIX}/share/doc/doscmd
FONTDIR?=	${DATADIR}/fonts

X11BASE?=	/usr/X11R6
XINCDIR?=	${X11BASE}/include
XLIBDIR?=	${X11BASE}/lib

DIRMODE?=	0755

.if !defined(NO_X)
CFLAGS+=	-I${XINCDIR}
LDFLAGS=	-L${XLIBDIR}
LDADD=		-lX11
DPADD=		${XLIBDIR}/libX11.a
.else
CFLAGS+=	-DNO_X
.endif

beforeinstall:
	${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${DIRMODE} ${DATADIR}
	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
	    emsdriv.sys redir.com ${DATADIR}
	${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m ${DIRMODE} ${DOCSDIR}
	${INSTALL} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
	    ${.CURDIR}/README* ${.CURDIR}/PROBLEMS ${DOCSDIR}
.if !defined(NO_X)
	${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${DIRMODE} ${FONTDIR}
	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
	    ${FONTFILES} ${.CURDIR}/fonts.dir ${FONTDIR}
.endif

doscmd: ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com

cp437-8x8.pcf.gz: cp437-8x8.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x8.pcf.gz.uu

cp437-8x14.pcf.gz: cp437-8x14.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x14.pcf.gz.uu

cp437-8x16.pcf.gz: cp437-8x16.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x16.pcf.gz.uu

emsdriv.sys: emsdriv.sys.uu
	uudecode ${.CURDIR}/emsdriv.sys.uu

font8x8.h: cp437-8x8.fnt.uu
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x8[] = {' '};' > ${.TARGET}

font8x14.h: cp437-8x14.fnt.uu
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x14[] = {' '};' > ${.TARGET}

font8x16.h: cp437-8x16.fnt.uu
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x16[] = {' '};' > ${.TARGET}

redir.com: redir.com.uu
	uudecode ${.CURDIR}/redir.com.uu

.include <bsd.prog.mk>
@


1.38
log
@Uncrotchetize.
@
text
@d20 1
d42 3
@


1.37
log
@Add local copies of fonts we previously pulled from src/share/syscons.
@
text
@d6 1
d17 8
a24 2
XINCDIR=	${DESTDIR}${X11BASE}/include
XLIBDIR=	${DESTDIR}${X11BASE}/lib
d26 1
a26 4
EXEGRP:=	${BINGRP}
EXEMODE=	${NOBINMODE}
#BINGRP=		kmem
#BINMODE=	2555
d28 1
a28 1
.if !defined(NO_X) && exists(${XINCDIR}/X11/X.h) && exists(${XLIBDIR}/libX11.a)
d38 8
a45 7
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
	    emsdriv.sys redir.com ${DESTDIR}/usr/libdata/doscmd/
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
	    ${FONTFILES} ${DESTDIR}/usr/libdata/doscmd/fonts
	cd ${.CURDIR} && \
	    ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
		fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
a74 5

# Make sure the library names are defined.  We want to specify the full
# path to the standard crt0.o, and building two binaries in one directory
# breaks the automatic generation of dependencies for binaries.
NEED_LIBNAMES=	yes
@


1.36
log
@Fixed style of DPADD and LDADD assignments as per style.Makefile(5).
@
text
@d56 1
a56 1
font8x8.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
d60 1
a60 1
font8x14.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x14.fnt
d64 1
a64 1
font8x16.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x16.fnt
@


1.35
log
@Initiate deorbit burn for the i386-only a.out related support.  Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
@
text
@d26 3
a28 2
LDADD+=		-L${XLIBDIR} -lX11
DPADD+=		${XLIBDIR}/libX11.a
@


1.34
log
@Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
@
text
@a16 6
.if ${OBJFORMAT} == "aout"
CLEANFILES+=	doscmd.kernel crt0.o doscmd_loader.o
XLIBDIR=	${DESTDIR}${X11BASE}/lib/aout
LDADD=		-L${DESTDIR}${LIBDIR} -lgcc -lc
DPADD=		${LIBGCC} ${LIBC}
.else
a17 1
.endif
a32 4
.if ${OBJFORMAT} == "aout"
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
	    doscmd.kernel ${DESTDIR}/usr/libexec/
.endif
a40 11
.if ${OBJFORMAT} == "aout"
doscmd: ${LIBCRT0} doscmd_loader.o ${LIBGCC} ${LIBC}
	${CC} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-e,start,-dc,-dp \
	    -o doscmd ${LIBCRT0} doscmd_loader.o -lgcc -lc

# Bogusly generated dependency to get doscmd_loader.c looked at by mkdep.
.depend: doscmd_loader.c

# Bogus dependencies to get more than one binary created by `make all'.
doscmd: ${FONTFILES} ${FONTHDRS} doscmd.kernel emsdriv.sys redir.com
.else
a41 1
.endif
a75 8

.if ${OBJFORMAT} == "aout"
# This must be after bsd.prog.mk is included so that ${OBJS} in the
# dependency gets expanded.
doscmd.kernel: crt0.o ${OBJS} ${DPADD}
	${CC} ${CFLAGS} ${LDFLAGS} -static -nostdlib -Wl,-N,-T,110000 \
	    -o doscmd.kernel crt0.o ${OBJS} ${LDADD}
.endif
@


1.33
log
@Fixed the BINGRP handling mess.

EXEGRP and EXEMODE are used to install DOS (EXE format) binaries.
doscmd(1) can optionally be installed as ``setgid kmem''.
Hence the assignment operator for EXEGRP.

PR:		bin/30538
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.32 2001/08/03 10:47:13 tg Exp $
d41 1
a41 1
	${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
d44 1
a44 1
	${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
d46 1
a46 1
	${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
d49 1
a49 1
	    ${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
@


1.32
log
@Sort SRCS.
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.31 2001/07/30 11:38:20 tg Exp $
d26 3
a28 2
BINGRP=		kmem
EXEGRP=		bin
a29 1
EXEMODE=	444
@


1.31
log
@- Fix file names <:-(,
- attempt to find the X includes and libraries better,
- sort some things.

Submitted by:	bde
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.30 2001/07/26 11:04:08 tg Exp $
d6 2
a7 2
SRCS=	AsyncIO.c ParseBuffer.c bios.c callback.c cpu.c dos.c cmos.c config.c \
	cwd.c debug.c disktab.c doscmd.c ems.c emuint.c exe.c i386-pinsn.c \
@


1.30
log
@Fix bugs introduced in 1.26:

- restore -I. in CFLAGS
- add dependencies of objects on font headers
- missing dependencies of font headers on their sources

Suggested by:	bde
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.29 2001/07/25 12:21:27 sheldonh Exp $
a10 1

d12 2
d16 1
d19 1
a19 1
XLIBDIR=	${X11BASE}/lib/aout
d23 1
a23 1
XLIBDIR=	${X11BASE}/lib
d31 2
a32 3
.if !defined(NO_X) && !defined(DESTDIR) && exists(${X11BASE}/include/X11/X.h) \
    && exists(${XLIBDIR}/libX11.a)
CFLAGS+=	-I${X11BASE}/include
a38 3
FONTFILES=	cp437-8x8.pcf.gz cp437-8x14.pcf.gz cp437-8x16.pcf.gz
FONTHDRS=	font8x8.h font8x14.h font8x16.h

d75 3
d82 1
a82 1
font8x14.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
d86 1
a86 1
font8x16.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
a88 3

emsdriv.sys: emsdriv.sys.uu
	uudecode ${.CURDIR}/emsdriv.sys.uu
@


1.29
log
@Fix breakage introduced in rev 1.26, with the introduction of
absoluate pathnames starting with /usr/src.

This fixes the installworld target for the case where the source tree is
not in /usr/src.
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.28 2001/07/24 19:25:19 ache Exp $
d10 1
a10 1
	tty.c video.c xms.c
d12 1
a12 1
CFLAGS+=	-DDISASSEMBLER -I${.OBJDIR}
a40 2
beforedepend:	${FONTHDRS}

d77 2
a78 2
font8x8.h:
	uudecode -p ${.CURDIR}/share/syscons/fonts/cp437-8x8.fnt | \
d81 2
a82 2
font8x14.h:
	uudecode -p ${.CURDIR}/share/syscons/fonts/cp437-8x14.fnt | \
d85 2
a86 2
font8x16.h:
	uudecode -p ${.CURDIR}/share/syscons/fonts/cp437-8x16.fnt | \
@


1.28
log
@Remove non-existent (missing?) fonts.alias from beforeinstall: target
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.27 2001/07/24 18:33:26 ache Exp $
d80 1
a80 1
	uudecode -p /usr/src/share/syscons/fonts/cp437-8x8.fnt | \
d84 1
a84 1
	uudecode -p /usr/src/share/syscons/fonts/cp437-8x14.fnt | \
d88 1
a88 1
	uudecode -p /usr/src/share/syscons/fonts/cp437-8x16.fnt | \
@


1.27
log
@Add -I${.OBJDIR} to pick generated font*.h
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.26 2001/07/24 11:44:20 tg Exp $
d54 1
a54 1
		fonts.alias fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
@


1.26
log
@Rewrite video emulation. Features:

- slightly more accurate VGA hardware emulation;
- more int 10 functions, especially wrt to palette handling;
- first shot at graphics support;
- mode switching.

Bugs:

- graphics too slow;
- only 16 color modes work for now;
- works only under X, and only with 16 bit TrueColor visuals;
- far from being genuinely useful (I can play an old EGA game now, though
  (mahjongg.exe)).

Also, the code has been cleaned up a bit (more to come in a separate commit).
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.25 2000/06/23 08:57:17 tg Exp $
d12 1
a12 1
CFLAGS+=	-DDISASSEMBLER
@


1.25
log
@Install a VGA font for the X11 mode. Use a line like
  xset fp+ /usr/libdata/doscmd/fonts
in your .xsession to activate it.

Document X11_FONT option in .doscmdrc.

Open window if $DISPLAY is set.
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.24 2000/05/07 09:22:23 kris Exp $
d10 1
a10 1
	tty.c xms.c
d12 2
a13 2
CFLAGS+=	-I. -DDISASSEMBLER
CLEANFILES=	cp437-8x16.pcf.gz emsdriv.sys redir.com
d38 5
d51 1
a51 1
	    cp437-8x16.pcf.gz ${DESTDIR}/usr/libdata/doscmd/fonts
d54 1
a54 1
		fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
d65 1
a65 1
doscmd: cp437-8x16.pcf.gz doscmd.kernel emsdriv.sys redir.com
d67 1
a67 1
doscmd: cp437-8x16.pcf.gz emsdriv.sys redir.com
d70 6
d78 12
@


1.24
log
@Oops, revert previous commit
@
text
@d3 1
a3 1
# $FreeBSD$
d13 1
a13 1
CLEANFILES=	emsdriv.sys redir.com
d45 5
d60 1
a60 1
doscmd: doscmd.kernel emsdriv.sys redir.com
d62 1
a62 1
doscmd: emsdriv.sys redir.com
d65 2
a66 2
redir.com: redir.com.uu
	uudecode ${.CURDIR}/redir.com.uu
d70 3
@


1.23
log
@Update device references.
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.22 2000/03/19 09:49:03 kris Exp $
d29 2
a30 2
.if !defined(NO_X11SUPPORT) && !defined(DESTDIR) \
    && exists(${X11BASE}/include/X11/X.h) && exists(${XLIBDIR}/libX11.a)
@


1.22
log
@Add and document a NO_X knob to force disabling of X support in doscmd

Requested by:	sysop@@silver.komanda.com.ua
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.21 2000/01/05 12:59:31 marcel Exp $
d29 2
a30 2
.if !defined(NO_X) && !defined(DESTDIR) && exists(${X11BASE}/include/X11/X.h) \
    && exists(${XLIBDIR}/libX11.a)
@


1.21
log
@Don't build with X support if DESTDIR is defined. This prevents
breaking a cross-build caused by taking the X libraries on the
build machine. In general this means that we never compile with
X support. The user has to manually compile doscmd for that.

Suggested by: bde, imp (among others)
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.20 1999/08/28 01:00:03 peter Exp $
d29 2
a30 2
.if !defined(DESTDIR) && exists(${X11BASE}/include/X11/X.h) && \
    exists(${XLIBDIR}/libX11.a)
@


1.21.2.1
log
@MFC: NO_X knob
@
text
@d3 1
a3 1
# $FreeBSD$
d29 2
a30 2
.if !defined(NO_X) && !defined(DESTDIR) && exists(${X11BASE}/include/X11/X.h) \
    && exists(${XLIBDIR}/libX11.a)
@


1.21.2.2
log
@MFC: Install a VGA font for use under X. Doc update.
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.21.2.1 2000/03/24 07:36:29 kris Exp $
d13 1
a13 1
CLEANFILES=	cp437-8x16.pcf.gz emsdriv.sys redir.com
a44 5
	${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
	    cp437-8x16.pcf.gz ${DESTDIR}/usr/libdata/doscmd/fonts
	cd ${.CURDIR} && \
	    ${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
		fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
d55 1
a55 1
doscmd: cp437-8x16.pcf.gz doscmd.kernel emsdriv.sys redir.com
d57 1
a57 1
doscmd: cp437-8x16.pcf.gz emsdriv.sys redir.com
d60 2
a61 2
cp437-8x16.pcf.gz: cp437-8x16.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x16.pcf.gz.uu
a64 3

redir.com: redir.com.uu
	uudecode ${.CURDIR}/redir.com.uu
@


1.21.2.3
log
@MFC: as many compiler warning quieting bits as I could stomach
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.21.2.2 2000/06/30 11:06:16 tg Exp $
d17 1
a17 1
XLIBDIR=	${DESTDIR}${X11BASE}/lib/aout
d21 1
a21 1
XLIBDIR=	${DESTDIR}${X11BASE}/lib
@


1.21.2.4
log
@MFC: - better VGA emulation
     - PIC emulation
     - lots of warnings fixed
@
text
@d3 1
a3 1
# $FreeBSD$
d6 2
a7 2
SRCS=	AsyncIO.c ParseBuffer.c bios.c callback.c cmos.c config.c cpu.c cwd.c \
	debug.c disktab.c dos.c doscmd.c ems.c emuint.c exe.c i386-pinsn.c \
d10 2
a11 1
	tty.c video.c xms.c ${FONTHDRS}
d13 1
a13 3
FONTFILES=	cp437-8x8.pcf.gz cp437-8x14.pcf.gz cp437-8x16.pcf.gz
FONTHDRS=	font8x8.h font8x14.h font8x16.h
CLEANFILES=	${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
a14 1
XINCDIR=	${DESTDIR}${X11BASE}/include
d24 2
a25 3
EXEGRP:=	${BINGRP}
EXEMODE=	${NOBINMODE}
#BINGRP=		kmem
d27 1
d29 3
a31 2
.if !defined(NO_X) && exists(${XINCDIR}/X11/X.h) && exists(${XLIBDIR}/libX11.a)
CFLAGS+=	-I${XINCDIR}
d46 1
a46 1
	    ${FONTFILES} ${DESTDIR}/usr/libdata/doscmd/fonts
d60 1
a60 1
doscmd: ${FONTFILES} ${FONTHDRS} doscmd.kernel emsdriv.sys redir.com
d62 1
a62 1
doscmd: ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
a64 6
cp437-8x8.pcf.gz: cp437-8x8.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x8.pcf.gz.uu

cp437-8x14.pcf.gz: cp437-8x14.pcf.gz.uu
	uudecode ${.CURDIR}/cp437-8x14.pcf.gz.uu

a69 12

font8x8.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x8[] = {' '};' > ${.TARGET}

font8x14.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x14.fnt
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x14[] = {' '};' > ${.TARGET}

font8x16.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x16.fnt
	uudecode -p ${.ALLSRC} | \
		file2c 'u_int8_t font8x16[] = {' '};' > ${.TARGET}
@


1.21.2.5
log
@MFC: Drop support for COPY.
@
text
@d41 1
a41 1
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
d44 1
a44 1
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
d46 1
a46 1
	${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
d49 1
a49 1
	    ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
@


1.20
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
d12 3
d16 4
a19 1
CLEANFILES=     doscmd.kernel crt0.o doscmd_loader.o redir.com emsdriv.sys
d21 1
a21 1
CLEANFILES=     redir.com emsdriv.sys
d24 4
a27 4
BINGRP=	kmem
EXEGRP=	bin
# BINMODE=2555
EXEMODE=444
d29 5
a33 2
.if ${OBJFORMAT} == "aout"
XLIBDIR:= ${X11BASE}/lib/aout
d35 1
a35 13
XLIBDIR:= ${X11BASE}/lib
.endif

.if exists(${X11BASE}/include/X11/X.h) && exists(${XLIBDIR}/libX11.a)
CFLAGS+= -I. -I${X11BASE}/include -DDISASSEMBLER
LDADD= -L${XLIBDIR} -lX11
DPADD= ${XLIBDIR}/libX11.a
.else
CFLAGS+= -I. -DDISASSEMBLER -DNO_X
.endif
.if ${OBJFORMAT} == "aout"
LDADD+= -L${DESTDIR}${LIBDIR} -lgcc -lc
DPADD+= ${LIBGCC} ${LIBC}
@


1.19
log
@X11 include directory may not actually contain any header file, check for
a specific one (X11/X.h).
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.18 1999/03/16 20:57:19 imp Exp $
@


1.18
log
@Disable setgid kmem for now.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.17 1999/02/17 13:48:07 bde Exp $
d29 1
a29 1
.if exists(${X11BASE}/include) && exists(${XLIBDIR}/libX11.a)
@


1.17
log
@Use `${CC} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl...' instead of
`ld ... <fudged ${LDFLAGS}>' to invoke the linker.  This gets the
flags and standard library paths right without complications.
Unfortunately, it doesn't help for the X11 library paths -- cc
only appends /aout for standard library paths.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.16 1999/02/16 14:57:58 luoqi Exp $
d20 1
a20 1
BINMODE=2555
@


1.16
log
@Look for aout X libraries at the right place.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.15 1999/02/15 12:36:21 bde Exp $
d51 2
a52 2
	ld -e start -dc -dp ${LDFLAGS:M-static:S/-static/-Bstatic/} \
	    -o doscmd ${LIBCRT0} doscmd_loader.o -L${DESTDIR}${LIBDIR} -lgcc -lc
d80 2
a81 2
	ld -N -Bstatic -T 110000 -o doscmd.kernel ${LDFLAGS:N-static} \
	    crt0.o ${OBJS} ${LDADD}
@


1.15
log
@Don't pass -static in ${LDFLAGS} to ld for building doscmd.kernel,
since it means -s (strip), and static linkage is forced correctly
anyway.  Other things in ${LDFLAGS} are still bogusly passed to ld.
This only affects the aout case.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.14 1999/01/22 12:45:27 jdp Exp $
d23 7
a29 1
.if exists(${X11BASE}/include) && exists(${X11BASE}/lib/libX11.a)
d31 2
a32 2
LDADD= -L${X11BASE}/lib -lX11
DPADD= ${X11BASE}/lib/libX11.a
@


1.14
log
@Use the new variable NEED_LIBNAMES instead of including
<bsd.libnames.mk> explicitly.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.13 1998/09/24 01:11:45 luoqi Exp $
d74 1
a74 1
	ld -N -Bstatic -T 110000 -o doscmd.kernel ${LDFLAGS} \
@


1.13
log
@ELFize. In fact, doscmd is ELF natural -- there is no need for a loader
since ELF executables are loaded well above the low memory region that
DOS operates in.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.12 1998/05/31 11:32:38 bde Exp $
d66 1
a66 1
.include <bsd.libnames.mk>
@


1.13.2.1
log
@MFC: Fix PAM-related a.out breakage.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.14 1999/01/22 12:45:27 jdp Exp $
d66 1
a66 1
NEED_LIBNAMES=	yes
@


1.13.2.2
log
@Don't make this sgid by default.

Requested by: jkb
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.13.2.1 1999/01/22 18:40:55 jdp Exp $
d20 1
a20 3
BINMODE=555
# Use the following mode if you're less concerned about security.
#BINMODE=2555
@


1.13.2.3
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.13.2.4
log
@MFC: NO_X knob
@
text
@d3 1
a3 1
# $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.13.2.3 1999/08/29 15:26:49 peter Exp $
d25 1
a25 2
.if !defined(NO_X) && exists(${X11BASE}/include) && \
	exists(${X11BASE}/lib/libX11.a)
@


1.12
log
@Fixed double slashes in pathnames.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.11 1998/05/26 20:12:55 sos Exp $
d12 1
d14 3
d30 1
d33 1
d36 1
d39 1
d43 1
d53 3
d70 1
d76 1
@


1.11
log
@ELF preparation step 2:

Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.10 1998/03/21 12:51:44 bde Exp $
d26 1
a26 1
LDADD+= -L${DESTDIR}/${LIBDIR} -lgcc -lc
d37 1
a37 1
	    -o doscmd ${LIBCRT0} doscmd_loader.o -L${DESTDIR}/${LIBDIR} -lgcc -lc
@


1.10
log
@Honour -static in LDFLAGS.

Install using ${INSTALL}, not `install'.  Install generated files using
${COPY}, not -c.  Install using a single command when this is easy.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.9 1997/12/16 16:36:43 bde Exp $
d26 1
a26 1
LDADD+= -lgcc -lc
d37 1
a37 1
	    -o doscmd ${LIBCRT0} doscmd_loader.o -lgcc -lc
@


1.9
log
@Fixed DPADD.  ${LIBGCC} must be added explicitly since the default
linkage rule is overridden.  The -L option must be in ${DPADD} so that
`make checkdpadd' works.  Actually use ${DPADD}.

FIxed missing dependencies for doscmd.  Use ${LIBCRT0} instead of a
hard-coded path in the rule for doscmd.

Added comments about the kludges used to build 2 binaries and 2 data
files in one directory.  It shouldn't be done this way.  The dependencies
on sources took extra work to get right, and the dependencies on objects
are still broken (one set is missing and the other has the wrong libs).

Fixed some style bugs while I'm here:
- don't override the (correct) default for MAN1.
- use `beforeinstall', not `afterinstall' to install auxiliary files.
  `afterinstall' is for fixing messes made by `install'.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.8 1997/09/30 22:03:34 jlemon Exp $
d30 4
a33 6
	install ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
		doscmd.kernel ${DESTDIR}/usr/libexec/doscmd.kernel
	install -c -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
		redir.com ${DESTDIR}/usr/libdata/doscmd/
	install -c -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
		emsdriv.sys ${DESTDIR}/usr/libdata/doscmd/
d36 2
a37 1
	ld -e start -dc -dp -o doscmd ${LIBCRT0} doscmd_loader.o -lgcc -lc
d62 1
a62 1
		crt0.o ${OBJS} ${LDADD}
@


1.8
log
@Add support for EMS emulation to doscmd.  This requires changing the
interface for callbacks to doscmd from DOS, obsoleting the instbsdi
redirector.  (redir.com replaces it)

A temporary hack is in place so the instbsdi program will (hopefully) work
in the short term.
Submitted by:	Helmut F. Wirth <hfwirth@@ping.at>
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.6 1997/08/18 18:48:33 jlemon Exp $
a5 1
MAN1=   doscmd.1
d21 2
a22 3
LDFLAGS+= -L${X11BASE}/lib
LDADD+=	-lX11 -lgcc -lc
DPADD+= ${X11BASE}/lib/libX11.a ${LIBC}
d25 1
d27 1
a27 2
DPADD+= ${LIBC}
.endif
d29 1
a29 1
afterinstall:
d37 8
a44 2
doscmd: doscmd.kernel ${LIBCRT0} doscmd_loader.o redir.com emsdriv.sys
	ld -e start -dc -dp -o doscmd /usr/lib/crt0.o doscmd_loader.o -lgcc -lc
d52 5
d59 3
a61 3
.depend: doscmd_loader.c

doscmd.kernel: crt0.o ${OBJS}
@


1.7
log
@Make X11 support in doscmd dependent on the actual libX11.a library and
include directory, rather than X11BASE.  This fixes the build for people
who only have the shared X11 distribution installed.
Requested-by:	A Joseph Koshy <koshy@@india.hp.com>
@
text
@d8 4
a11 3
	cwd.c debug.c disktab.c doscmd.c exe.c i386-pinsn.c int.c int10.c \
	int13.c int14.c int16.c int17.c int1a.c int2f.c intff.c mem.c mouse.c \
	net.c port.c setver.c signal.c timer.c trace.c trap.c tty.c xms.c
d13 1
a13 1
CLEANFILES=     doscmd.kernel crt0.o doscmd_loader.o instbsdi.exe
d35 3
a37 1
		instbsdi.exe ${DESTDIR}/usr/libdata/doscmd/
d39 1
a39 1
doscmd: doscmd.kernel ${LIBCRT0} doscmd_loader.o instbsdi.exe
d42 5
a46 2
instbsdi.exe:	instbsdi.exe.uu
	uudecode        ${.CURDIR}/instbsdi.exe.uu
@


1.6
log
@Clean up Makefile, make compiling in X support dependent on ${X11BASE}.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.5 1997/08/15 23:41:22 jlemon Exp $
d19 1
a19 1
.if exists(${X11BASE})
@


1.5
log
@Add support for XMS memory to doscmd.

Submitted by:	Helmut F. Wirth <hfwirth@@ping.at>
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.4 1997/08/12 16:08:02 ache Exp $
d19 10
a28 19
################################################################################
# For FreeBSD
# (Note ./machine/ include not required once new kernel headers installed)
CFLAGS+=-I. -I/usr/X11R6/include -DDISASSEMBLER
LDFLAGS+=-L/usr/X11R6/lib
LDADD+=	-lX11 -lgcc -lc -lgcc
DPADD+=/usr/X11R6/lib/libX11.a ${LIBC}

# For FreeBSD, no X
#CFLAGS+=-I/usr/X11R6/include -I./machine/ -DDISASSEMBLER -DNO_X
#LDADD+= -lgcc -lc -lgcc
#DPADD+=${LIBC}

################################################################################
# For NetBSD
#CFLAGS+=-I/usr/X11/include -DDISASSEMBLER -g
#LDFLAGS+=-L/usr/X11/lib
#LDADD+=	-lX11 -li386 -lgcc -lc -lgcc
#DPADD+=	/usr/X11/lib/libX11.a ${LIBC} ${LIBGCC}
d37 1
a37 4
# for FreeBSD
	ld -e start -dc -dp -o doscmd ${LDFLAGS} /usr/lib/crt0.o doscmd_loader.o ${LDADD}
# for NetBSD
#	ld -N -Bstatic -o doscmd ${LDFLAGS} ${LIBCRT0} doscmd_loader.o ${LDADD}
a45 1
# NetBSD/FreeBSD
d47 2
a48 1
	ld -N -Bstatic -T 110000 -o doscmd.kernel ${LDFLAGS} crt0.o ${OBJS} ${LDADD}
@


1.4
log
@Cleanup and use /usr/libdata/doscmd now
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.3 1997/08/09 20:04:04 ache Exp $
d7 4
a10 6
SRCS=	AsyncIO.c ParseBuffer.c \
	bios.c callback.c cpu.c dos.c cmos.c config.c cwd.c debug.c disktab.c doscmd.c \
	exe.c i386-pinsn.c int.c \
	int10.c int13.c int14.c int16.c int17.c \
	int1a.c int2f.c intff.c \
	mem.c mouse.c net.c port.c setver.c signal.c timer.c trace.c trap.c tty.c xms.c
@


1.3
log
@Build instbsdi.exe in obj directory (make world stopper)
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.2 1997/08/09 02:08:32 dyson Exp $
d6 1
d14 1
a14 1
CLEANFILES=     doscmd.kernel crt0.o doscmd_loader.o doscmd.1.gz instbsdi.exe
d24 1
a24 1
CFLAGS+=-I. -I/usr/X11R6/include -DDISASSEMBLER -g
d30 1
a30 1
#CFLAGS+=-I/usr/X11R6/include -I./machine/ -DDISASSEMBLER -g -DNO_X
d45 1
a45 1
		instbsdi.exe ${DESTDIR}/usr/dos/
a62 3

doscmd.0: doscmd.1
	tbl ${.IMPSRC} | nroff -mandoc > ${.TARGET}
@


1.2
log
@Add a valuable binary that enables I/O to U**X mounted disks.
@
text
@d3 1
a3 1
# $Id: Makefile,v 1.6 1997/03/18 02:36:55 msmith Exp $
d13 1
a13 1
CLEANFILES=	doscmd.kernel crt0.o doscmd_loader.o doscmd.1.gz
d44 1
a44 1
		${.CURDIR}/instbsdi.exe ${DESTDIR}/usr/dos/
d53 1
a53 1
	uudecode	instbsdi.exe.uu
@


1.1
log
@Add the makefile for doscmd.
@
text
@d46 1
a46 1
doscmd: doscmd.kernel ${LIBCRT0} doscmd_loader.o
d51 3
@
