1997-08-09 01:52:58 +00:00
|
|
|
# from BSDI Makefile,v 2.6 1996/04/08 20:06:40 bostic Exp
|
|
|
|
#
|
1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1997-08-09 01:52:58 +00:00
|
|
|
|
|
|
|
PROG= doscmd
|
2001-08-03 10:47:13 +00:00
|
|
|
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 \
|
1997-09-30 22:04:06 +00:00
|
|
|
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 \
|
2001-07-26 11:04:08 +00:00
|
|
|
tty.c video.c xms.c ${FONTHDRS}
|
|
|
|
CFLAGS+= -I. -DDISASSEMBLER
|
2001-07-30 11:38:20 +00:00
|
|
|
FONTFILES= cp437-8x8.pcf.gz cp437-8x14.pcf.gz cp437-8x16.pcf.gz
|
|
|
|
FONTHDRS= font8x8.h font8x14.h font8x16.h
|
2001-07-24 11:44:20 +00:00
|
|
|
CLEANFILES= ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
|
1997-08-09 01:52:58 +00:00
|
|
|
|
2001-07-30 11:38:20 +00:00
|
|
|
XINCDIR= ${DESTDIR}${X11BASE}/include
|
1999-02-16 14:57:58 +00:00
|
|
|
.if ${OBJFORMAT} == "aout"
|
2000-01-05 12:59:31 +00:00
|
|
|
CLEANFILES+= doscmd.kernel crt0.o doscmd_loader.o
|
2001-07-30 11:38:20 +00:00
|
|
|
XLIBDIR= ${DESTDIR}${X11BASE}/lib/aout
|
2000-01-05 12:59:31 +00:00
|
|
|
LDADD= -L${DESTDIR}${LIBDIR} -lgcc -lc
|
|
|
|
DPADD= ${LIBGCC} ${LIBC}
|
1999-02-16 14:57:58 +00:00
|
|
|
.else
|
2001-07-30 11:38:20 +00:00
|
|
|
XLIBDIR= ${DESTDIR}${X11BASE}/lib
|
1999-02-16 14:57:58 +00:00
|
|
|
.endif
|
|
|
|
|
2000-01-05 12:59:31 +00:00
|
|
|
BINGRP= kmem
|
|
|
|
EXEGRP= bin
|
|
|
|
#BINMODE= 2555
|
|
|
|
EXEMODE= 444
|
|
|
|
|
2001-07-30 11:38:20 +00:00
|
|
|
.if !defined(NO_X) && exists(${XINCDIR}/X11/X.h) && exists(${XLIBDIR}/libX11.a)
|
|
|
|
CFLAGS+= -I${XINCDIR}
|
2000-01-05 12:59:31 +00:00
|
|
|
LDADD+= -L${XLIBDIR} -lX11
|
|
|
|
DPADD+= ${XLIBDIR}/libX11.a
|
1997-08-18 18:48:33 +00:00
|
|
|
.else
|
2000-01-05 12:59:31 +00:00
|
|
|
CFLAGS+= -DNO_X
|
1998-09-24 01:11:45 +00:00
|
|
|
.endif
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-12-16 16:36:43 +00:00
|
|
|
beforeinstall:
|
1998-09-24 01:11:45 +00:00
|
|
|
.if ${OBJFORMAT} == "aout"
|
1998-03-21 12:51:44 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
|
|
|
|
doscmd.kernel ${DESTDIR}/usr/libexec/
|
1998-09-24 01:11:45 +00:00
|
|
|
.endif
|
1998-03-21 12:51:44 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
|
|
|
|
emsdriv.sys redir.com ${DESTDIR}/usr/libdata/doscmd/
|
2000-06-23 08:57:17 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
|
2001-07-24 11:44:20 +00:00
|
|
|
${FONTFILES} ${DESTDIR}/usr/libdata/doscmd/fonts
|
2000-06-23 08:57:17 +00:00
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
|
2001-07-24 19:25:19 +00:00
|
|
|
fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1998-09-24 01:11:45 +00:00
|
|
|
.if ${OBJFORMAT} == "aout"
|
1997-12-16 16:36:43 +00:00
|
|
|
doscmd: ${LIBCRT0} doscmd_loader.o ${LIBGCC} ${LIBC}
|
1999-02-17 13:48:07 +00:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-e,start,-dc,-dp \
|
|
|
|
-o doscmd ${LIBCRT0} doscmd_loader.o -lgcc -lc
|
1997-12-16 16:36:43 +00:00
|
|
|
|
|
|
|
# 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'.
|
2001-07-24 11:44:20 +00:00
|
|
|
doscmd: ${FONTFILES} ${FONTHDRS} doscmd.kernel emsdriv.sys redir.com
|
1998-09-24 01:11:45 +00:00
|
|
|
.else
|
2001-07-24 11:44:20 +00:00
|
|
|
doscmd: ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
|
1998-09-24 01:11:45 +00:00
|
|
|
.endif
|
1997-08-09 01:52:58 +00:00
|
|
|
|
2001-07-24 11:44:20 +00:00
|
|
|
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
|
|
|
|
|
2000-06-23 08:57:17 +00:00
|
|
|
cp437-8x16.pcf.gz: cp437-8x16.pcf.gz.uu
|
|
|
|
uudecode ${.CURDIR}/cp437-8x16.pcf.gz.uu
|
1997-09-30 22:04:06 +00:00
|
|
|
|
2001-07-30 11:38:20 +00:00
|
|
|
emsdriv.sys: emsdriv.sys.uu
|
|
|
|
uudecode ${.CURDIR}/emsdriv.sys.uu
|
|
|
|
|
2001-07-26 11:04:08 +00:00
|
|
|
font8x8.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
|
|
|
|
uudecode -p ${.ALLSRC} | \
|
2001-07-24 11:44:20 +00:00
|
|
|
file2c 'u_int8_t font8x8[] = {' '};' > ${.TARGET}
|
|
|
|
|
2001-07-30 11:38:20 +00:00
|
|
|
font8x14.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x14.fnt
|
2001-07-26 11:04:08 +00:00
|
|
|
uudecode -p ${.ALLSRC} | \
|
2001-07-24 11:44:20 +00:00
|
|
|
file2c 'u_int8_t font8x14[] = {' '};' > ${.TARGET}
|
|
|
|
|
2001-07-30 11:38:20 +00:00
|
|
|
font8x16.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x16.fnt
|
2001-07-26 11:04:08 +00:00
|
|
|
uudecode -p ${.ALLSRC} | \
|
2001-07-24 11:44:20 +00:00
|
|
|
file2c 'u_int8_t font8x16[] = {' '};' > ${.TARGET}
|
|
|
|
|
2000-06-23 08:57:17 +00:00
|
|
|
redir.com: redir.com.uu
|
|
|
|
uudecode ${.CURDIR}/redir.com.uu
|
|
|
|
|
1997-12-16 16:36:43 +00:00
|
|
|
# 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.
|
1999-01-22 12:45:27 +00:00
|
|
|
NEED_LIBNAMES= yes
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-12-16 16:36:43 +00:00
|
|
|
.include <bsd.prog.mk>
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1998-09-24 01:11:45 +00:00
|
|
|
.if ${OBJFORMAT} == "aout"
|
1997-12-16 16:36:43 +00:00
|
|
|
# This must be after bsd.prog.mk is included so that ${OBJS} in the
|
|
|
|
# dependency gets expanded.
|
|
|
|
doscmd.kernel: crt0.o ${OBJS} ${DPADD}
|
1999-02-17 13:48:07 +00:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -static -nostdlib -Wl,-N,-T,110000 \
|
|
|
|
-o doscmd.kernel crt0.o ${OBJS} ${LDADD}
|
1998-09-24 01:11:45 +00:00
|
|
|
.endif
|