1 # Makefile for libinstaller.
2 # $Id: Makefile,v 1.26 2005/04/05 19:40:47 cpressey Exp $
4 OSTYPE!=sysctl -n kern.ostype
9 SONAME= lib${LIB}.so.${LIB_VER}
12 OBJS= commands.o confed.o diskutil.o functions.o \
13 mount.o package.o survey.o uiutil.o
15 WARNS= -W -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
16 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
17 -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
18 -Winline -Wnested-externs -Wredundant-decls
20 CFLAGS+=${WARNS} -I/usr/local/include
21 CFLAGS+=-I/usr/src/lib -I/usr/src/lib/libcaps/${MACHINE_ARCH} -DSMP
26 LDADD= -L/usr/local/lib/ -laura -ldfui
28 .if ${OSTYPE} == "NetBSD"
29 CFLAGS+= -I/usr/pkg/include
30 LDADD+= -L/usr/pkg/lib
35 all: ${SONAME} ${ANAME}
37 # To build this straight from a checkout of the CVS tree, *without* first
38 # installing the support libraries, do a 'make in_cvs'. This causes
39 # search paths and symbolic links to be set up so that the build process
40 # can find the needed header files and libraries.
43 cd ../libaura && ${MAKE} in_cvs
44 ln -sf ../libaura aura
45 cd ../libdfui && ${MAKE} in_cvs
46 ln -sf ../libdfui dfui
51 LDADD+= -L../libaura -L../libdfui
54 # Main targets, shared and static:
57 ${CC} ${CFLAGS} ${OBJS} -static ${LDADD} -shared -o ${SONAME}
58 ln -sf ${SONAME} ${SOLINK}
61 ar rc ${ANAME} ${OBJS}
66 rm -rf *.o *.so *.so.? *.So *.a