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