CC=gcc
OPT=-g
CFLAGS=$(OPT) -I. -DNONAMES -DNO_REMOTE -DSTDC_HEADERS -DMAJOR_IN_STAT \
	-DDIRENT -DHAVE_GETCWD -DVSTA

OBJS=tar.o create.o extract.o buffer.o \
	getoldopt.o update.o gnu.o mangle.o \
	version.o list.o names.o diffarch.o port.o fnmatch.o getopt.o \
	getopt1.o regex.o getdate.o

all:	tar

tar:	testpad.h $(OBJS)
	$(CC) $(OPT) -o tar $(OBJS) $(LIBS)

testpad.h: testpad
	./testpad

testpad: testpad.o
	$(CC) -o testpad testpad.o $(LIBS)

getdate.o: getdate.c
	$(CC) $(CFLAGS) -c getdate.c

clean:
	rm -f *.o testpad testpad.h

clobber: clean
	rm -f tar
