libc

targets=clint.log,coverage.log,ctype,distcheck.log,dlfcn,errno,fixme.log,fnmatch,iconv,includes,inttypes,langinfo,math,mman,msg,netdb,ptrace,pwd,regex,resource,rt,select,setjmp,shm,signal,socket,ssp,start,stdarg,stdint,stdio,stdlib,string,strings,time,tests.log,unistd,utsname
cppflags_force=-nostdinc -isystem ../include
cflags_force=-ffreestanding
cflags=-W -Wall -g -O2 -fPIE -fstack-protector
ldflags_force=-nostdlib -L$(OBJDIR)../src -Wl,-rpath,$(OBJDIR)../src $(OBJDIR)../src/start.o $(OBJDIR)../src/crti.o $(OBJDIR)../src/crtbegin.o -lc $(OBJDIR)../src/ssp/libssp.a $(OBJDIR)../src/crtend.o $(OBJDIR)../src/crtn.o `$(CC) -print-libgcc-file-name`
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,clint.sh,coverage.sh,cross.sh,distcheck.sh,fixme.sh,tests.sh
#targets
[clint.log]
type=script
script=./clint.sh
flags=-O CPPFLAGS="-d$$PWD/../include -I$$PWD/../include/dl -I$$PWD/../include/math -I$$PWD/../include/pthread -I$$PWD/../include/rt -I$$PWD/../include/socket -I$$PWD/../src/regex/pcre -I$$PWD/../src -D__`uname -s`__ -D__`uname -m`__ -DHAVE_CONFIG_H"
enabled=0
depends=$(OBJDIR)../src/libc.a,clint.sh
[coverage.log]
type=script
script=./coverage.sh
enabled=0
depends=coverage.sh
[ctype]
type=binary
sources=ctype.c
[distcheck.log]
type=script
script=./distcheck.sh
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o,distcheck.sh
enabled=0
[dlfcn]
type=binary
cppflags=-isystem ../include/dl
sources=dlfcn.c
[errno]
type=binary
sources=errno.c
[fixme.log]
type=script
script=./fixme.sh
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o,fixme.sh
enabled=0
[fnmatch]
type=binary
sources=fnmatch.c
[iconv]
type=binary
sources=iconv.c
[includes]
type=binary
cppflags=-isystem ../include/pthread -isystem ../include/rt
sources=includes.c
[inttypes]
type=binary
sources=inttypes.c
[langinfo]
type=binary
sources=langinfo.c
[math]
type=binary
cppflags=-isystem ../include/math
ldflags=$(OBJDIR)../src/math/libm.a
sources=math.c
[mman]
type=binary
sources=mman.c
[msg]
type=binary
sources=msg.c
[netdb]
type=binary
cppflags=-isystem ../include/socket
ldflags=$(OBJDIR)../src/socket/libsocket.a
sources=netdb.c
[ptrace]
type=binary
sources=ptrace.c
[pwd]
type=binary
sources=pwd.c
[regex]
type=binary
sources=regex.c
cppflags=-DHAVE_CONFIG_H
ldflags=$(OBJDIR)../src/regex/libpcre.a -rdynamic
[resource]
type=binary
sources=resource.c
[rt]
type=binary
sources=rt.c
cppflags=-isystem ../include/rt
ldflags=$(OBJDIR)../src/rt/librt.a
cppflags=-isystem ../include/rt
[select]
type=binary
sources=select.c
[setjmp]
type=binary
sources=setjmp.c
[shm]
type=binary
sources=shm.c
[signal]
type=binary
sources=signal.c
[socket]
type=binary
sources=socket.c
ldflags=$(OBJDIR)../src/socket/libsocket.a
[ssp]
type=binary
sources=ssp.c
[start]
type=binary
sources=start.c
[stdarg]
type=binary
sources=stdarg.c
[stdint]
type=binary
sources=stdint.c
[stdio]
type=binary
sources=stdio.c
[stdlib]
type=binary
sources=stdlib.c
[string]
type=binary
sources=string.c
[strings]
type=binary
sources=strings.c
[time]
type=binary
sources=time.c
[tests.log]
type=script
script=./tests.sh
flags=-O ARCH=`$(OBJDIR)../tools/uname$(EXEEXT)`
enabled=0
depends=$(OBJDIR)ctype,$(OBJDIR)dlfcn,$(OBJDIR)errno,$(OBJDIR)fnmatch,$(OBJDIR)iconv,$(OBJDIR)includes,$(OBJDIR)inttypes,$(OBJDIR)langinfo,$(OBJDIR)math,$(OBJDIR)mman,$(OBJDIR)msg,$(OBJDIR)netdb,$(OBJDIR)ptrace,$(OBJDIR)pwd,$(OBJDIR)regex,$(OBJDIR)resource,$(OBJDIR)rt,$(OBJDIR)select,$(OBJDIR)setjmp,$(OBJDIR)shm,$(OBJDIR)signal,$(OBJDIR)socket,$(OBJDIR)ssp,$(OBJDIR)start,$(OBJDIR)stdarg,$(OBJDIR)stdint,$(OBJDIR)stdio,$(OBJDIR)stdlib,$(OBJDIR)string,$(OBJDIR)strings,$(OBJDIR)time,tests.sh,$(OBJDIR)unistd,$(OBJDIR)utsname
[unistd]
type=binary
sources=unistd.c
[utsname]
type=binary
sources=utsname.c
#sources
[ctype.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[dlfcn.c]
depends=$(OBJDIR)../src/dl/libdl.a,$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[errno.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[fnmatch.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[iconv.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[includes.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[langinfo.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[math.c]
depends=$(OBJDIR)../src/math/libm.a,$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[mman.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[msg.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[netdb.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/socket/libsocket.a,$(OBJDIR)../src/start.o
[ptrace.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[pwd.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[regex.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o,../src/regex/pcre/pcre.h
[resource.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[rt.c]
depends=$(OBJDIR)../src/rt/librt.a,$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[select.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[setjmp.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[signal.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[socket.c]
depends=$(OBJDIR)../src/socket/libsocket.a,$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
cppflags=-isystem ../include/socket
[ssp.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[start.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[stdarg.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[stdint.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[stdio.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o,../src/stdio.c
[stdlib.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[string.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[strings.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[time.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[unistd.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o
[utsname.c]
depends=$(OBJDIR)../src/libc.a,$(OBJDIR)../src/start.o