annotate rogue3/Makefile.in @ 91:e5ddbaf324d4

rogue3: add install and uninstall targets to Makefile.
author John "Elwin" Edwards
date Sun, 25 Aug 2013 19:52:23 -0700
parents 07c4d4883ef2
children 53e69c17c313
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
1 #
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
2 # Makefile for rogue
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
3 # %W% (Berkeley) %G%
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
4 #
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
5 # Rogue: Exploring the Dungeons of Doom
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
6 # Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
7 # All rights reserved.
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
8 #
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
9 # See the file LICENSE.TXT for full copyright and licensing information.
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
10 #
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
11
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
12 DISTNAME=rogue3.6.4
88
07c4d4883ef2 rogue3: begin porting to autoconf.
John "Elwin" Edwards
parents: 20
diff changeset
13 PROGRAM=@PROGRAM@
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
14
91
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
15 SCOREFILE=@SCOREFILE@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
16 LOGFILE=@LOGFILE@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
17 SAVEDIR=@SAVEDIR@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
18 GROUPOWNER=@GROUPOWNER@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
19
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
20 DESTDIR=
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
21 prefix=@prefix@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
22 exec_prefix=@exec_prefix@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
23 datarootdir=@datarootdir@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
24 bindir=@bindir@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
25 mandir=@mandir@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
26 man6dir=$(mandir)/man6
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
27 docdir=@docdir@
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
28
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
29
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
30 O=o
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
31
91
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
32 HDRS= rogue.h machdep.h config.h
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
33
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
34 OBJS1 = vers.$(O) armor.$(O) chase.$(O) command.$(O) daemon.$(O) daemons.$(O) \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
35 fight.$(O) init.$(O) io.$(O) list.$(O) main.$(O) mdport.$(O) \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
36 misc.$(O) monsters.$(O) move.$(O) newlevel.$(O) options.$(O)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
37 OBJS2 = pack.$(O) passages.$(O) potions.$(O) rings.$(O) rip.$(O) rooms.$(O) \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
38 save.$(O) scrolls.$(O) state.$(O) sticks.$(O) things.$(O) \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
39 weapons.$(O) wizard.$(O) xcrypt.$(O)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
40 OBJS = $(OBJS1) $(OBJS2)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
41
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
42 CFILES= vers.c armor.c chase.c command.c daemon.c daemons.c fight.c \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
43 init.c io.c list.c main.c mdport.c misc.c monsters.c move.c newlevel.c \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
44 options.c pack.c passages.c potions.c rings.c rip.c rooms.c \
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
45 save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c xcrypt.c
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
46
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
47
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
48 MISC_C=
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
49 DOCSRC= rogue.6 rogue.r
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
50 DOCS = $(PROGRAM).doc $(PROGRAM).cat $(PROGRAM).html readme36.html
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
51 MISC = Makefile $(MISC_C) LICENSE.TXT $(PROGRAM).sln $(PROGRAM).vcproj $(DOCS)\
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
52 $(DOCSRC)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
53
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
54 CC = gcc
88
07c4d4883ef2 rogue3: begin porting to autoconf.
John "Elwin" Edwards
parents: 20
diff changeset
55 CPPFLAGS =@DEFS@
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
56 ROPTS =
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
57 COPTS = -O3
20
bbf072f8bafa rogue3: move file locations from Makefile to machdep.h
edwarj4
parents: 16
diff changeset
58 CFLAGS= $(COPTS) $(ROPTS)
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
59 LIBS = -lcurses
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
60 RM = rm -f
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
61 LD = $(CC)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
62 LDOUT = -o
91
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
63 INSTALL=@INSTALL@
0
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
64
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
65 .SUFFIXES: .obj
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
66
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
67 .c.obj:
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
68 $(CC) $(CFLAGS) /c $*.c
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
69
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
70 $(PROGRAM)$(EXE): $(HDRS) $(OBJS)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
71 $(LD) $(LDFLAGS) $(OBJS) $(LIBS) $(LDOUT)$@
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
72
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
73 clean:
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
74 $(RM) $(OBJS1)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
75 $(RM) $(OBJS2)
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
76 $(RM) core $(PROGRAM) $(PROGRAM).exe $(DISTNAME).tar $(DISTNAME).tar.gz
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
77 $(RM) $(DISTNAME).zip
527e2150eaf0 Import Rogue 3.6 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
78
91
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
79 install: $(PROGRAM)
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
80 -touch test
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
81 -if test ! -f $(DESTDIR)$(SCOREFILE) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
82 then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
83 -if test "x$(LOGFILE)" != "x" && test ! -f $(DESTDIR)$(LOGFILE) ; then \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
84 $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
85 -if test "x$(SAVEDIR)" != "x" && test ! -d $(DESTDIR)$(SAVEDIR) ; then \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
86 mkdir -p $(DESTDIR)$(SAVEDIR) ; fi
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
87 -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM)
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
88 -if test "x$(GROUPOWNER)" != "x" ; then \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
89 chgrp $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
90 chgrp $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
91 chgrp $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
92 chgrp $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.
John "Elwin" Edwards
parents: 88
diff changeset
93 chmod 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \
e5ddbaf324d4 rogue3: add install and uninstall targets to Makefile.