* Allow nrelease/Makefile to build the local installer in usr.sbin
[dragonfly.git] / usr.sbin / installer / dfuife_curses / Makefile
1 #
2 # $DragonFly: src/usr.sbin/installer/dfuife_curses/Makefile,v 1.2 2008/03/25 22:55:38 dave Exp $
3
4 BSDINS_DIR=${.CURDIR}/../../../contrib/bsdinstaller-1.1.6
5 BSDINS_SRC=${BSDINS_DIR}/src
6
7 PATCHES= 
8
9 .PATH: ${BSDINS_SRC}/frontends/ncurses
10
11 BINDIR= /usr/sbin
12
13 PROG=   dfuife_curses
14 MAN=     
15 SRCS=   curses_bar.c curses_form.c curses_util.c curses_widget.c curses_xlat.c main.c \
16         aura.h dfui.h installer.h ${PATCHES}
17 BINOWN= root
18 BINGRP= wheel
19
20 CFLAGS+= -I${BSDINS_SRC}/frontends/ncurses -I. -g
21
22 DPADD+= ${LIBPANEL} ${LIBNCURSES}
23 LDADD+= -lpanel -lncurses
24
25 # This madness is because the installer sources reference aura includes
26 # as <aura/mem.h> rather than <libaura/mem.h>
27 aura.h:
28         ${LN} -sf ${BSDINS_SRC}/lib/libaura aura
29         /usr/bin/touch aura.h
30
31 dfui.h:
32         ${LN} -sf ${BSDINS_SRC}/lib/libdfui dfui
33         /usr/bin/touch dfui.h
34
35 installer.h:
36         ${LN} -sf ${BSDINS_SRC}/lib/libinstaller installer
37         /usr/bin/touch installer.h
38
39 CLEANFILES+=    aura.h aura dfui.h dfui installer.h installer
40
41 .if exists(${.OBJDIR}/../libaura)
42 LIBAURADIR:=      ${.OBJDIR}/../libaura
43 .else
44 LIBAURADIR!=      cd ${.CURDIR}/../libaura; make -V .OBJDIR
45 .endif
46 LIBAURA:=         ${LIBAURADIR}/libaura.a
47
48 .if exists(${.OBJDIR}/../libdfui)
49 LIBDFUIDIR:=      ${.OBJDIR}/../libdfui
50 .else
51 LIBDFUIDIR!=      cd ${.CURDIR}/../libdfui; make -V .OBJDIR
52 .endif
53 LIBDFUI:=         ${LIBDFUIDIR}/libdfui.a
54
55 .if exists(${.OBJDIR}/../libinstaller)
56 LIBINSTALLERDIR:=      ${.OBJDIR}/../libinstaller
57 .else
58 LIBINSTALLERDIR!=      cd ${.CURDIR}/../libinstaller; make -V .OBJDIR
59 .endif
60 LIBINSTALLER:=         ${LIBINSTALLERDIR}/libinstaller.a
61
62 DPADD+= ${LIBAURA} ${LIBDFUI} ${LIBINSTALLER}
63 LDADD+= -L${LIBAURADIR} -L${LIBDFUIDIR} -L${LIBINSTALLERDIR} -linstaller -ldfui -laura
64
65 .include <bsd.prog.mk>