Mercurial > hg > early-roguelike
comparison srogue/Makefile.in @ 102:1906d183f1f5
srogue: add install and uninstall targets to Makefile
author | John "Elwin" Edwards |
---|---|
date | Mon, 02 Sep 2013 15:47:37 -0700 |
parents | 15f8229f38c1 |
children | fbc75509f4cd |
comparison
equal
deleted
inserted
replaced
101:15f8229f38c1 | 102:1906d183f1f5 |
---|---|
9 # Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman | 9 # Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman |
10 # All rights reserved. | 10 # All rights reserved. |
11 # | 11 # |
12 # See the file LICENSE.TXT for full copyright and licensing information. | 12 # See the file LICENSE.TXT for full copyright and licensing information. |
13 | 13 |
14 DISTNAME=srogue9.0-1 | 14 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ |
15 PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ | |
15 PROGRAM=@PROGRAM@ | 16 PROGRAM=@PROGRAM@ |
17 | |
18 SCOREFILE=@SCOREFILE@ | |
19 LOGFILE=@LOGFILE@ | |
20 SAVEDIR=@SAVEDIR@ | |
21 GROUPOWNER=@GROUPOWNER@ | |
22 | |
23 DESTDIR= | |
24 prefix=@prefix@ | |
25 exec_prefix=@exec_prefix@ | |
26 datarootdir=@datarootdir@ | |
27 bindir=@bindir@ | |
28 docdir=@docdir@ | |
16 | 29 |
17 HDRS= bob.h cx.h ncx.h rdk.h rogue.h | 30 HDRS= bob.h cx.h ncx.h rdk.h rogue.h |
18 OBJS= vers.o armor.o chase.o command.o daemon.o daemons.o disply.o encumb.o \ | 31 OBJS= vers.o armor.o chase.o command.o daemon.o daemons.o disply.o encumb.o \ |
19 fight.o global.o init.o io.o list.o main.o mdport.o misc.o monsters.o \ | 32 fight.o global.o init.o io.o list.o main.o mdport.o misc.o monsters.o \ |
20 move.o new_leve.o options.o pack.o passages.o potions.o pstats.o \ | 33 move.o new_leve.o options.o pack.o passages.o potions.o pstats.o \ |
32 CFLAGS= -g | 45 CFLAGS= -g |
33 CPPFLAGS=@DEFS@ | 46 CPPFLAGS=@DEFS@ |
34 CRLIB = -lcurses | 47 CRLIB = -lcurses |
35 RM = rm -f | 48 RM = rm -f |
36 TAR = tar | 49 TAR = tar |
50 INSTALL=@INSTALL@ | |
37 | 51 |
38 $(PROGRAM): $(HDRS) $(OBJS) | 52 $(PROGRAM): $(HDRS) $(OBJS) |
39 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | 53 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ |
40 | 54 |
41 tags: $(HDRS) $(CFILES) | 55 tags: $(HDRS) $(CFILES) |
47 lint -hxbc $(CFILES) $(CRLIB) > linterrs | 61 lint -hxbc $(CFILES) $(CRLIB) > linterrs |
48 | 62 |
49 clean: | 63 clean: |
50 rm -f $(OBJS) core | 64 rm -f $(OBJS) core |
51 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).doc | 65 rm -f $(PROGRAM) $(PROGRAM).exe $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).doc |
66 | |
67 install: $(PROGRAM) | |
68 -touch test | |
69 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ | |
70 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | |
71 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | |
72 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi | |
73 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | |
74 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi | |
75 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
76 -if test "x$(GROUPOWNER)" != "x" ; then \ | |
77 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | |
78 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | |
79 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
80 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | |
81 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
82 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | |
83 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | |
84 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | |
85 fi | |
86 -if test ! -d $(DESTDIR)$(docdir) ; \ | |
87 then mkdir -p $(DESTDIR)$(docdir) ; fi | |
88 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT | |
89 -$(INSTALL) -m 0644 rogue.nr $(DESTDIR)$(docdir)/$(PROGRAM).nr | |
90 -$(RM) test | |
91 | |
92 uninstall: | |
93 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
94 -$(RM) $(DESTDIR)$(docdir)/LICENSE.TXT | |
95 -$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).nr | |
96 -rmdir $(DESTDIR)$(docdir) | |
97 | |
98 reinstall: uninstall install | |
52 | 99 |
53 count: | 100 count: |
54 wc -l $(HDRS) $(CFILES) | 101 wc -l $(HDRS) $(CFILES) |
55 | 102 |
56 realcount: | 103 realcount: |