]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libstand/Makefile
This commit was generated by cvs2svn to compensate for changes in r102729,
[FreeBSD/FreeBSD.git] / lib / libstand / Makefile
1 # $FreeBSD$
2 # Originally from       $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
3 #
4 # Notes:
5 # - We don't use the libc strerror/sys_errlist because the string table is
6 #   quite large.
7 #
8
9 LIB=            stand
10 NOPROFILE=      YES
11 NOPIC=          YES
12 INCS=           stand.h
13 MAN=            libstand.3
14
15 CFLAGS+= -ffreestanding -Wformat
16 CFLAGS+= -I${.CURDIR}
17
18 .if ${MACHINE_ARCH} == "alpha"
19 CFLAGS+=        -mno-fp-regs
20 .endif
21 .if ${MACHINE_ARCH} == "i386"
22 CFLAGS+=        -mpreferred-stack-boundary=2
23 .endif
24 .if ${MACHINE_ARCH} == "powerpc"
25 CFLAGS+=        -msoft-float
26 .endif
27
28 # standalone components and stuff we have modified locally
29 SRCS+=  zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
30         globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
31         sbrk.c twiddle.c zalloc.c zalloc_malloc.c
32
33 # private (pruned) versions of libc string functions
34 SRCS+=  strcasecmp.c
35
36 # byte order functions from libc
37 .PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/net
38 SRCS+= htons.S ntohs.S htonl.S ntohl.S
39
40 # string functions from libc
41 .PATH:  ${.CURDIR}/../libc/string
42 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
43         ${MACHINE_ARCH} == "sparc64"
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
48 .endif
49 .if ${MACHINE_ARCH} == "alpha"
50 .PATH: ${.CURDIR}/../libc/alpha/string
51 SRCS+=  bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
52         memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
53         strcmp.c strcpy.c strcspn.c strlen.c \
54         strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
55         strspn.c strstr.c strtok.c swab.c
56
57 SRCS+= __divqu.S __divq.S __divlu.S __divl.S
58 SRCS+= __remqu.S __remq.S __remlu.S __reml.S
59
60 CLEANFILES+=   __divqu.S __divq.S __divlu.S __divl.S
61 CLEANFILES+=   __remqu.S __remq.S __remlu.S __reml.S
62
63
64 __divqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
65         m4 -DNAME=__divqu -DOP=div -DS=false -DWORDSIZE=64 \
66                 ${.ALLSRC} > ${.TARGET}
67
68 __divq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
69         m4 -DNAME=__divq -DOP=div -DS=true -DWORDSIZE=64 \
70                 ${.ALLSRC} > ${.TARGET}
71
72 __divlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
73         m4 -DNAME=__divlu -DOP=div -DS=false -DWORDSIZE=32 \
74                 ${.ALLSRC} > ${.TARGET}
75
76 __divl.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
77         m4 -DNAME=__divl -DOP=div -DS=true -DWORDSIZE=32 \
78                 ${.ALLSRC} > ${.TARGET}
79
80 __remqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
81         m4 -DNAME=__remqu -DOP=rem -DS=false -DWORDSIZE=64 \
82                 ${.ALLSRC} > ${.TARGET}
83
84 __remq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
85         m4 -DNAME=__remq -DOP=rem -DS=true -DWORDSIZE=64 \
86                 ${.ALLSRC} > ${.TARGET}
87
88 __remlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
89         m4 -DNAME=__remlu -DOP=rem -DS=false -DWORDSIZE=32 \
90                 ${.ALLSRC} > ${.TARGET}
91
92 __reml.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
93         m4 -DNAME=__reml -DOP=rem -DS=true -DWORDSIZE=32 \
94                 ${.ALLSRC} > ${.TARGET}
95 .endif
96 .if ${MACHINE_ARCH} == "ia64"
97 .PATH: ${.CURDIR}/../libc/ia64/string
98 SRCS+=  bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
99         memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
100         strcmp.c strcpy.c strcspn.c strlen.c \
101         strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
102         strspn.c strstr.c strtok.c swab.c
103
104 .PATH: ${.CURDIR}/../libc/ia64/gen
105 SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S
106 SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S
107 .endif
108
109 # _setjmp/_longjmp
110 .PATH:  ${.CURDIR}/${MACHINE_ARCH}
111 SRCS+=  _setjmp.S
112
113 # decompression functionality from libbz2
114 .PATH:  ${.CURDIR}/../../contrib/bzip2
115 CFLAGS+=-I. -DBZ_NO_STDIO -DBZ_NO_COMPRESS
116 SRCS+=  _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c _bzlib.h \
117         _bzlib_private.h
118
119 # check your belt - ugly bzip2 stuff ahead
120 .for file in bzlib.c bzlib.h bzlib_private.h
121 CLEANFILES+=   _${file} _${file}.orig
122
123 _${file}: ${file} ${file}.diff
124         patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
125 .endfor
126
127 .for file in crctable.c decompress.c huffman.c randtable.c
128 CLEANFILES+=    _${file}
129
130 _${file}: ${file}
131         sed "s|bzlib_private\.h|_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
132 .endfor
133
134 # decompression functionality from libz
135 .PATH:  ${.CURDIR}/../libz
136 CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz
137 SRCS+=  adler32.c crc32.c _infblock.c _infcodes.c _inffast.c _inflate.c \
138         _inftrees.c _infutil.c _zutil.c _zutil.h
139
140 # aargh
141 .for file in zutil.h
142 CLEANFILES+=    _${file} _${file}.orig
143
144 _${file}: ${file} ${file}.diff
145         patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
146 .endfor
147
148 .for file in infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c zutil.c
149 _${file}: ${file}
150         sed "s|zutil\.h|_zutil.h|" ${.ALLSRC} > ${.TARGET}
151 .endfor
152
153 # io routines
154 SRCS+=  closeall.c dev.c ioctl.c nullfs.c stat.c \
155         fstat.c close.c lseek.c open.c read.c write.c readdir.c
156
157 # network routines
158 SRCS+=  arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c
159
160 # network info services:
161 SRCS+=  bootp.c rarp.c bootparam.c
162
163 # boot filesystems
164 SRCS+=  ufs.c nfs.c cd9660.c tftp.c zipfs.c bzipfs.c
165 SRCS+=  netif.c nfs.c
166 SRCS+=  dosfs.c ext2fs.c
167 SRCS+=  splitfs.c
168
169 .include <bsd.lib.mk>