#
#	Makefile for the Internet communication domain.
#

include ../../MakeVars

CPPFLAGS = -I../../include
CFLAGS = $(COPTS) -O2 -Wall -mshort -fomit-frame-pointer

SRCS = inet.c ip.c port.c buf.c udp.c inetutil.c icmp.c if.c loopback.c \
  route.c routedev.c timer.c tcp.c tcpin.c tcpout.c tcputil.c tcpsig.c \
  inetdev.c ifload.c rawip.c arp.c arpdev.c ifeth.c

OBJS = inet.o ip.o port.o buf.o udp.o inetutil.o icmp.o if.o loopback.o \
  route.o routedev.o timer.o tcp.o tcpin.o tcpout.o tcputil.o tcpsig.o \
  inetdev.o ifload.o rawip.o arp.o arpdev.o ifeth.o

all: sock.a

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@

.s.o:
	$(CC) -c $< -o $@

sock.a: $(OBJS)
	$(AR) rcs $@ $(OBJS)

clean:
	rm -f $(OBJS) sock.a

depend:
	$(CC) -MM $(CPPFLAGS) *.c > depend

ifeq (depend, $(wildcard depend))
include depend
endif
