Replace dgamelaunch with $(NAME) in a few places.
Add dependency for y.tab.o so it will be built automatically. Replace flex command by lex, bison -y by yacc. Change the install target a bit (although I don't use it myself). git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@88 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
e85350f8fd
commit
39c8fcbf1f
13
Makefile
13
Makefile
|
@ -1,6 +1,8 @@
|
||||||
VERSION = 1.3.10.1
|
VERSION = 1.3.10.1
|
||||||
NAME = dgamelaunch
|
NAME = dgamelaunch
|
||||||
exclusions = CVS .cvsignore tags
|
exclusions = CVS .cvsignore tags
|
||||||
|
PREFIX = /usr
|
||||||
|
SBINDIR = $(PREFIX)/sbin
|
||||||
|
|
||||||
ifndef optimize
|
ifndef optimize
|
||||||
optimize = -O0
|
optimize = -O0
|
||||||
|
@ -9,6 +11,7 @@ endif
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
CFLAGS = -g3 $(optimize) -Wall $(DEFS)
|
CFLAGS = -g3 $(optimize) -Wall $(DEFS)
|
||||||
|
INSTALL = install -c
|
||||||
DEFS = -DVERSION=\"$(VERSION)\"
|
DEFS = -DVERSION=\"$(VERSION)\"
|
||||||
SRCS = virus.c ttyrec.c dgamelaunch.c io.c ttyplay.c stripgfx.c strlcpy.c strlcat.c y.tab.o lex.yy.o
|
SRCS = virus.c ttyrec.c dgamelaunch.c io.c ttyplay.c stripgfx.c strlcpy.c strlcat.c y.tab.o lex.yy.o
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
@ -20,21 +23,21 @@ $(NAME): $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f dgamelaunch
|
rm -f $(NAME)
|
||||||
rm -f *.o .#* *~ y.tab.* lex.yy.c
|
rm -f *.o .#* *~ y.tab.* lex.yy.c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cp dgamelaunch /usr/sbin
|
$(INSTALL) -m 755 $(NAME) $(SBINDIR)
|
||||||
|
|
||||||
indent:
|
indent:
|
||||||
indent -nut -ts2 *.c *.h
|
indent -nut -ts2 *.c *.h
|
||||||
rm -f *~
|
rm -f *~
|
||||||
|
|
||||||
lex.yy.c: config.l
|
lex.yy.c: config.l
|
||||||
flex $<
|
lex $<
|
||||||
|
|
||||||
y.tab.c: config.y
|
y.tab.c: config.y
|
||||||
bison -d -y $<
|
yacc -d $<
|
||||||
|
|
||||||
lex.yy.o: lex.yy.c
|
lex.yy.o: lex.yy.c
|
||||||
y.tab.o: y.tab.c
|
y.tab.o: y.tab.c
|
||||||
|
@ -47,7 +50,7 @@ dist: clean indent
|
||||||
@echo "Created source release $(NAME)-$(VERSION).tar.gz"
|
@echo "Created source release $(NAME)-$(VERSION).tar.gz"
|
||||||
|
|
||||||
# Dependencies - we may auto-generate later
|
# Dependencies - we may auto-generate later
|
||||||
dgamelaunch.o: dgamelaunch.c dgamelaunch.h
|
dgamelaunch.o: dgamelaunch.c dgamelaunch.h y.tab.o
|
||||||
io.o: io.c ttyrec.h
|
io.o: io.c ttyrec.h
|
||||||
last_char_is.o: last_char_is.c
|
last_char_is.o: last_char_is.c
|
||||||
stripgfx.o: stripgfx.c stripgfx.h
|
stripgfx.o: stripgfx.c stripgfx.h
|
||||||
|
|
Loading…
Reference in New Issue