2004-01-06 02:38:11 +01:00
|
|
|
VERSION = 1.4
|
2003-12-31 08:18:06 +01:00
|
|
|
NAME = dgamelaunch
|
2004-01-01 20:57:58 +01:00
|
|
|
exclusions = CVS .cvsignore tags
|
2004-01-05 14:16:23 +01:00
|
|
|
PREFIX = /usr
|
|
|
|
SBINDIR = $(PREFIX)/sbin
|
2003-12-31 08:18:06 +01:00
|
|
|
|
2003-12-31 19:58:20 +01:00
|
|
|
ifndef optimize
|
|
|
|
optimize = -O0
|
|
|
|
endif
|
|
|
|
|
2003-12-30 22:30:32 +01:00
|
|
|
CC = gcc
|
|
|
|
LDFLAGS =
|
2004-01-03 01:30:47 +01:00
|
|
|
CFLAGS = -g3 $(optimize) -Wall $(DEFS)
|
2004-01-05 14:16:23 +01:00
|
|
|
INSTALL = install -c
|
2003-12-31 03:39:10 +01:00
|
|
|
DEFS = -DVERSION=\"$(VERSION)\"
|
2004-01-06 00:27:18 +01:00
|
|
|
SRCS = virus.c ttyrec.c dgamelaunch.c io.c ttyplay.c stripgfx.c strlcpy.c strlcat.c y.tab.c lex.yy.c
|
2003-12-30 22:30:32 +01:00
|
|
|
OBJS = $(SRCS:.c=.o)
|
2004-01-02 21:47:53 +01:00
|
|
|
LIBS = -lncurses -lcrypt -lutil
|
2003-12-30 22:30:32 +01:00
|
|
|
|
2003-12-31 08:18:06 +01:00
|
|
|
all: $(NAME)
|
2003-12-30 22:30:32 +01:00
|
|
|
|
2003-12-31 08:18:06 +01:00
|
|
|
$(NAME): $(OBJS)
|
2003-12-30 22:30:32 +01:00
|
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
2004-01-05 14:16:23 +01:00
|
|
|
rm -f $(NAME)
|
2004-01-05 10:19:58 +01:00
|
|
|
rm -f *.o .#* *~ y.tab.* lex.yy.c
|
2004-01-03 01:30:47 +01:00
|
|
|
|
2003-12-30 22:30:32 +01:00
|
|
|
install:
|
2004-01-05 14:16:23 +01:00
|
|
|
$(INSTALL) -m 755 $(NAME) $(SBINDIR)
|
2004-01-03 01:30:47 +01:00
|
|
|
|
2003-12-30 22:30:32 +01:00
|
|
|
indent:
|
2003-12-31 20:47:49 +01:00
|
|
|
indent -nut -ts2 *.c *.h
|
2004-01-01 03:06:07 +01:00
|
|
|
rm -f *~
|
2003-12-31 08:18:06 +01:00
|
|
|
|
2004-01-05 02:25:38 +01:00
|
|
|
lex.yy.c: config.l
|
2004-01-05 14:16:23 +01:00
|
|
|
lex $<
|
2004-01-05 02:25:38 +01:00
|
|
|
|
|
|
|
y.tab.c: config.y
|
2004-01-05 14:16:23 +01:00
|
|
|
yacc -d $<
|
2004-01-05 02:25:38 +01:00
|
|
|
|
|
|
|
lex.yy.o: lex.yy.c
|
|
|
|
y.tab.o: y.tab.c
|
|
|
|
|
2004-01-06 06:03:19 +01:00
|
|
|
dist: clean
|
2003-12-31 08:18:06 +01:00
|
|
|
rm -rf $(NAME)-$(VERSION)
|
|
|
|
(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"
|
|
|
|
|
2004-01-01 20:32:48 +01:00
|
|
|
# Dependencies - we may auto-generate later
|
2004-01-05 14:16:23 +01:00
|
|
|
dgamelaunch.o: dgamelaunch.c dgamelaunch.h y.tab.o
|
2004-01-01 20:32:48 +01:00
|
|
|
io.o: io.c ttyrec.h
|
|
|
|
last_char_is.o: last_char_is.c
|
|
|
|
stripgfx.o: stripgfx.c stripgfx.h
|
|
|
|
ttyplay.o: ttyplay.c ttyrec.h io.h stripgfx.h
|
|
|
|
ttyrec.o: ttyrec.c dgamelaunch.h ttyrec.h io.h
|
|
|
|
virus.o: virus.c last_char_is.c
|