
SHELL = /bin/sh

CC      = @CC@
LIBS    = @LIBS@
CFLAGS  =
LDFLAGS =

SRCS = backupfile.c getopt.c inp.c patch.c pch.c util.c \
	version.c rename.c alloca.c
OBJS = backupfile.o getopt.o inp.o patch.o pch.o util.o \
	version.o @LIBOBJS@
HDRS = EXTERN.h INTERN.h backupfile.h common.h getopt.h \
	inp.h patchlevel.h pch.h util.h version.h
MISC = COPYING ChangeLog INSTALL Makefile.in README NEWS \
	configure configure.in config.h.in patch.man
DISTFILES = $(MISC) $(SRCS) $(HDRS)

all: patch

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

patch: $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)

clean:
	rm -f patch *.o core

distclean: clean
	rm -f Makefile config.status config.h config.cache config.log

realclean: distclean
	rm -f TAGS

