Makefile revision 87866
1696Ssundar# $Id: Makefile,v 1.12 2001/04/16 04:34:26 bp Exp $ 2696Ssundar# 3696Ssundar# Valid targets: 4877Sattila# install installs binaries and man pages 5696Ssundar# deinstall undo install (except man pages) 6696Ssundar# install-src copy .h files in /usr/local/include 7696Ssundar# install-lib copy lib files in /usr/lib 8877Sattila# deinstall-lib, 9696Ssundar# deinstall-src undo corresponding install-* target 10696Ssundar# clean cleanup source tree 11696Ssundar 12696Ssundar.if ${MACHINE_ARCH} != "i386" 13696Ssundar. error "only IA32 machines supported" 14877Sattila.endif 15696Ssundar 16696SsundarCONFIG_INT?= config.int 17696SsundarCONFIG_MK?= config.mk 18877Sattila 19696SsundarCFGDEPEND= 20696Ssundar 21696Ssundar.ifmake !configure && !clean 22696Ssundar. if !exists(${CONFIG_INT}) 23696Ssundar. error "Run 'make configure' before build" 24696Ssundar. else 25696Ssundar. include "${CONFIG_INT}" 26696Ssundar. endif 27696Ssundar.else 28696Ssundar. if exists(${CONFIG_MK}) 29696SsundarCFGDEPEND= ${CONFIG_MK} 30696Ssundar 31696Ssundar${CONFIG_MK}: config.mk.in 32696Ssundar @echo Your ${CONFIG_MK} file is older than the config.mk.in file 33696Ssundar @echo Please check for possible changes 34 @false 35 36. include "${CONFIG_MK}" 37. endif 38.endif 39 40BUILDKLD?=yes 41PREFIX?=/usr/local 42SYSDIR?=/usr/src/sys 43 44configure:: 45.if ${CFGDEPEND} == ${CONFIG_MK} 46 @echo Using ${CFGDEPEND} file... 47.endif 48 echo PREFIX= ${PREFIX} > ${CONFIG_INT} 49 echo SYSDIR=${SYSDIR} >> ${CONFIG_INT} 50 echo KMODDIR=${KMODDIR} >> ${CONFIG_INT} 51 echo SINGLEKLD=yes >> ${CONFIG_INT} 52.if !defined(WITHOUT_CRYPT) 53 echo ENCRYPTED_PASSWD=yes >> ${CONFIG_INT} 54.endif 55.if defined(SMP_SUPPORT) || defined(SMP) 56 echo SMP=yes >> ${CONFIG_INT} 57.endif 58 59SUBDIR= 60 61.if defined(COMPLETEBUILD) || (${BUILDKLD} == yes && !exists(${SYSDIR}/netsmb/smb.h)) 62SUBDIR+= kernel/modules 63.endif 64 65SUBDIR+= lib 66 67SUBDIR+= mount_smbfs smbutil 68 69install-src install-lib deinstall-lib deinstall-src: 70 cd kernel && make ${.TARGET} 71 cd lib && make ${.TARGET} 72 73 74makedev: 75 @-( if [ `mount -t devfs | wc -l` = 0 ]; then \ 76 cd /dev && && rm -f nsmb* && mknod nsmb0 c 144 0; \ 77 else \ 78 echo This operation is not required with devfs; \ 79 fi; \ 80 ) 81 82cleandepend deinstall: _SUBDIRUSE 83 84clean: _SUBDIRUSE 85 rm -f ${CONFIG_INT} 86 87.include <bsd.subdir.mk> 88