84 lines
2.1 KiB
Makefile
84 lines
2.1 KiB
Makefile
|
NAME = @PACKAGE_NAME@
|
||
|
VERSION = @PACKAGE_VERSION@
|
||
|
|
||
|
exclusions = CVS .svn .cvsignore tags
|
||
|
prefix = @prefix@
|
||
|
sbindir = @sbindir@
|
||
|
mandir = @mandir@
|
||
|
|
||
|
CC = @CC@
|
||
|
LIBS = @LIBS@
|
||
|
CFLAGS = @CFLAGS@
|
||
|
INSTALL = @INSTALL@
|
||
|
LEX = @LEX@
|
||
|
YACC = @YACC@
|
||
|
|
||
|
MAN8 = dgamelaunch.8
|
||
|
EDITOR = @EDITOR@
|
||
|
|
||
|
SRCS = $(EDITOR) dgl-common.c ttyrec.c dgamelaunch.c io.c ttyplay.c mygetnstr.c stripgfx.c strlcpy.c strlcat.c y.tab.c lex.yy.c
|
||
|
EXTRA_SRCS = nethackstub.c
|
||
|
OBJS = $(SRCS:.c=.o)
|
||
|
WALL_OBJS = y.tab.o lex.yy.o dgl-common.o dgl-wall.o strlcat.o strlcpy.o
|
||
|
|
||
|
all: $(NAME) dgl-wall
|
||
|
|
||
|
$(NAME): $(OBJS)
|
||
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||
|
|
||
|
dgl-wall: $(WALL_OBJS)
|
||
|
$(CC) $(CFLAGS) -o $@ $(WALL_OBJS) $(LIBS)
|
||
|
|
||
|
clean:
|
||
|
rm -f $(NAME) nethackstub dgl-wall
|
||
|
rm -f editors/*.o *.o .#* *~ y.tab.* lex.yy.c Makefile.dep
|
||
|
rm -f Makefile config.h config.log config.status
|
||
|
rm -rf autom4te.cache
|
||
|
|
||
|
install:
|
||
|
$(INSTALL_PROGRAM) -m 755 $(NAME) $(sbindir)
|
||
|
$(INSTALL_PROGRAM) -m 644 $(MAN8) $(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: dep clean
|
||
|
rm -rf $(NAME)-$(VERSION)
|
||
|
autoheader
|
||
|
autoconf
|
||
|
(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"
|
||
|
|
||
|
dep: y.tab.c lex.yy.c
|
||
|
@sed -e '/^# Source code dependencies/,$$d' < Makefile > Makefile.dep
|
||
|
@echo "# Source code dependencies" >> Makefile.dep
|
||
|
$(CC) -MM $(SRCS) $(EXTRA_SRCS) >> Makefile.dep
|
||
|
mv Makefile.dep Makefile
|
||
|
|
||
|
# Source code dependencies
|
||
|
ee.o: ee.c
|
||
|
dgl-common.o: dgl-common.c dgamelaunch.h
|
||
|
ttyrec.o: ttyrec.c dgamelaunch.h ttyrec.h io.h
|
||
|
dgamelaunch.o: dgamelaunch.c dgamelaunch.h ttyplay.h ttyrec.h y.tab.h
|
||
|
io.o: io.c ttyrec.h
|
||
|
ttyplay.o: ttyplay.c dgamelaunch.h ttyplay.h ttyrec.h io.h stripgfx.h
|
||
|
mygetnstr.o: mygetnstr.c
|
||
|
stripgfx.o: stripgfx.c stripgfx.h
|
||
|
strlcpy.o: strlcpy.c
|
||
|
strlcat.o: strlcat.c
|
||
|
y.tab.o: y.tab.c dgamelaunch.h
|
||
|
lex.yy.o: lex.yy.c y.tab.h dgamelaunch.h
|
||
|
nethackstub.o: nethackstub.c
|