1 # $NetBSD: defs.Linux.mk,v 1.75 2004/08/27 06:29:09 jlam Exp $
3 # Variable definitions for the Linux operating system.
6 .if exists(/bin/basename)
7 BASENAME?= /bin/basename
8 .elif exists(/usr/bin/basename)
9 BASENAME?= /usr/bin/basename
24 DIRNAME?= /usr/bin/dirname
25 ECHO?= echo # Shell builtin
27 .if exists(/bin/egrep)
29 .elif exists(/usr/bin/egrep)
30 EGREP?= /usr/bin/egrep
33 FALSE?= false # Shell builtin
34 .if exists(/bin/fgrep)
36 .elif exists(/usr/bin/fgrep)
37 FGREP?= /usr/bin/fgrep
39 FILE_CMD?= /usr/bin/file
41 .if exists(/usr/bin/make)
43 _TOOLS_OPSYS_HAS_GNU.make+= ${MACHINE_PLATFORM}
45 GMAKE?= ${LOCALBASE}/bin/gmake
49 .elif exists(/usr/bin/grep)
53 .if exists(/usr/bin/gunzip)
54 GUNZIP_CMD?= /usr/bin/gunzip -f
56 GUNZIP_CMD?= /bin/gunzip -f
58 .if exists(/usr/bin/gzip)
59 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
61 GZIP_CMD?= /bin/gzip -nf ${GZIP}
70 HOSTNAME_CMD?= /bin/hostname
72 IMAKE?= ${X11BASE}/bin/imake ${IMAKEOPTS}
73 IMAKEOPTS+= -DBuildHtmlManPages=NO
74 LDCONFIG?= /sbin/ldconfig
79 MAIL_CMD?= /bin/mail # RH, Mandrake
81 MAIL_CMD?= /usr/bin/mail # Debian, Slackware, SuSE
84 MTREE?= ${LOCALBASE}/sbin/mtree
91 PATCH?= /usr/bin/patch
92 PAX?= ${LOCALBASE}/bin/pax
93 PERL5?= ${LOCALBASE}/bin/perl
96 PWD_CMD?= /bin/pwd # needs to print physical path
99 # XXX: default from bsd.pkg.defaults.mk. Verify/corerct for this platform
100 # and remove this comment.
104 .elif exists(/usr/bin/sed)
107 SETENV?= /usr/bin/env
109 SHLOCK= ${LOCALBASE}/bin/shlock
110 .if exists(/bin/sort)
117 TAR?= ${LOCALBASE}/bin/tar
119 TEST?= test # Shell builtin
120 .if exists(/bin/touch)
123 TOUCH?= /usr/bin/touch
126 TRUE?= true # Shell builtin
127 TSORT?= /usr/bin/tsort
128 TYPE?= type # Shell builtin
130 XARGS?= /usr/bin/xargs -r
132 CPP_PRECOMP_FLAGS?= # unset
134 DEFAULT_SERIAL_DEVICE?= /dev/null
135 EXPORT_SYMBOLS_LDFLAGS?= # Don't add symbols to the dynamic symbol table
136 GROUPADD?= /usr/sbin/groupadd
137 MOTIF_TYPE_DEFAULT?= openmotif # default 2.0 compatible libs type
139 PKG_TOOLS_BIN?= ${LOCALBASE}/sbin
140 ROOT_CMD?= ${SU} - root -c
143 SERIAL_DEVICES?= /dev/null
144 ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
145 ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
146 ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
147 USERADD?= /usr/sbin/useradd
149 # imake installs manpages in weird places
150 # these values from /usr/X11R6/lib/X11/config/linux.cf
151 IMAKE_MAN_SOURCE_PATH= man/man
153 IMAKE_LIBMAN_SUFFIX= 3x
154 IMAKE_KERNMAN_SUFFIX= 4
155 IMAKE_FILEMAN_SUFFIX= 5x
156 IMAKE_MISCMAN_SUFFIX= 7
157 IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
158 IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
159 IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4
160 IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
161 IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7
162 IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX}
164 _DO_SHLIB_CHECKS= no # on installation, fixup PLIST for shared libs
165 _IMAKE_MAKE= ${MAKE} # program which gets invoked by imake
166 .if exists(/usr/include/netinet6) || exists(/usr/include/linux/in6.h)
167 _OPSYS_HAS_INET6= yes # IPv6 is standard
169 _OPSYS_HAS_INET6= no # IPv6 is not standard
171 _OPSYS_HAS_JAVA= no # Java is not standard
172 _OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
173 _OPSYS_HAS_OSSAUDIO= no # libossaudio is available
174 _OPSYS_PERL_REQD= # no base version of perl required
175 _OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
176 _OPSYS_SHLIB_TYPE= ELF/a.out # shared lib type
177 _PATCH_CAN_BACKUP= yes # native patch(1) can make backups
178 _PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix
179 _PREFORMATTED_MAN_DIR= cat # directory where catman pages are
180 _USE_GNU_GETTEXT= no # Don't use GNU gettext
181 _USE_RPATH= yes # add rpath to LDFLAGS
183 # flags passed to the linker to extract all symbols from static archives.
185 _OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
186 _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
188 .if !defined(DEBUG_FLAGS)
189 _STRIPFLAG_CC?= -s # cc(1) option to strip
190 _STRIPFLAG_INSTALL?= -s # install(1) option to strip
193 LOCALBASE?= ${DESTDIR}/usr/pkg
195 # check for maximum command line length and set it in configure's environment,
196 # to avoid a test required by the libtool script that takes forever.
197 # FIXME: Adjust to work on this system and enable the lines below.
198 #.if defined(GNU_CONFIGURE) && defined(USE_LIBTOOL)
199 #_OPSYS_MAX_CMDLEN!= /sbin/sysctl -n kern.argmax
200 #CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN}
203 # If games are to be installed setgid, then SETGIDGAME is set to 'yes'
204 # (it defaults to 'no' as per bsd.pkg.defaults.mk).
205 # Set the group and mode to meaningful values in that case (defaults to
206 # BINOWN, BINGRP and BINMODE as per bsd.pkg.defaults.mk).
207 # FIXME: Adjust to work on this system and enable the lines below.
208 #.if !(empty(SETGIDGAME:M[yY][eE][sS]))