#
# /emx/src/lib/socket/makefile
#
.INCLUDE: /emx/src/lib/lib0.mak

.PHONY: clean default socket

LIBSOCKET=$(L)socket.a

LIBC_CCFLAGS = -D__ST_MT_ERRNO__

default:    socket

socket: $(LIBSOCKET)

clean:
	-del *.o $(DELOPT)

accept.o: accept.c $(E) $(ERRNO) $(FCNTL)
bind.o: bind.c $(E)
connect.o: connect.c $(E)
gethosti.o: gethosti.c $(E)
gethostn.o: gethostn.c $(E)
getpeern.o: getpeern.c $(E)
gnetbyad.o: gnetbyad.c $(E)
gnetbyna.o: gnetbyna.c $(E)
gprotbna.o: gprotbna.c $(E)
gprotbnu.o: gprotbnu.c $(E)
getsockh.o: getsockh.c $(E)
getsockn.o: getsockn.c $(E)
getsocko.o: getsocko.c $(E)
ghostbya.o: ghostbya.c $(E) $(ERRNO) $(S)types.h $(I)netdb.h
ghostbyn.o: ghostbyn.c $(E) $(ERRNO) $(S)types.h $(I)netdb.h
gservbyn.o: gservbyn.c $(E)
gservbyp.o: gservbyp.c $(E)
herror.o: herror.c $(I)stdio.h $(S)types.h $(I)netdb.h
herrno.o: herrno.c
inetaddr.o: inetaddr.c $(I)stdlib.h $(I)ctype.h $(S)types.h $(I)netinet/in.h
inetlnao.o: inetlnao.c $(S)types.h $(I)netinet/in.h
inetmkad.o: inetmkad.c $(S)types.h $(I)netinet/in.h
inetneto.o: inetneto.c $(S)types.h $(I)netinet/in.h
inetnetw.o: inetnetw.c $(I)stdlib.h $(I)ctype.h $(S)types.h $(I)netinet/in.h
inetntoa.o: inetntoa.c $(I)stdio.h $(S)types.h $(I)netinet/in.h
listen.o: listen.c $(E)
recv.o: recv.c $(E)
recvfrom.o: recvfrom.c $(E)
send.o: send.c $(E)
sendto.o: sendto.c $(E)
setsocko.o: setsocko.c $(E)
shutdown.o: shutdown.c $(E)
socket.o: socket.c $(E) $(ERRNO) $(FCNTL)
swapl.o: swapl.s
swaps.o: swaps.s

$(LIBSOCKET): accept.o bind.o connect.o gethosti.o gethostn.o getpeern.o \
    getsockh.o getsockn.o getsocko.o ghostbya.o ghostbyn.o gnetbyad.o \
    gnetbyna.o gprotbna.o gprotbnu.o gservbyn.o gservbyp.o herror.o herrno.o \
    inetaddr.o inetlnao.o inetmkad.o inetneto.o inetnetw.o inetntoa.o \
    listen.o recv.o recvfrom.o send.o sendto.o setsocko.o shutdown.o socket.o \
    swapl.o swaps.o
	-del $(LIBSOCKET)
	$(AR) r $(LIBSOCKET) *.o
	$(AR) s $(LIBSOCKET)
