1 # $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.10 2002/07/22 14:21:50 ru Exp $
3 # Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
6 # - We don't use the libc strerror/sys_errlist because the string table is
18 # Mostly OK, some of the libc imports are a bit noisy
19 CFLAGS
+= -ffreestanding
21 .if
${MACHINE_ARCH} == "x86_64"
23 CFLAGS
+= -mpreferred-stack-boundary
=2
25 CFLAGS
+= -mno-mmx
-mno-3dnow
-mno-sse
-mno-sse2
-mno-sse3
-msoft-float
29 .if
${MACHINE_ARCH} == "x86_64"
33 # standalone components and stuff we have modified locally
34 SRCS
+= __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
35 globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
36 sbrk.c twiddle.c zalloc.c zalloc_malloc.c
38 # private (pruned) versions of libc string functions
41 # string functions from libc
42 .PATH
: ${.CURDIR
}/..
/libc
/string
43 .if
${MACHINE_ARCH} == "x86_64"
44 SRCS
+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
45 memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
46 strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
47 strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
49 .PATH
: ${.CURDIR
}/..
/..
/sys
/libkern
53 .if
${MACHINE_ARCH} == "x86_64"
54 .PATH
: ${.CURDIR
}/i386
57 # really only required for i386
58 CFLAGS
+=-I
${.CURDIR
}/..
/libc
/${MACHINE_ARCH}
61 # decompression functionality from libbz2
62 BZ2DIR
= ${.CURDIR
}/..
/..
/contrib
/bzip2
64 CFLAGS
+=-I
${BZ2DIR} -DBZ_NO_STDIO
-DBZ_NO_COMPRESS
65 SRCS
+= bzlib.c crctable.c decompress.c huffman.c randtable.c bzlib.h \
68 # check your belt - ugly bzip2 stuff ahead
72 ${file}: ${BZ2DIR}/${file} ${file}.diff
73 patch
-o
${.TARGET
} < ${.ALLSRC
:M
*.diff
} ${.ALLSRC
:M
*.
[ch
]}
76 .
include "../libz/Makefile.stand"
79 SRCS
+= closeall.c dev.c ioctl.c nullfs.c stat.c \
80 fstat.c close.c lseek.c open.c read.c write.c readdir.c
83 SRCS
+= arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c
85 # network info services:
86 SRCS
+= bootp.c rarp.c bootparam.c
89 SRCS
+= ufs.c nfs.c cd9660.c tftp.c zipfs.c bzipfs.c gzipfs.c
91 SRCS
+= dosfs.c ext2fs.c
98 .if
${MACHINE_ARCH} == "x86_64"