# $Id$
#
# Author:	Ulrich Leodolter
# Date:		Mon Oct 23 17:31:34 1995
# Comment:	Makefile for DJGPP tcp socket library
#
#SRCDIR	= $(LAB)/ulrich/tcp

SRCDIR	= $(LAB)/tcplib

vpath %.c $(SRCDIR)/tcpsrc
vpath %.s $(SRCDIR)/tcpsrc
vpath %.h $(SRCDIR)/tcpsrc
vpath %.c $(SRCDIR)/tcpsys
vpath %.h $(SRCDIR)/tcpsys

%.o: %.s
	$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@

ARCH	= tcp
OBJS	= pcstat.o bsdname.o fragment.o select.o \
	test.o pcbootp.o sock_dbu.o sock_prn.o \
	sock_ini.o pcbsd.o pcrecv.o pcconfig.o \
	pcbuf.o udp_nds.o udp_dom.o pcicmp.o \
	pcping.o pcarp.o pcsed.o pctcp.o \
	intel.o inchksum.o pcpkt.o elib.o \
	pcdbug.o socket.o

include $(SRCDIR)/makefile.lab

DEFS	= -DSYSV -DSYSV386 -DNO_ASM
INCL	= -I$(SRCDIR)/include -I$(SRCDIR)/include/tcp

CFLAGS_OPTIMIZE	= -O2 -Wall
CFLAGS_DEBUG	= -g

all:: ping.exe

ping.exe: ping.o
	$(CC) ping.o -g -L. -ltcp -o ping.out
	coff2exe ping.out

depend::
	$(CC) $(CFLAGS) -M $(SRCDIR)/tcpsrc/*.c > makefile.dep

ifneq ($(wildcard makefile.dep),)
include makefile.dep
endif
