# 
#  Copyright (c) 1989 Brian Sturgill
#  All rights reserved.
# 
#  Redistribution and use in source and binary forms are permitted
#  provided that the above copyright notice and this paragraph are
#  duplicated in all such forms and that any documentation,
#  advertising materials, and other materials related to such
#  distribution and use acknowledge that the software was developed
#  by Brian Sturgill and Raphael Finkel at the University of Kentucky,
#  Department of Computer Science.  The names of the University or the
#  authors may not be used to endorse or promote products derived
#  from this software without specific prior written permission.
#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

SATINCLUDE=-I$(SATSRC)/=Include -I../../=Include -I$(VPATH) $(ADDINC)


CFLAGS=$(DEBOPT) $(SATINCLUDE)


#.c.o:
#	$(CC) -c $(CFLAGS) $*.c

Nothing=
OBJ=\
	../libprogsup.a(asciitime.o) \
	../libprogsup.a(cd.o) \
	../libprogsup.a(conv.o) \
	../libprogsup.a(cursesup.o) \
	../libprogsup.a(cursesup2.o) \
	../libprogsup.a(filecalls.o) \
	../libprogsup.a(freestr.o) \
	../libprogsup.a(hostname.o) \
	../libprogsup.a(init.o) \
	../libprogsup.a(leave.o) \
	../libprogsup.a(netio.o) \
	../libprogsup.a(pipe.o) \
	../libprogsup.a(progsup.o) \
	../libprogsup.a(read.o) \
	../libprogsup.a(relationage.o) \
	../libprogsup.a(rename.o) \
	../libprogsup.a(reopen.o) \
	../libprogsup.a(rex.o) \
	../libprogsup.a(salnetio.o) \
	../libprogsup.a(saterrs.o) \
	../libprogsup.a(sort.o) \
	../libprogsup.a(split.o) \
	../libprogsup.a(strdup.o) \
	../libprogsup.a(substr.o) \
	../libprogsup.a(syserror.o) \
	../libprogsup.a(sysv.o) \
	../libprogsup.a(table.o) \
	../libprogsup.a(tempname.o) \
	../libprogsup.a(tr.o) \
	../libprogsup.a(type.o) \
	../libprogsup.a(coeflags.o) \
	../libprogsup.a(getdtablesize.o) \
	../libprogsup.a(popen.o) \
	../libprogsup.a(stdio_id.o) \
	$(Nothing)

all: ../libprogsup.a

# HMS: I removed the ${P} optimization because I thought that there
# might be a problem using it with the new library rule, as the archiving
# happens at each step.  This is mitigated because the new rule only makes
# what needs to be made.
../libprogsup.a: $(OBJ)

clean:
	-rm -f *.o
	-rm -f *.ln
	-rm -f $(PROGS) progsup.c progsup.h a.out core lint.out

#progsup.o: progsup.c
#	$(CC) -c $(CFLAGS) progsup.c
#	ar uc ../libprogsup.a progsup.o

progsup.c: progsup.O
	defobj progsup.O

lint: progsup.c
	$(LINT) -Cprogsup $(SATINCLUDE) -hba *.c >lint.out
