Makefile revision 39203
1# $Id: Makefile,v 1.2 1998/08/20 08:23:12 msmith Exp $ 2# 3# Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ 4# 5# Notes: 6# - We don't use the libc strerror/sys_errlist because the string table is 7# quite large. 8# 9 10LIB= stand 11NOPROFILE= YES 12NOPIC= YES 13MAN3= libstand.3 14 15# Mostly OK, some of the libc imports are a bit noisy 16CFLAGS+= -Wall 17 18.if ${MACHINE_ARCH} == "alpha" 19CFLAGS+= -mno-fp-regs 20.endif 21 22# standalone components and stuff we have modified locally 23SRCS+= __main.c alloc.c bcd.c bswap.c environment.c getopt.c gets.c \ 24 globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \ 25 twiddle.c 26 27# string functions from libc 28.PATH: ${.CURDIR}/../libc/string 29.if ${MACHINE_ARCH} == "i386" 30SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \ 31 memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c strchr.c \ 32 strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \ 33 strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c 34.endif 35.if ${MACHINE_ARCH} == "alpha" 36.PATH: ${.CURDIR}/../libc/alpha/string 37SRCS+= bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \ 38 memcpy.S memmove.S memset.c rindex.c strcasecmp.c strcat.c strchr.c \ 39 strcmp.c strcpy.c strcspn.c strlen.c \ 40 strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \ 41 strspn.c strstr.c strtok.c swab.c 42 43.PATH: ${.CURDIR}/../libc/alpha/net 44SRCS+= htons.S ntohs.S htonl.S ntohl.S 45 46SRCS+= __divqu.S __divq.S __divlu.S __divl.S 47SRCS+= __remqu.S __remq.S __remlu.S __reml.S 48 49CLEANFILES+= __divqu.S __divq.S __divlu.S __divl.S 50CLEANFILES+= __remqu.S __remq.S __remlu.S __reml.S 51 52 53__divqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 54 m4 -DNAME=__divqu -DOP=div -DS=false -DWORDSIZE=64 \ 55 ${.ALLSRC} > ${.TARGET} 56 57__divq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 58 m4 -DNAME=__divq -DOP=div -DS=true -DWORDSIZE=64 \ 59 ${.ALLSRC} > ${.TARGET} 60 61__divlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 62 m4 -DNAME=__divlu -DOP=div -DS=false -DWORDSIZE=32 \ 63 ${.ALLSRC} > ${.TARGET} 64 65__divl.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 66 m4 -DNAME=__divl -DOP=div -DS=true -DWORDSIZE=32 \ 67 ${.ALLSRC} > ${.TARGET} 68 69__remqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 70 m4 -DNAME=__remqu -DOP=rem -DS=false -DWORDSIZE=64 \ 71 ${.ALLSRC} > ${.TARGET} 72 73__remq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 74 m4 -DNAME=__remq -DOP=rem -DS=true -DWORDSIZE=64 \ 75 ${.ALLSRC} > ${.TARGET} 76 77__remlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 78 m4 -DNAME=__remlu -DOP=rem -DS=false -DWORDSIZE=32 \ 79 ${.ALLSRC} > ${.TARGET} 80 81__reml.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4 82 m4 -DNAME=__reml -DOP=rem -DS=true -DWORDSIZE=32 \ 83 ${.ALLSRC} > ${.TARGET} 84.endif 85 86# network support from libc 87.PATH: ${.CURDIR}/../libc/net 88SRCS+= inet_ntoa.c inet_addr.c 89 90# decompression functionality from libz 91.PATH: ${.CURDIR}/../libz 92CFLAGS+=-DHAVE_MEMCPY 93SRCS+= adler32.c crc32.c infblock.c infcodes.c inffast.c inflate.c \ 94 inftrees.c infutil.c zutil.c 95 96# io routines 97SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \ 98 fstat.c close.c lseek.c open.c read.c write.c 99 100# network routines 101SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c 102 103# network info services: 104SRCS+= bootp.c rarp.c bootparam.c 105 106# boot filesystems 107SRCS+= ufs.c nfs.c cd9660.c tftp.c zipfs.c 108SRCS+= netif.c nfs.c 109# needs "open directory" support 110#SRCS+= dosfs.c 111 112beforeinstall: 113 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/stand.h \ 114 ${DESTDIR}/usr/include 115 116.include <bsd.lib.mk> 117