fix copyright and condition notice for new sccs include
[unix-history] / usr / src / lib / libc / Makefile
CommitLineData
770d844a 1# @(#)Makefile 4.37 (Berkeley) %G%
1b597941 2#
770d844a
KB
3# All library objects contain sccsid strings by default; they may be
4# excluded as a space-saving measure. To produce a library that does
5# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
6# from CFLAGS below. To remove these strings from just the system call
7# stubs, remove just -DSYSLIBC_SCCS from CFLAGS.
8LIB=c
9CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS
10AINC= -I${.CURDIR}/${MACHINE} -I${.CURDIR}/sys/${MACHINE}
dff79c37 11
770d844a
KB
12.PATH: ${.CURDIR}/gen/${MACHINE} ${.CURDIR}/gen ${.CURDIR}/gen/regexp \
13 ${.CURDIR}/sys/${MACHINE} ${.CURDIR}/sys \
14 ${.CURDIR}/stdio/${MACHINE} ${.CURDIR}/stdio \
15 ${.CURDIR}/net/${MACHINE} ${.CURDIR}/net \
16 ${.CURDIR}/string/${MACHINE} ${.CURDIR}/string \
17 ${.CURDIR}/sys5/${MACHINE} ${.CURDIR}/sys5 \
18 ${.CURDIR}/compat-43/${MACHINE} ${.CURDIR}/compat-43
dff79c37 19
770d844a
KB
20# compat-43 sources
21SRCS= creat.c killpg.c sigcompat.c
dff79c37 22
770d844a
KB
23MAN2+= creat.0 killpg.0 sigblock.0 sigpause.0 sigsetmask.0 sigvec.0
24
25# gen sources
26SRCS+= _setjmp.s abort.c abs.s alarm.c alloca.s calloc.c cencode.c \
27 clock.c closedir.c crypt.c ctime.c ctype_.c difftime.c \
28 disklabel.c errlst.c execvp.c fabs.s fakcu.c fstab.c \
29 genbuildname.c getenv.c getgrent.c getlogin.c getmntinfo.c \
30 getpass.c getpwent.c getttyent.c getusershell.c getwd.c \
31 initgroups.c insque.s isatty.c isctype.c ldexp.s \
32 malloc.c modf.s nargs.s ndbm.c nice.c nlist.c opendir.c pause.c \
33 perror.c popen.c psignal.c qsort.c random.c readdir.c regerror.c \
34 regex.c regexp.c remove.c remque.s scandir.c seekdir.c setegid.c \
35 setenv.c seteuid.c setgid.c setjmp.s setjmperr.c setmode.c \
36 setrgid.c setruid.c setuid.c siglist.c signal.c sleep.c syslog.c \
37 system.c telldir.c termios.c time.c timezone.c ttyname.c \
38 ttyslot.c ualarm.c udiv.s urem.s usleep.c valloc.c wait.c \
39 wait3.c waitpid.c
40
41.if (${MACHINE} == "tahoe")
42SRCS+= frexp.c
43.elif (${MACHINE} == "vax")
44SRCS+= frexp.s
45.endif
46
47MAN3+= abort.0 alarm.0 cencode.0 clock.0 crypt.0 ctime.0 ctype.0 \
48 directory.0 execvp.0 frexp.0 genbuildname.0 getdiskbyname.0 \
49 getenv.0 getfsent.0 getgrent.0 getlogin.0 getmntinfo.0 \
50 getpass.0 getpwent.0 getttyent.0 getusershell.0 getwd.0 \
51 initgroups.0 insque.0 malloc.0 ndbm.0 nice.0 nlist.0 \
52 pause.0 perror.0 popen.0 psignal.0 qsort.0 random.0 regex.0 \
53 regexp.0 scandir.0 setjmp.0 setmode.0 setuid.0 siginterrupt.0 \
54 signal.0 sleep.0 syslog.0 system.0 time.0 ttyname.0 ualarm.0 \
55 usleep.0 valloc.0
56
57MLINKS= crypt.3 encrypt.3 crypt.3 setkey.3
58MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \
59 ctime.3 localtime.3 ctime.3 timezone.3 ctime.3 tzset.3
60MLINKS+=ctype.3 toascii.3 ctype.3 tolower.3 ctype.3 toupper.3 \
61 ctype.3 isalnum.3 ctype.3 isalpha.3 ctype.3 isascii.3 \
62 ctype.3 iscntrl.3 ctype.3 isdigit.3 ctype.3 isgraph.3 \
63 ctype.3 islower.3 ctype.3 isprint.3 ctype.3 ispunct.3 \
64 ctype.3 isspace.3 ctype.3 isupper.3 ctype.3 isxdigit.3
65MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \
66 directory.3 readdir.3 directory.3 rewinddir.3 directory.3 seekdir.3 \
67 directory.3 telldir.3
68MLINKS+=execvp.3 execle.3 execvp.3 execlp.3 execvp.3 exect.3 \
69 execvp.3 execv.3 execvp.3 execve.3 execvp.3 execl.3 \
70 execvp.3 exec.3
71MLINKS+=frexp.3 ldexp.3 frexp.3 modf.3
72MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
73MLINKS+=getfsent.3 endfsent.3 getfsent.3 getfsfile.3 getfsent.3 getfsspec.3 \
74 getfsent.3 getfstype.3 getfsent.3 setfsent.3
75MLINKS+=getgrent.3 endgrent.3 getgrent.3 setgroupent.3 getgrent.3 getgrgid.3 \
76 getgrent.3 getgrnam.3 getgrent.3 setgrent.3 getgrent.3 setgrfile.3
77MLINKS+=getpwent.3 endpwent.3 getpwent.3 setpassent.3 getpwent.3 getpwnam.3 \
78 getpwent.3 getpwuid.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3
79MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 getttyent.3 setttyent.3
80MLINKS+=getusershell.3 endusershell.3 getusershell.3 setusershell.3
81MLINKS+=insque.3 remque.3
82MLINKS+=malloc.3 alloca.3 malloc.3 calloc.3 malloc.3 free.3 malloc.3 realloc.3
83MLINKS+=ndbm.3 dbm_clearerr.3 ndbm.3 dbm_close.3 ndbm.3 dbm_delete.3 \
84 ndbm.3 dbm_error.3 ndbm.3 dbm_fetch.3 ndbm.3 dbm_firstkey.3 \
85 ndbm.3 dbm_nextkey.3 ndbm.3 dbm_open.3 ndbm.3 dbm_store.3
86MLINKS+=perror.3 strerror.3 perror.3 sys_errlist.3 perror.3 sys_nerr.3
87MLINKS+=popen.3 pclose.3
88MLINKS+=psignal.3 sys_siglist.3
89MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3
90MLINKS+=regex.3 re_comp.3 regex.3 re_exec.3 regexp.3 regcomp.3 \
91 regexp.3 regexec.3 regexp.3 regsub.3 regexp.3 regerror.3
92MLINKS+=scandir.3 alphasort.3
93MLINKS+=setjmp.3 _longjmp.3 setjmp.3 _setjmp.3 setjmp.3 longjmp.3
94MLINKS+=setuid.3 setegid.3 setuid.3 seteuid.3 setuid.3 setgid.3 \
95 setuid.3 setrgid.3 setuid.3 setruid.3
96MLINKS+=syslog.3 closelog.3 syslog.3 openlog.3 syslog.3 setlogmask.3 \
97 syslog.3 vsyslog.3
98MLINKS+=ttyname.3 isatty.3 ttyname.3 ttyslot.3
99MLINKS+=setmode.3 getmode.3
100
101# net sources
102SRCS+= gethostnamadr.c getnetbyaddr.c getnetbyname.c getnetent.c \
103 getproto.c getprotoent.c getprotoname.c getservbyname.c \
104 getservbyport.c getservent.c herror.c htonl.s htons.s \
105 inet_addr.c inet_lnaof.c inet_makeaddr.c inet_netof.c \
106 inet_network.c inet_ntoa.c iso_addr.c ns_addr.c ns_ntoa.c \
107 ntohl.s ntohs.s rcmd.c recv.c res_comp.c res_debug.c res_init.c \
108 res_mkquery.c res_query.c res_send.c send.c sethostent.c
109
110MAN3+= byteorder.0 gethostbyname.0 getnetent.0 getprotoent.0 getservent.0 \
111 inet.0 ns.0 rcmd.0 resolver.0 \
112
113MLINKS+=byteorder.3 htonl.3 byteorder.3 htons.3 byteorder.3 ntohl.3 \
114 byteorder.3 ntohs.3
115MLINKS+=gethostbyname.3 endhostent.3 gethostbyname.3 gethostbyaddr.3 \
116 gethostbyname.3 sethostent.3 gethostbyname.3 sethostfile.3 \
117 gethostbyname.3 gethostent.3 gethostbyname.3 herror.3
118MLINKS+=getnetent.3 endnetent.3 getnetent.3 getnetbyaddr.3 \
119 getnetent.3 getnetbyname.3 getnetent.3 setnetent.3
120MLINKS+=getprotoent.3 endprotoent.3 getprotoent.3 getprotobyname.3 \
121 getprotoent.3 getprotobynumber.3 getprotoent.3 setprotoent.3
122MLINKS+=getservent.3 endservent.3 getservent.3 getservbyname.3 \
123 getservent.3 getservbyport.3 getservent.3 setservent.3
124MLINKS+=inet.3 addr.3 inet.3 inet_addr.3 inet.3 inet_lnaof.3 \
125 inet.3 inet_makeaddr.3 inet.3 inet_netof.3 inet.3 inet_network.3 \
126 inet.3 inet_ntoa.3 inet.3 network.3 inet.3 ntoa.3
127MLINKS+=ns.3 ns_addr.3 ns.3 ns_ntoa.3
128MLINKS+=rcmd.3 rresvport.3 rcmd.3 ruserok.3
129
130# stdio sources
131SRCS+= clrerr.c doprnt.c doscan.c exit.c fdopen.c fgetc.c filbuf.c \
132 findiop.c flsbuf.c fopen.c fprintf.c fputc.c fread.c freopen.c \
133 fseek.c ftell.c fwrite.c getchar.c gets.c getw.c printf.c \
134 putchar.c putw.c rew.c scanf.c setbuf.c setbuffer.c sprintf.c \
135 ungetc.c vfprintf.c vprintf.c vsprintf.c
136
137.if (${MACHINE} == "vax")
138SRCS+= fgets.s fputs.s puts.s
139.else
140SRCS+= fgets.c fputs.c puts.c
141.endif
142
143MAN3+= exit.0 fclose.0 ferror.0 fgets.0 fopen.0 fread.0 fseek.0 getc.0 \
144 gets.0 printf.0 putc.0 puts.0 scanf.0 setbuf.0 stdio.0 ungetc.0 \
145
146MLINKS+=fclose.3 fflush.3
147MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3
148MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3
149MLINKS+=fread.3 fwrite.3
150MLINKS+=fseek.3 ftell.3 fseek.3 rewind.3
151MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
152MLINKS+=printf.3 fprintf.3 printf.3 sprintf.3 printf.3 vfprintf.3 \
153 printf.3 vprintf.3 printf.3 vsprintf.3
154MLINKS+=putc.3 fputc.3 putc.3 putchar.3 putc.3 putw.3
155MLINKS+=puts.3 fputs.3
156MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3
157MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3
158
159# string sources
160SRCS+= atof.s atoi.c atol.c bcmp.s bcopy.s bzero.s ffs.s fnmatch.c \
161 mktemp.c strcasecmp.c strcat.s strcmp.s strcpy.s strerror.c \
162 strftime.c strlen.s strmode.c strncat.s strncmp.s strncpy.s swab.c
163
164.if (${MACHINE} == "vax")
165SRCS+= index.s rindex.s
166.else
167SRCS+= index.c rindex.c
168.endif
169
170MAN3+= atof.0 bstring.0 fnmatch.0 glob.0 mktemp.0 strftime.0 string.0 \
171 strmode.0 strtok.0 swab.0 \
172
173MLINKS+=atof.3 atoi.3 atof.3 atol.3
174MLINKS+=bstring.3 bcmp.3 bstring.3 bcopy.3 bstring.3 bzero.3 \
175 bstring.3 ffs.3
176MLINKS+=string.3 index.3 string.3 rindex.3 string.3 strcat.3 \
177 string.3 strcmp.3 string.3 strcpy.3 string.3 strlen.3 \
178 string.3 strncat.3 string.3 strncmp.3 string.3 strcasecmp.3 \
179 string.3 strncasecmp.3 string.3 strncpy.3
180MLINKS+=strtok.3 strsep.3
181MLINKS+=glob.3 globfree.3
182MLINKS+=mktemp.3 mkstemp.3
183
184# sys sources
185SRCS+= Ovadvise.s Ovfork.s _exit.s _getlogin.s accept.s access.s \
186 acct.s adjtime.s async_daemon.s bind.s brk.s cerror.s chdir.s \
187 chflags.s chmod.s chown.s chroot.s close.s connect.s dup.s \
188 dup2.s execl.s execle.s exect.s execv.s execve.s fchdir.s \
189 fchflags.s fchmod.s fchown.s fcntl.s flock.s fork.s fstat.s \
190 fstatfs.s fsync.s ftruncate.s getdirentries.s getdtablesize.s \
191 getegid.s geteuid.s getfh.s getfsstat.s getgid.s getgroups.s \
192 gethostid.s gethostname.s getitimer.s getkerninfo.s \
193 getpagesize.s getpeername.s getpgrp.s getpid.s getppid.s \
194 getpriority.s getrlimit.s getrusage.s getsockname.s getsockopt.s \
195 gettimeofday.s getuid.s ioctl.s kill.s ktrace.s link.s listen.s \
196 lseek.s lstat.s mkdir.s mkfifo.s mknod.s mmap.s mount.s nfssvc.s \
197 open.s pipe.s profil.s ptrace.s quotactl.s read.s readlink.s \
198 readv.s reboot.s recvfrom.s recvmsg.s rename.s rmdir.s sbrk.s \
199 select.s sendmsg.s sendto.s setgroups.s sethostid.s \
200 sethostname.s setitimer.s setlogin.s setpgrp.s setpriority.s \
201 setregid.s setreuid.s setrlimit.s setsid.s \
202 setsockopt.s settimeofday.s shutdown.s sigaction.s sigpending.s \
203 sigprocmask.s sigreturn.s sigstack.s sigsuspend.s socket.s \
204 socketpair.s stat.s statfs.s swapon.s symlink.s sync.s syscall.s \
205 truncate.s umask.s unlink.s unmount.s utimes.s vhangup.s \
206 wait4.s write.s writev.s
207
208MAN2+= accept.0 access.0 acct.0 adjtime.0 async_daemon.0 bind.0 brk.0 \
209 chdir.0 chflags.0 chmod.0 chown.0 chroot.0 close.0 connect.0 \
210 dup.0 execve.0 exit.0 fcntl.0 flock.0 fork.0 fsync.0 \
211 getdirentries.0 getdtablesize.0 getfh.0 getfsstat.0 getgid.0 \
212 getgroups.0 gethostid.0 gethostname.0 getitimer.0 getlogin.0 \
213 getpagesize.0 getpeername.0 getpgrp.0 getpid.0 getpriority.0 \
214 getrlimit.0 getrusage.0 getsockname.0 getsockopt.0 \
215 gettimeofday.0 getuid.0 intro.0 ioctl.0 kill.0 link.0 listen.0 \
216 lseek.0 mkdir.0 mkfifo.0 mknod.0 mount.0 nfssvc.0 open.0 pipe.0 \
217 profil.0 ptrace.0 quotactl.0 read.0 readlink.0 reboot.0 recv.0 \
218 rename.0 rmdir.0 select.0 send.0 setgroups.0 setpgrp.0 \
219 setregid.0 setreuid.0 shutdown.0 sigreturn.0 \
220 sigstack.0 socket.0 socketpair.0 stat.0 statfs.0 swapon.0 \
221 symlink.0 sync.0 syscall.0 truncate.0 umask.0 unlink.0 utimes.0 \
222 vfork.0 vhangup.0 wait.0 write.0
223
224MLINKS+=brk.2 sbrk.2
225MLINKS+=dup.2 dup2.2
226MLINKS+=chdir.2 fchdir.2
227MLINKS+=chflags.2 fchflags.2
228MLINKS+=chmod.2 fchmod.2
229MLINKS+=chown.2 fchown.2
230MLINKS+=getgid.2 getegid.2
231MLINKS+=gethostid.2 sethostid.2
232MLINKS+=gethostname.2 sethostname.2
233MLINKS+=getitimer.2 setitimer.2
234MLINKS+=getlogin.2 setlogin.2
235MLINKS+=getpid.2 getppid.2
236MLINKS+=getpriority.2 setpriority.2
237MLINKS+=getrlimit.2 setrlimit.2
238MLINKS+=getsockopt.2 setsockopt.2
239MLINKS+=gettimeofday.2 settimeofday.2
240MLINKS+=getuid.2 geteuid.2
241MLINKS+=intro.2 errno.2
242MLINKS+=lseek.2 seek.2
243MLINKS+=mount.2 unmount.2
244MLINKS+=read.2 readv.2
245MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
246MLINKS+=send.2 sendmsg.2 send.2 sendto.2
247MLINKS+=stat.2 fstat.2 stat.2 lstat.2
248MLINKS+=statfs.2 fstatfs.2
249MLINKS+=truncate.2 ftruncate.2
250MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2
251MLINKS+=write.2 writev.2
252
253# sys5 sources
254SRCS+= bsearch.c fts.c getopt.c memccpy.c memchr.c memcmp.c memcpy.c \
255 memset.c putenv.c strcspn.c strdup.c strpbrk.c strsep.c strspn.c \
256 strtok.c strtol.c strtoul.c tmpnam.c
257
258.if (${MACHINE} == "vax")
259SRCS+= strchr.s strrchr.s
260.else
261SRCS+= strchr.c strrchr.c
262.endif
263
264MAN3+= bsearch.0 compat-sys5.0 fts.0 getopt.0
265
266MLINKS+=compat-sys5.3 memccpy.3 compat-sys5.3 memchr.3 \
267 compat-sys5.3 memcmp.3 compat-sys5.3 memcpy.3 \
268 compat-sys5.3 memset.3 compat-sys5.3 strchr.3 \
269 compat-sys5.3 strcspn.3 compat-sys5.3 strpbrk.3 \
270 compat-sys5.3 strrchr.3 compat-sys5.3 strspn.3 \
271 compat-sys5.3 strdup.3 compat-sys5.3 strtol.3 \
272 compat-sys5.3 tmpnam.3 compat-sys5.3 tmpfile.3 \
273 compat-sys5.3 tempnam.3
274
275errlst.o:
276 ${CC} -S ${CFLAGS} ${.IMPSRC}
277 ed - < ${.CURDIR}/gen/:errfix errlst.s
278 ${AS} -o errlst.o errlst.s
279 cp errlst.o errlst.po
280 rm -f errlst.s
281
282beforeinstall:
283 ar ma findiop.o libc.a exit.o
284 ar ma exit.o libc.a fakcu.o
285 ar ma findiop.po libc_p.a exit.po
286 ar ma exit.po libc_p.a fakcu.po
287
288.include <bsd.lib.mk>