NAME = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ exclusions = CVS .svn .cvsignore tags autogen.sh svn-commit.tmp .\#* exec_prefix = @exec_prefix@ prefix = @prefix@ sbindir = @sbindir@ mandir = @mandir@ CC = @CC@ LIBS = @LIBS@ LEXLIBS = @LEXLIBS@ CFLAGS = @CFLAGS@ INSTALL = @INSTALL@ LEX = @LEX@ YACC = @YACC@ MKDEP = @MKDEP@ MKDEP_DIRECT = @MKDEP_DIRECT@ EDITORS = ee virus EDITORS_SRCS = ee.c virus.c MAN8 = dgamelaunch.8 STATIC_SRCS = dgl-common.c ttyrec.c dgamelaunch.c io.c ttyplay.c mygetnstr.c stripgfx.c strlcpy.c strlcat.c @SETPROCTITLE_C@ DYN_SRCS = y.tab.c lex.yy.c EXTRA_SRCS = nethackstub.c DEP_SRCS := $(STATIC_SRCS) $(EXTRA_SRCS) $(EDITORS_SRCS) SRCS := $(STATIC_SRCS) $(DYN_SRCS) OBJS = $(SRCS:.c=.o) all: .depend $(NAME) $(EDITORS) $(NAME): $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LEXLIBS) ee: ee.c $(CC) $(CFLAGS) -o $@ $< $(LIBS) virus: virus.c $(CC) $(CFLAGS) -o $@ $< $(LIBS) clean: rm -f $(NAME) nethackstub $(EDITORS) rm -f *.o *~ y.tab.* lex.yy.c .depend .depend.bak distclean: clean rm -f Makefile config.h config.log config.status rm -rf autom4te.cache install: all mkdir -p $(DESTDIR)$(sbindir) $(INSTALL) -m 755 $(NAME) $(DESTDIR)$(sbindir) mkdir -p $(DESTDIR)$(mandir)/man8 $(INSTALL) -m 644 $(MAN8) $(DESTDIR)$(mandir)/man8 indent: indent -nut -ts2 *.c *.h rm -f *~ lex.yy.c: config.l $(LEX) $< y.tab.c y.tab.h: config.y $(YACC) -d $< lex.yy.o: lex.yy.c y.tab.o: y.tab.c dist: .depend distclean rm -rf $(NAME)-$(VERSION) autoheader autoconf rm -rf autom4te.cache (cd .. && ln -sf $(CURDIR) $(NAME)-$(VERSION)) (cd .. && tar $(addprefix --exclude ,$(exclusions)) -chzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)) rm -f ../$(NAME)-$(VERSION) @echo "Created source release $(NAME)-$(VERSION).tar.gz" .depend: $(MKDEP) $(DEP_SRCS) $(MKDEP_DIRECT) -include .depend