1997-08-09 01:52:58 +00:00
|
|
|
# from BSDI Makefile,v 2.6 1996/04/08 20:06:40 bostic Exp
|
|
|
|
#
|
1997-12-16 16:36:43 +00:00
|
|
|
# $Id: Makefile,v 1.8 1997/09/30 22:03:34 jlemon Exp $
|
1997-08-09 01:52:58 +00:00
|
|
|
|
|
|
|
PROG= doscmd
|
1997-08-15 23:41:26 +00:00
|
|
|
SRCS= AsyncIO.c ParseBuffer.c bios.c callback.c cpu.c dos.c cmos.c config.c \
|
1997-09-30 22:04:06 +00:00
|
|
|
cwd.c debug.c disktab.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 xms.c
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-09-30 22:04:06 +00:00
|
|
|
CLEANFILES= doscmd.kernel crt0.o doscmd_loader.o redir.com emsdriv.sys
|
1997-08-09 01:52:58 +00:00
|
|
|
|
|
|
|
BINGRP= kmem
|
|
|
|
EXEGRP= bin
|
|
|
|
BINMODE=2555
|
|
|
|
EXEMODE=444
|
|
|
|
|
1997-08-28 18:23:40 +00:00
|
|
|
.if exists(${X11BASE}/include) && exists(${X11BASE}/lib/libX11.a)
|
1997-08-18 18:48:33 +00:00
|
|
|
CFLAGS+= -I. -I${X11BASE}/include -DDISASSEMBLER
|
1997-12-16 16:36:43 +00:00
|
|
|
LDADD= -L${X11BASE}/lib -lX11
|
|
|
|
DPADD= ${X11BASE}/lib/libX11.a
|
1997-08-18 18:48:33 +00:00
|
|
|
.else
|
|
|
|
CFLAGS+= -I. -DDISASSEMBLER -DNO_X
|
|
|
|
.endif
|
1997-12-16 16:36:43 +00:00
|
|
|
LDADD+= -lgcc -lc
|
|
|
|
DPADD+= ${LIBGCC} ${LIBC}
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-12-16 16:36:43 +00:00
|
|
|
beforeinstall:
|
1997-08-09 01:52:58 +00:00
|
|
|
install ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
|
|
|
|
doscmd.kernel ${DESTDIR}/usr/libexec/doscmd.kernel
|
|
|
|
install -c -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
|
1997-09-30 22:04:06 +00:00
|
|
|
redir.com ${DESTDIR}/usr/libdata/doscmd/
|
|
|
|
install -c -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
|
|
|
|
emsdriv.sys ${DESTDIR}/usr/libdata/doscmd/
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-12-16 16:36:43 +00:00
|
|
|
doscmd: ${LIBCRT0} doscmd_loader.o ${LIBGCC} ${LIBC}
|
|
|
|
ld -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: doscmd.kernel emsdriv.sys redir.com
|
1997-08-09 01:52:58 +00:00
|
|
|
|
1997-09-30 22:04:06 +00:00
|
|
|
redir.com: redir.com.uu
|
|
|
|
uudecode ${.CURDIR}/redir.com.uu
|
|
|
|
|
|
|
|
emsdriv.sys: emsdriv.sys.uu
|
|
|
|
uudecode ${.CURDIR}/emsdriv.sys.uu
|
1997-08-09 02:08:32 +00:00
|
|
|
|
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.
|
|
|
|
.include <bsd.libnames.mk>
|
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
|
|
|
|
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}
|
1997-08-18 18:48:33 +00:00
|
|
|
ld -N -Bstatic -T 110000 -o doscmd.kernel ${LDFLAGS} \
|
|
|
|
crt0.o ${OBJS} ${LDADD}
|