Move the doscmd: depdendancy to after the .include so it does not
[dragonfly.git] / usr.bin / doscmd / Makefile
1 # from BSDI Makefile,v 2.6 1996/04/08 20:06:40 bostic Exp
2 #
3 # $FreeBSD: src/usr.bin/doscmd/Makefile,v 1.21.2.5 2002/08/07 16:32:01 ru Exp $
4 # $DragonFly: src/usr.bin/doscmd/Makefile,v 1.4 2004/12/20 19:24:38 dillon Exp $
5
6 PROG=   doscmd
7 SRCS=   AsyncIO.c ParseBuffer.c bios.c callback.c cmos.c config.c cpu.c cwd.c \
8         debug.c disktab.c dos.c doscmd.c ems.c emuint.c exe.c i386-pinsn.c \
9         int.c int10.c int13.c int14.c int16.c int17.c int1a.c int2f.c intff.c \
10         mem.c mouse.c net.c port.c setver.c signal.c timer.c trace.c trap.c \
11         tty.c video.c xms.c ${FONTHDRS}
12 CFLAGS+=        -I. -DDISASSEMBLER
13 FONTFILES=      cp437-8x8.pcf.gz cp437-8x14.pcf.gz cp437-8x16.pcf.gz
14 FONTHDRS=       font8x8.h font8x14.h font8x16.h
15 CLEANFILES=     ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
16
17 XINCDIR=        ${DESTDIR}${X11BASE}/include
18 XLIBDIR=        ${DESTDIR}${X11BASE}/lib
19
20 EXEGRP:=        ${BINGRP}
21 EXEMODE=        ${NOBINMODE}
22 #BINGRP=                kmem
23 #BINMODE=       2555
24
25 .if !defined(NO_X) && exists(${XINCDIR}/X11/X.h) && exists(${XLIBDIR}/libX11.a)
26 CFLAGS+=        -I${XINCDIR}
27 LDADD+=         -L${XLIBDIR} -lX11
28 DPADD+=         ${XLIBDIR}/libX11.a
29 .else
30 CFLAGS+=        -DNO_X
31 .endif
32
33 beforeinstall:
34         ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
35             emsdriv.sys redir.com ${DESTDIR}/usr/libdata/doscmd/
36         ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
37             ${FONTFILES} ${DESTDIR}/usr/libdata/doscmd/fonts
38         cd ${.CURDIR} && \
39             ${INSTALL} -o ${BINOWN} -g ${EXEGRP} -m ${SHAREMODE} \
40                 fonts.dir ${DESTDIR}/usr/libdata/doscmd/fonts
41
42 cp437-8x8.pcf.gz: cp437-8x8.pcf.gz.uu
43         uudecode ${.CURDIR}/cp437-8x8.pcf.gz.uu
44
45 cp437-8x14.pcf.gz: cp437-8x14.pcf.gz.uu
46         uudecode ${.CURDIR}/cp437-8x14.pcf.gz.uu
47
48 cp437-8x16.pcf.gz: cp437-8x16.pcf.gz.uu
49         uudecode ${.CURDIR}/cp437-8x16.pcf.gz.uu
50
51 emsdriv.sys: emsdriv.sys.uu
52         uudecode ${.CURDIR}/emsdriv.sys.uu
53
54 font8x8.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x8.fnt
55         uudecode -p ${.ALLSRC} | \
56                 file2c 'u_int8_t font8x8[] = {' '};' > ${.TARGET}
57
58 font8x14.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x14.fnt
59         uudecode -p ${.ALLSRC} | \
60                 file2c 'u_int8_t font8x14[] = {' '};' > ${.TARGET}
61
62 font8x16.h: ${.CURDIR}/../../share/syscons/fonts/cp437-8x16.fnt
63         uudecode -p ${.ALLSRC} | \
64                 file2c 'u_int8_t font8x16[] = {' '};' > ${.TARGET}
65
66 redir.com: redir.com.uu
67         uudecode ${.CURDIR}/redir.com.uu
68
69 # Make sure the library names are defined.  We want to specify the full
70 # path to the standard crt0.o, and building two binaries in one directory
71 # breaks the automatic generation of dependencies for binaries.
72 NEED_LIBNAMES=  yes
73
74 .include <bsd.prog.mk>
75
76 # add dependancy after inclusion so we do not override the ${PROG}: target.
77 #
78 doscmd: ${FONTFILES} ${FONTHDRS} emsdriv.sys redir.com
79