Add HAMMER support to the installer
[dragonfly.git] / contrib / bsdinstaller-1.1.6 / src / backend / installer / Makefile
CommitLineData
337ad0df
DH
1# $Id: Makefile,v 1.26 2005/04/05 19:40:46 cpressey Exp $
2
3OSTYPE!=sysctl -n kern.ostype
4
5PROG= dfuibe_installer
971d1cca
MS
6OBJS= fn_disk.o fn_configure.o fn_diagnostic.o fn_subpart_hammer.o \
7 fn_subpart.o fn_install.o flow.o main.o
337ad0df
DH
8
9WARNS= -W -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
10 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
11 -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
12 -Winline -Wnested-externs -Wredundant-decls
13
14CFLAGS+=${WARNS} -I/usr/local/include
15.ifdef DEBUG
16CFLAGS+=-g -DDEBUG
17.endif
18LDADD= -L/usr/local/lib/ -laura -ldfui -linstaller
19
20.if ${OSTYPE} == "NetBSD"
21CFLAGS+= -I/usr/pkg/include
22LDADD+= -L/usr/pkg/lib
23.endif
24
25.if defined(WITH_NLS)
26# Localization (gettext)
27LOCALEDIR= /usr/local/share/locale
28PACKAGE= ${PROG}
29CFLAGS+= -DLOCALEDIR=\"${LOCALEDIR}\"
30CFLAGS+= -DPACKAGE=\"${PACKAGE}\"
31CFLAGS+= -DENABLE_NLS
32LDADD+= -lintl
33LANGUAGES= ru
34.endif
35
36# Default target:
37
38all: ${PROG} mo
39
40# To build this straight from a checkout of the CVS tree, *without* first
41# installing the support libraries, do a 'make in_cvs'. This causes
42# search paths and symbolic links to be set up so that the build process
43# can find the needed header files and libraries.
44
45in_cvs:
46 cd ../../lib/libaura && ${MAKE} in_cvs
47 ln -sf ../../lib/libaura aura
48 cd ../../lib/libdfui && ${MAKE} in_cvs
49 ln -sf ../../lib/libdfui dfui
50 cd ../../lib/libinstaller && ${MAKE} in_cvs
51 ln -sf ../../lib/libinstaller installer
52 ${MAKE} -DIN_CVS all
53
54.if defined(IN_CVS)
55CFLAGS+=-I.
56LDADD+= -L../../lib/libaura -L../../lib/libdfui -L../../lib/libinstaller
57.endif
58
59# Main target:
60
61${PROG}: ${OBJS}
62 ${CC} ${CFLAGS} ${OBJS} ${LDADD} -o ${PROG}
63
64# NLS (translated text) compilations:
65
66mo:
67 for _language in ${LANGUAGES}; do \
68 msgfmt -o po/$${_language}.mo po/$${_language}; \
69 done
70
71# Translator templates:
72
73pot:
74 xgettext -s --no-location --keyword=_ -o po/${PROG}.pot *.c
75
76# Cleaning up after ourselves:
77
78clean:
79 rm -f aura dfui installer
80 rm -rf ${PROG} *.o po/*.mo
81
82# Testing from within the CVS checkout.
83
84test: in_cvs
85 env LD_LIBRARY_PATH="../../lib/libaura:../../lib/libdfui:../../lib/libinstaller" ./${PROG}