Mercurial > hg > early-roguelike
comparison xrogue/Makefile.in @ 158:2515e03b2f09
arogue7, xrogue: add 'install' targets to Makefiles.
'make install' and 'make uninstall' should now work as expected.
author | John "Elwin" Edwards |
---|---|
date | Thu, 04 Jun 2015 17:08:40 -0400 |
parents | 3e1146666ae5 |
children | 2d221d574280 |
comparison
equal
deleted
inserted
replaced
157:5238b835d661 | 158:2515e03b2f09 |
---|---|
12 # | 12 # |
13 # See the file LICENSE.TXT for full copyright and licensing information. | 13 # See the file LICENSE.TXT for full copyright and licensing information. |
14 | 14 |
15 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ | 15 DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ |
16 PROGRAM=@PROGRAM@ | 16 PROGRAM=@PROGRAM@ |
17 PACKAGE_TARNAME=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ | |
17 | 18 |
18 SAVEDIR=@SAVEDIR@ | 19 SAVEDIR=@SAVEDIR@ |
19 SCOREFILE=@SCOREFILE@ | 20 SCOREFILE=@SCOREFILE@ |
20 LOGFILE=@LOGFILE@ | 21 LOGFILE=@LOGFILE@ |
21 GROUPOWNER=@GROUPOWNER@ | 22 GROUPOWNER=@GROUPOWNER@ |
23 | |
24 DESTDIR= | |
25 prefix=@prefix@ | |
26 exec_prefix=@exec_prefix@ | |
27 datarootdir=@datarootdir@ | |
28 bindir=@bindir@ | |
29 docdir=@docdir@ | |
22 | 30 |
23 O=o | 31 O=o |
24 | 32 |
25 HDRS = rogue.h mach_dep.h network.h | 33 HDRS = rogue.h mach_dep.h network.h |
26 | 34 |
46 CPPFLAGS =@DEFS@ | 54 CPPFLAGS =@DEFS@ |
47 CFLAGS= -O3 | 55 CFLAGS= -O3 |
48 LIBS = @LIBS@ | 56 LIBS = @LIBS@ |
49 RM = rm -f | 57 RM = rm -f |
50 TAR = tar | 58 TAR = tar |
59 INSTALL=@INSTALL@ | |
51 .SUFFIXES: .obj | 60 .SUFFIXES: .obj |
52 | 61 |
53 .c.obj: | 62 .c.obj: |
54 $(CC) $(CFLAGS) /c $*.c | 63 $(CC) $(CFLAGS) /c $*.c |
55 | 64 |
56 $(PROGRAM): $(HDRS) $(OBJS) | 65 $(PROGRAM): $(HDRS) $(OBJS) |
57 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ | 66 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ |
67 | |
68 install: $(PROGRAM) | |
69 -touch test | |
70 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ | |
71 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | |
72 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | |
73 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi | |
74 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | |
75 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi | |
76 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
77 -if test "x$(GROUPOWNER)" != "x" ; then \ | |
78 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | |
79 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | |
80 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
81 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | |
82 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
83 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | |
84 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | |
85 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | |
86 fi | |
87 -if test ! -d $(DESTDIR)$(docdir) ; \ | |
88 then mkdir -p $(DESTDIR)$(docdir) ; fi | |
89 -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT | |
90 -$(INSTALL) -m 0644 README.TXT $(DESTDIR)$(docdir) | |
91 -$(RM) test | |
92 | |
93 uninstall: | |
94 -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
95 -$(RM) -r $(DESTDIR)$(docdir) | |
96 | |
97 reinstall: uninstall install | |
58 | 98 |
59 clean: | 99 clean: |
60 $(RM) $(OBJS1) | 100 $(RM) $(OBJS1) |
61 $(RM) $(OBJS2) | 101 $(RM) $(OBJS2) |
62 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip | 102 $(RM) core a.exe a.out a.exe.stackdump $(PROGRAM) $(PROGRAM).exe $(PROGRAM).tar $(PROGRAM).tar.gz $(PROGRAM).zip |