Mercurial > hg > early-roguelike
comparison urogue/Makefile.in @ 274:603e8a99c859
UltraRogue: add install and uninstall targets to the Makefile.
author | John "Elwin" Edwards |
---|---|
date | Tue, 05 Sep 2017 21:03:26 -0400 |
parents | 51ddbe7b992d |
children | aa0eefcd7df6 |
comparison
equal
deleted
inserted
replaced
273:51ddbe7b992d | 274:603e8a99c859 |
---|---|
115 CPPFLAGS=@DEFS@ | 115 CPPFLAGS=@DEFS@ |
116 CFLAGS= | 116 CFLAGS= |
117 CRLIB = @LIBS@ | 117 CRLIB = @LIBS@ |
118 RM = rm -f | 118 RM = rm -f |
119 TAR = tar | 119 TAR = tar |
120 INSTALL=@INSTALL@ | |
121 | |
122 SCOREFILE=@SCOREFILE@ | |
123 LOGFILE=@LOGFILE@ | |
124 SAVEDIR=@SAVEDIR@ | |
125 CHARDIR=@CHARDIR@ | |
126 GROUPOWNER=@GROUPOWNER@ | |
127 | |
128 DESTDIR= | |
129 prefix=@prefix@ | |
130 exec_prefix=@exec_prefix@ | |
131 bindir=@bindir@ | |
120 | 132 |
121 .c.o: | 133 .c.o: |
122 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c | 134 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c |
123 | 135 |
124 $(PROGRAM): $(OBJS) $(MAKEFILE) | 136 $(PROGRAM): $(OBJS) $(MAKEFILE) |
125 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ | 137 $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ |
126 | 138 |
127 clean: | 139 clean: |
128 rm -f $(OBJS) urogue a.out core *.map urogue.exe urogue.cat | 140 rm -f $(OBJS) urogue a.out core *.map urogue.exe urogue.cat |
141 | |
142 install: $(PROGRAM) | |
143 touch test | |
144 if test ! -f $(DESTDIR)$(SCOREFILE) ; then \ | |
145 mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \ | |
146 $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi | |
147 if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \ | |
148 mkdir -p `dirname $(DESTDIR)$(LOGFILE)` ; \ | |
149 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi | |
150 if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \ | |
151 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi | |
152 if test "x$(CHARDIR)" != "x" && test ! -d $(DESTDIR)$(CHARDIR) ; then \ | |
153 mkdir -p $(DESTDIR)$(CHARDIR) ; fi | |
154 mkdir -p $(DESTDIR)$(bindir) | |
155 $(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
156 -if test "x$(GROUPOWNER)" != "x" ; then \ | |
157 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ | |
158 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ | |
159 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
160 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ | |
161 chgrp $(GROUPOWNER) $(DESTDIR)$(CHARDIR) ; \ | |
162 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ | |
163 chmod 0464 $(DESTDIR)$(SCOREFILE) ; \ | |
164 chmod 0464 $(DESTDIR)$(LOGFILE) ; \ | |
165 chmod 0775 $(DESTDIR)$(SAVEDIR) ; \ | |
166 chmod 0775 $(DESTDIR)$(CHARDIR) ; \ | |
167 fi | |
168 $(RM) test | |
169 | |
170 uninstall: | |
171 $(RM) $(DESTDIR)$(bindir)/$(PROGRAM) | |
172 | |
173 reinstall: uninstall install | |
129 | 174 |
130 dist.src: | 175 dist.src: |
131 make clean | 176 make clean |
132 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) | 177 tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) |
133 gzip -f $(DISTNAME)-src.tar | 178 gzip -f $(DISTNAME)-src.tar |